添加 Mysql连接的Port配置

This commit is contained in:
tone
2024-09-26 00:03:34 +08:00
parent 29740b421b
commit a33a6b4619
2 changed files with 2 additions and 0 deletions

View File

@@ -6,6 +6,7 @@ const config = {
}, },
mysql: { mysql: {
host: 'localhost', host: 'localhost',
port: 3306,
database: '', database: '',
user: 'root', user: 'root',
password: '' password: ''

View File

@@ -27,6 +27,7 @@ class MySQLConnectPool {
return mysql.createPool({ return mysql.createPool({
host: config.mysql.host, host: config.mysql.host,
database: config.mysql.database, database: config.mysql.database,
port: config.mysql.port,
user: config.mysql.user, user: config.mysql.user,
password: config.mysql.password, password: config.mysql.password,
waitForConnections: true, waitForConnections: true,