Recently, when I was learning Django, I needed to use a database, so I downloaded Navicat to use it with MySQL, but the following problems occurred during the connection: After searching online, I found that the reason for this error is that the encryption rule in versions before mysql8 is mysql_native_password, while the encryption rule after mysql8 is caching_sha2_password. There are two ways to solve this problem. One is to update the navicat driver to solve this problem, and the other is to change the encryption rule for mysql user login to mysql_native_password. ; According to most of the suggestions on the Internet, the second method was adopted: 1. Open cmd with administrator privileges, enter mysql -u root -p to enter the password and enter the mysql database; mysql -u root -p #Enter the database 2. Modify the encryption rules and password and refresh; ALTER USER 'root'@'localhost' IDENTIFIED BY 'your mysql password' PASSWORD EXPIRE NEVER; #Modify encryption rules ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'your mysql password'; #Modify password FLUSH PRIVILEGES; #Refresh data -Under normal circumstances, you can continue to use Navicat to connect to MySQL successfully, but I failed at the first step and could not enter the database; -I don't know if there are any friends who have encountered the same situation as me, but don't panic. If cmd is not allowed to enter, we can log in directly with mysql client; -Enter the password, enter mysql, and enter the command in the second point to solve the problem. The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: v-html rendering component problem
>>: Detailed explanation of virtual DOM in Vue source code analysis
I will explain the installation of MySQL under Wi...
Table of contents variable Data Types Extension P...
1 Question The company's server uses Apache, ...
Here is an introduction to changing the password ...
Preface In WeChat applet development (native wxml...
This work uses the knowledge of front-end develop...
1. Download https://dev.mysql.com/downloads/mysql...
1. CSS file naming conventions Suggestion: Use le...
1. Demand The base has 300 new servers, and needs...
Many people now live on the Internet, and searchin...
The company's business scenario requires the ...
Technical Background This application uses the vu...
You can use yum to install all dependencies toget...
Today, let’s get straight to the point and talk a...
This article is from Tom Ewer's Managewp blog,...