I installed a new version of MySQL (8.0.21) today, and an error occurred when connecting to the database using the node framework:
The reason is that MySQL 8.0 has changed the encryption plug-in, but the database management client still uses the encryption method of the old version. This is mainly due to the configuration process of the Authentication Method during the installation of MySQL 8.0. There are different encryption methods, so if you choose strong encryption (which should be the default), the above error problem will occur. In this case, just change the encryption method to keep the encryption method of the old version and it will be ok. 1. Windows users use the terminal to enter the database and enter: alter user 'root'@'%' identified with mysql_native_password by '密码' // Reset password flush privileges // Refresh privilege configuration It can be solved! 2. Mac users, please see here I also used the default strong encryption method during the installation process. The solution is also very simple. First, open Click MySQL to enter the database After entering, I found an interface like this. You can see that the database uses strong encryption. Then we select Click OK and finally restart the database! Because I changed to Mac, I can't personally follow the steps on Windows. Please forgive me if there are any incomplete details. You can also search for other tutorials on your own! Summarize This is the end of this article about the problems and solutions encountered when connecting node to mysql database. For more relevant content about connecting node to mysql database, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope everyone will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Nginx domain forwarding usage scenario code example
>>: What does the legendary VUE syntax sugar do?
Today, I want to write about a "low-tech&quo...
Table of contents Index Model B+Tree Index select...
20200804Addendum: The article may be incorrect. Y...
An optimization solution when a single MYSQL serv...
Table of contents Preface Demand Analysis Mysql u...
After configuring VIP, the error message that app...
Table of contents Scenario: The server database n...
Table of contents Preface Target first step: Step...
Scenario 1: Due to server restrictions, only one ...
Table of contents 1. fill() syntax 2. Use of fill...
Wildcard categories: %Percent wildcard: indicates...
Table of contents 1. Resource files 2. Installati...
1. Command method Run the nginx service in the cr...
Effect demo.html <html> <head> <me...
Docker-compose deployment configuration jenkins 1...