当我尝试与远程mysql
服务器连接时,它将无法连接
{“错误”:true,“消息”:“发生错误错误:连接ETIMEDOUT”}
,但可与本地mysql
服务器一起使用。
有人对此问题有解决方案吗?
以下是一些相关代码:
var pool = mysql.createPool({
connectionLimit: 1000,
acquireTimeout: 1000,
timeout: 1000,
host: 'remotemysqlserver.net',
port: '3346',
user: 'jone',
password: 'jone123',
database: 'test',
debug: true,
multipleStatements: true
});
但是像这样
var connection = mysql.createConnection({
host: 'remotemysqlserver.net',
user: 'jone',
password: 'jone123',
database: 'test',
});