egg-mysql ERROR 6096 nodejs.AppWorkerDiedError: [master] app_worker

created at 05-30-2022 views: 5


When use egg.js, the following problem occurs during the use of the egg-mysql plugin:

ERROR 6096 nodejs.AppWorkerDiedError: [master] app_worker


This probablely is because of the database. Whether it is a Macos or Windows system, please log in to mysql through the command mysql -u root -p, and then enter the following command in sequence:

use mysql;
alter user 'root'@'localhost' identified with mysql_native_password by 'YourPassword';
flush privileges;


Then restart the project, you can see that the project has been started successfully. Because mysql is after 8.0, the encryption rule becomes caching_sha2_password. At this point, you need to restore the encryption rule to mysql_native_password

created at:05-30-2022
edited at: 05-30-2022: