Change Sequelize Port

Asked 2 years ago, Updated 2 years ago, 136 views

When node.js connects to MySQL server using Sequelize, it seems that the port is basically connected to 3306, is there a way to change this port?

node.js sequelize.js

2022-09-20 22:13

1 Answers

Sequelize is just a tool that maps business logic and databases, and there is no way to use it to change it. The only way is to replace the mysql settings file.

v5.6 and below can be modified in /etc/mysql.my.cnf and v5.7 and above in /etc/mysql/mysql.conf.d/mysqld.cnf.


2022-09-20 22:13

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.