![egg.js使用egg-mysql报错 ERROR 6096 nodejs.AppWorkerDiedError: [master] app,第1张 egg.js使用egg-mysql报错 ERROR 6096 nodejs.AppWorkerDiedError: [master] app,第1张](/aiimages/egg.js%E4%BD%BF%E7%94%A8egg-mysql%E6%8A%A5%E9%94%99+ERROR+6096+nodejs.AppWorkerDiedError%3A+%5Bmaster%5D+app.png)
如果使用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;
然后重新启动项目,就能看到项目已经启动成功了。因为mysql在 8.0 之后,加密规则变成了caching_sha2_password。至此,需要还原加密规则为 mysql_native_password
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)