const sequelize = new Sequelize('mysql', 'account', 'password', {
host: 'localhost',
// host: '118.25.35.81',
dialect: 'mysql',
operatorsAliases: false,
dialectOptions: {
charset: "utf8mb4",
collate: "utf8mb4_unicode_ci",
supportBigNumbers: true,
bigNumberStrings: true
},
socketPath: '/tmp/mysql.sock',
pool: {
max: 5,
min: 0,
acquire: 30000,
idle: 10000
},
timezone: '+08:00'
});
solution
:
socketPath: '/tmp/mysql.sock',
Read More:
- node.js Server MySQL database connection timeout (error: connect etimeout)
- Solve the problem that dbvisualizer cannot connect to mysql8
- How to Fix Node.js connection to MYSQL error.
- mysql problem solving: mysqladmin: connect to server at’localhost’ failed
- Node.js Cannot find module ‘mysql’ ‘express’
- Solve the problem of MySQL 1251 client does not support
- MySQL: if the remote connection using navicatip fails, prompt “is not allowed to connect to this MySQL server”
- Navicat for MySQL error 1251 failed to connect to MySQL
- node.js Error: write epipe problem solved!
- How to solve the problem of “08001” when JDBC connects to MySQL
- It can’t connect to local MySQL server through socket ‘/ tmp/ mysql.sock ‘(2) “;
- Fatal error: Uncaught Error: Call to undefined function mysql_ Connect() problem solving
- The MySQL service suddenly hangs up with the error message can’t connect to MySQL server on ‘localhost’ (10061)
- PHP connection to MySQL database error: call to undefined function MySQL_ connect()
- MySQL Workbench Failed to Connect to MySQL at 127.0.0.1:3306 with user root Bad handshake
- Zookeeper connection timeout problem, and refused to connect to solve the problem
- Host is not allowed to connect to this MySQL server
- Node connects to MySQL error “Er”_ NOT_ SUPPORTED_ AUTH_ Mode “solution
- Sqlog connect to MySQL 8.0.24 remote server, error: 2058 solution
- Cannot find module ‘.. / lib / utils / unsupported. JS’ problem in installing node in centos7