You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let store = new MysqlSession({
user: 'root',
password: '12345678',
database: 'test',
host: '127.0.0.1',
port: 3306,
insecureAuth: true
})
错误信息
(node:2837) UnhandledPromiseRejectionWarning: Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client
at Handshake.Sequence._packetToError (/Users/stevenlee/github/test/koa2-note/demo/mysql/node_modules/mysql/lib/protocol/sequences/Sequence.js:52:14)
at Handshake.ErrorPacket (/Users/stevenlee/github/test/koa2-note/demo/mysql/node_modules/mysql/lib/protocol/sequences/Handshake.js:130:18)
at Protocol._parsePacket (/Users/stevenlee/github/test/koa2-note/demo/mysql/node_modules/mysql/lib/protocol/Protocol.js:279:23)
at Parser.write (/Users/stevenlee/github/test/koa2-note/demo/mysql/node_modules/mysql/lib/protocol/Parser.js:76:12)
at Protocol.write (/Users/stevenlee/github/test/koa2-note/demo/mysql/node_modules/mysql/lib/protocol/Protocol.js:39:16)
at Socket.<anonymous> (/Users/stevenlee/github/test/koa2-note/demo/mysql/node_modules/mysql/lib/Connection.js:103:28)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at addChunk (_stream_readable.js:263:12)
at readableAddChunk (_stream_readable.js:250:11)
--------------------
背景
我已经安装好了mysql(MAC)并配置了全局变量,使用idea内置的mysql连接工具测试连接成功。
使用命令行工具测试连接成功
连接代码
错误信息
在
session
、mysql
两个模块下连接mysql都遇到了这个问题,使用的node包分别为koa-mysql-session
与mysql
.注:我只修改了数据库连接的配置信息。
上网查了好久都没解决,如果哪位大神有什么好的思路,跪求分享,不胜感激:ambulance:
The text was updated successfully, but these errors were encountered: