尝试使用TypeOrm连接到AWS RDS Aurora DB MySQL,这会给我Handshake inactivity timeout
错误。
code: 'PROTOCOL_SEQUENCE_TIMEOUT',
fatal: true,
timeout: 10000
尝试使用默认的10秒和我自己的15秒超时。
ormconfig.json
文件:
{
"type": "mysql",
"host": "host connection string",
"port": 3306,
"username": "xxxx",
"password": "xxxx",
"database": "xxxx",
"synchronize": true,
"logging": true,
"connectTimeout": 15000,
"entities": [
"src/entity/**/*.ts"
],
"migrations": [
"src/migration/**/*.ts"
],
"subscribers": [
"src/subscriber/**/*.ts"
],
"cli": {
"entitiesDir": "src/entity",
"migrationsDir": "src/migration",
"subscribersDir": "src/subscriber"
}
}
能够使用Linux MySQL客户端CLI连接到实例,甚至尝试在同一VPC中使用ECS连接到数据库,但出现相同的错误。
答案 0 :(得分:0)