egg.js使用egg-mysql报错 ERROR 6096 nodejs.AppWorkerDiedError: [master] app

egg.js使用egg-mysql报错 ERROR 6096 nodejs.AppWorkerDiedError: [master] app,第1张

如果使用egg.js时,期间使用egg-mysql插件出现如下这个问题:

那么绝大概率是因为数据库的原因。无论是macos还是windows系统,请通过命令mysql -u root -p 回车进入 mysql,然后输入以下指令:

use mysql;
alter user 'root'@'localhost' identified with mysql_native_password by '你的密码';
flush privileges;


然后重新启动项目,就能看到项目已经启动成功了。因为mysql8.0 之后,加密规则变成了caching_sha2_password。至此,需要还原加密规则为 mysql_native_password

欢迎分享,转载请注明来源:内存溢出

原文地址: http://www.outofmemory.cn/web/1320180.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-11
下一篇 2022-06-11

发表评论

登录后才能评论

评论列表(0条)

保存