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?
Table of contents Preface Install vue-i18n Config...
This article example shares the specific code of ...
Table of contents Preface advantage: shortcoming:...
Table of contents 1. List interface and other mod...
After many difficult single-step debugging late a...
1. Related concepts 1.1 Jenkins Concepts: Jenkins...
filter is generally used to filter certain values...
This article shares the specific code of jQuery t...
introduction You must have encountered this in an...
Preface This is an investigation caused by the ex...
The fd command provides a simple and straightforw...
Table of contents What are Refs 1. String type Re...
Let’s start with a question Five years ago when I...
Better-scroll scrolling principle As a parent con...
The powerful tool cgroup in the kernel can not on...