From a33a6b461994d9471b0f2c5887f3086c039ee8df Mon Sep 17 00:00:00 2001 From: tone <3341154833@qq.com> Date: Thu, 26 Sep 2024 00:03:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20Mysql=E8=BF=9E=E6=8E=A5?= =?UTF-8?q?=E7=9A=84Port=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config.ts | 1 + src/lib/Database/MySQLConnection.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/src/config.ts b/src/config.ts index 0a8c558..188812b 100644 --- a/src/config.ts +++ b/src/config.ts @@ -6,6 +6,7 @@ const config = { }, mysql: { host: 'localhost', + port: 3306, database: '', user: 'root', password: '' diff --git a/src/lib/Database/MySQLConnection.ts b/src/lib/Database/MySQLConnection.ts index b8af0e9..b72b181 100644 --- a/src/lib/Database/MySQLConnection.ts +++ b/src/lib/Database/MySQLConnection.ts @@ -27,6 +27,7 @@ class MySQLConnectPool { return mysql.createPool({ host: config.mysql.host, database: config.mysql.database, + port: config.mysql.port, user: config.mysql.user, password: config.mysql.password, waitForConnections: true,