1. error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client
数据库执行下列语句:
alter user 'root'@'localhost' identified with mysql_native_password by 'sql2008';
flush privileges;
2. Error: Cannot enqueue Query after fatal error.(错误:致命错误后无法将查询排队。)
配置数据库时增加一句(mysql.js里面) useConnectionPooling: true
// 创建数据库连接
const client=mysql.createConnection({
host:'localhost', // 数据域名 地址
user:'root', //数据名称
password:'sql2008',
database: 'social',
useConnectionPooling: true
// port:'3306
})