ER_NOT_SUPPORTED_AUTH_MODE Error Connecting Node.js Server to MySQL Database
In the realm of relational database management, migrating between different database systems can sometimes lead to technical snags. As you encountered when attempting to connect your Node.js server to a MySQL database after uninstalling MariaDB, the message "ER_NOT_SUPPORTED_AUTH_MODE" indicates an authentication protocol mismatch.
To address this issue specifically, consider the following solution for MySQL v8.0:
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
Substitute 'root' with your desired username and 'password' with your preferred password.
Remember to activate the changes by issuing the command:
FLUSH PRIVILEGES;
Once these modifications are implemented, you should be able to establish a successful connection between your Node.js server and the MySQL database.
Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.
Copyright© 2022 湘ICP备2022001581号-3