Open OnZeng opened 5 months ago
Reading this issue: https://github.com/sidorares/node-mysql2/issues/1898 is a problem with the mysql2 package
I'm still not gonna fix it,
我应该怎么修复这个错误
mmmh what version of the package are you using the latest 0.0.13
? try to install nest-mysql
version 0.0.12
maybe the problem was introduced with mysql v3.9.4
, in version 0.0.12 there should be version 3.9.1
of the mysql2
package
nest-mysql is 0.0.13 mysql2 is 3.9.3
nest-mysql is 0.0.13 mysql2 is 3.9.3
try using these versions here:
nest-mysql v0.0.12
mysql2 v3.9.1
I've switched versions I'll run some tests. Wait for my results
The same mistakes happen The problem has not been solved How do I create a connection pool to connect to the database
The same mistakes happen The problem has not been solved How do I create a connection pool to connect to the database
Okay, I released a new version 0.0.14
to make pool connections try doing that:
MysqlModule.forRoot({
host: 'localhost',
database: 'test2',
password: 'root',
user: 'root',
port: 3306,
waitForConnections: true,
connectionLimit: 10,
queueLimit: 0,
pool: true,
}),
put the flag "pool:true"
in the configuration, so it does the switch for the connection pool, let me know if it works
非常棒,我去实验一下,看看问题有没有被解决,可能会晚点回复你结果
[Nest] 30 - 04/14/2024, 4:54:00 AM ERROR [ExceptionsHandler] Can't add new command when connection is in closed state Error: Can't add new command when connection is in closed state Errors are reported automatically at regular intervals