-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
plugin:egg-mysql报错,提示升级 #4230
Comments
你的 mysql server 版本是啥? |
你用的mysql server是 8.0.4以上的吧 mysql 8.0.4 以上版本安装时默认了caching_sha2_pasword的认证方式,但是egg-mysql底层以来的mysqljs目前还没有支持,你只能通过去修改conf文件 |
或者在创建用户的时候,明确指定 CREATE USER 'nativeuser'@'localhost'
IDENTIFIED WITH mysql_native_password BY 'password'; https://dev.mysql.com/doc/refman/8.0/en/sha256-pluggable-authentication.html |
conf文件文件的位置在哪? |
您好,您的邮件我已收到
|
我的解决方法就是创建一个新的账号,然后授权即可:
|
如果想用caching_sha2_pasword的方式认证连接有没有办法吖🤔 |
您好,您的邮件我已收到
|
报错如下:
nodejs.ER_NOT_SUPPORTED_AUTH_MODEError: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client
环境版本信息
详细报错如下:
nodejs.ER_NOT_SUPPORTED_AUTH_MODEError: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client
at Handshake.Sequence._packetToError (/Users/815355586qq.com/Documents/uni-app-project/egg-socket/node_modules/mysql/lib/protocol/sequences/Sequence.js:47:14)
at Handshake.ErrorPacket (/Users/815355586qq.com/Documents/uni-app-project/egg-socket/node_modules/mysql/lib/protocol/sequences/Handshake.js:123:18)
at Protocol._parsePacket (/Users/815355586qq.com/Documents/uni-app-project/egg-socket/node_modules/mysql/lib/protocol/Protocol.js:291:23)
at Parser._parsePacket (/Users/815355586qq.com/Documents/uni-app-project/egg-socket/node_modules/mysql/lib/protocol/Parser.js:433:10)
at Parser.write (/Users/815355586qq.com/Documents/uni-app-project/egg-socket/node_modules/mysql/lib/protocol/Parser.js:43:10)
at Protocol.write (/Users/815355586qq.com/Documents/uni-app-project/egg-socket/node_modules/mysql/lib/protocol/Protocol.js:38:16)
at Socket. (/Users/815355586qq.com/Documents/uni-app-project/egg-socket/node_modules/mysql/lib/Connection.js:88:28)
at Socket. (/Users/815355586qq.com/Documents/uni-app-project/egg-socket/node_modules/mysql/lib/Connection.js:526:10)
at Socket.emit (events.js:223:5)
at addChunk (_stream_readable.js:309:12)
--------------------
at Protocol._enqueue (/Users/815355586qq.com/Documents/uni-app-project/egg-socket/node_modules/mysql/lib/protocol/Protocol.js:144:48)
at Protocol.handshake (/Users/815355586qq.com/Documents/uni-app-project/egg-socket/node_modules/mysql/lib/protocol/Protocol.js:51:23)
at PoolConnection.connect (/Users/815355586qq.com/Documents/uni-app-project/egg-socket/node_modules/mysql/lib/Connection.js:116:18)
at Pool.getConnection (/Users/815355586qq.com/Documents/uni-app-project/egg-socket/node_modules/mysql/lib/Pool.js:48:16)
at /Users/815355586qq.com/Documents/uni-app-project/egg-socket/node_modules/ali-rds/node_modules/pify/index.js:29:7
at new Promise ()
at Pool. (/Users/815355586qq.com/Documents/uni-app-project/egg-socket/node_modules/ali-rds/node_modules/pify/index.js:12:10)
at Pool.ret [as getConnection] (/Users/815355586qq.com/Documents/uni-app-project/egg-socket/node_modules/ali-rds/node_modules/pify/index.js:56:34)
at Pool.query (/Users/815355586qq.com/Documents/uni-app-project/egg-socket/node_modules/mysql/lib/Pool.js:202:8)
at /Users/815355586qq.com/Documents/uni-app-project/egg-socket/node_modules/ali-rds/node_modules/pify/index.js:29:7
sql: select now() as currentTime;
code: "ER_NOT_SUPPORTED_AUTH_MODE"
errno: 1251
sqlMessage: "Client does not support authentication protocol requested by server; consider upgrading MySQL client"
sqlState: "08004"
fatal: true
name: "ER_NOT_SUPPORTED_AUTH_MODEError"
pid: 7013
hostname: 192.168.0.103
2020-03-23 22:43:07,601 ERROR 7013 nodejs.ER_NOT_SUPPORTED_AUTH_MODEError: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client
at Handshake.Sequence._packetToError (/Users/815355586qq.com/Documents/uni-app-project/egg-socket/node_modules/mysql/lib/protocol/sequences/Sequence.js:47:14)
at Handshake.ErrorPacket (/Users/815355586qq.com/Documents/uni-app-project/egg-socket/node_modules/mysql/lib/protocol/sequences/Handshake.js:123:18)
at Protocol._parsePacket (/Users/815355586qq.com/Documents/uni-app-project/egg-socket/node_modules/mysql/lib/protocol/Protocol.js:291:23)
at Parser._parsePacket (/Users/815355586qq.com/Documents/uni-app-project/egg-socket/node_modules/mysql/lib/protocol/Parser.js:433:10)
at Parser.write (/Users/815355586qq.com/Documents/uni-app-project/egg-socket/node_modules/mysql/lib/protocol/Parser.js:43:10)
at Protocol.write (/Users/815355586qq.com/Documents/uni-app-project/egg-socket/node_modules/mysql/lib/protocol/Protocol.js:38:16)
at Socket. (/Users/815355586qq.com/Documents/uni-app-project/egg-socket/node_modules/mysql/lib/Connection.js:88:28)
at Socket. (/Users/815355586qq.com/Documents/uni-app-project/egg-socket/node_modules/mysql/lib/Connection.js:526:10)
at Socket.emit (events.js:223:5)
at addChunk (_stream_readable.js:309:12)
--------------------
at Protocol._enqueue (/Users/815355586qq.com/Documents/uni-app-project/egg-socket/node_modules/mysql/lib/protocol/Protocol.js:144:48)
at Protocol.handshake (/Users/815355586qq.com/Documents/uni-app-project/egg-socket/node_modules/mysql/lib/protocol/Protocol.js:51:23)
at PoolConnection.connect (/Users/815355586qq.com/Documents/uni-app-project/egg-socket/node_modules/mysql/lib/Connection.js:116:18)
at Pool.getConnection (/Users/815355586qq.com/Documents/uni-app-project/egg-socket/node_modules/mysql/lib/Pool.js:48:16)
at /Users/815355586qq.com/Documents/uni-app-project/egg-socket/node_modules/ali-rds/node_modules/pify/index.js:29:7
at new Promise ()
at Pool. (/Users/815355586qq.com/Documents/uni-app-project/egg-socket/node_modules/ali-rds/node_modules/pify/index.js:12:10)
at Pool.ret [as getConnection] (/Users/815355586qq.com/Documents/uni-app-project/egg-socket/node_modules/ali-rds/node_modules/pify/index.js:56:34)
at Pool.query (/Users/815355586qq.com/Documents/uni-app-project/egg-socket/node_modules/mysql/lib/Pool.js:202:8)
at /Users/815355586qq.com/Documents/uni-app-project/egg-socket/node_modules/ali-rds/node_modules/pify/index.js:29:7
sql: select now() as currentTime;
code: "ER_NOT_SUPPORTED_AUTH_MODE"
errno: 1251
sqlMessage: "Client does not support authentication protocol requested by server; consider upgrading MySQL client"
sqlState: "08004"
fatal: true
name: "ER_NOT_SUPPORTED_AUTH_MODEError"
pid: 7013
hostname: 192.168.0.103
2020-03-23 22:43:07,601 ERROR 7013 [app_worker] start error, exiting with code:1
[2020-03-23 22:43:07.614] [cfork:master:7010] worker:7013 disconnect (exitedAfterDisconnect: false, state: disconnected, isDead: false, worker.disableRefork: true)
[2020-03-23 22:43:07.614] [cfork:master:7010] don't fork, because worker:7013 will be kill soon
2020-03-23 22:43:07,614 INFO 7010 [master] app_worker#1:7013 disconnect, suicide: false, state: disconnected, current workers: ["1"]
[2020-03-23 22:43:07.615] [cfork:master:7010] worker:7013 exit (code: 0, exitedAfterDisconnect: false, state: dead, isDead: true, isExpected: false, worker.disableRefork: true)
2020-03-23 22:43:07,616 ERROR 7010 nodejs.AppWorkerDiedError: [master] app_worker#1:7013 died (code: 0, signal: null, suicide: false, state: dead), current workers: []
at Master.onAppExit (/Users/815355586qq.com/Documents/uni-app-project/egg-socket/node_modules/egg-cluster/lib/master.js:510:21)
at Master.emit (events.js:223:5)
at Messenger.sendToMaster (/Users/815355586qq.com/Documents/uni-app-project/egg-socket/node_modules/egg-cluster/lib/utils/messenger.js:137:17)
at Messenger.send (/Users/815355586qq.com/Documents/uni-app-project/egg-socket/node_modules/egg-cluster/lib/utils/messenger.js:102:12)
at EventEmitter. (/Users/815355586qq.com/Documents/uni-app-project/egg-socket/node_modules/egg-cluster/lib/master.js:353:22)
at EventEmitter.emit (events.js:228:7)
at ChildProcess. (internal/cluster/master.js:188:13)
at Object.onceWrapper (events.js:313:26)
at ChildProcess.emit (events.js:223:5)
at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
name: "AppWorkerDiedError"
pid: 7010
hostname: 192.168.0.103
2020-03-23 22:43:07,616 ERROR 7010 [master] app_worker#1:7013 start fail, exiting with code:1
2020-03-23 22:43:07,616 ERROR 7010 [master] exit with code:1
2020-03-23 22:43:07,623 ERROR 7012 [agent_worker] receive disconnect event on child_process fork mode, exiting with code:110
2020-03-23 22:43:07,625 ERROR 7012 [agent_worker] exit with code:110
Error: /Users/815355586qq.com/Documents/uni-app-project/egg-socket/node_modules/egg-bin/lib/start-cluster {"typescript":false,"declarations":true,"workers":1,"baseDir":"/Users/815355586qq.com/Documents/uni-app-project/egg-socket","framework":"/Users/815355586qq.com/Documents/uni-app-project/egg-socket/node_modules/egg"} exit with code 1
at ChildProcess. (/Users/815355586qq.com/Documents/uni-app-project/egg-socket/node_modules/common-bin/lib/helper.js:56:21)
at Object.onceWrapper (events.js:313:26)
at ChildProcess.emit (events.js:223:5)
at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12) {
code: 1
}
The text was updated successfully, but these errors were encountered: