【发布时间】:2020-07-29 04:20:40
【问题描述】:
我在 AWS 和 MySQL 数据库上有 node.js Lambda 函数。我一直在使用以下代码进行连接:
const mysql = require('mysql');
const con = mysql.createConnection({
host: "<endpoint>",
user: "<user>",
password: "<password>"
});
con.connect(function(err) {
if (err) throw err;
console.log("Connected!");
con.end();
});
当我尝试连接到端点时,我收到消息:
{"message": "Internal server error"}
任何帮助将不胜感激!希望大家身体健康。
【问题讨论】:
标签: mysql node.js amazon-web-services