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
Docker Installation There is no need to talk abou...
Preface When making a top menu, you will be requi...
Recently, the project uses kubernetes (hereinafte...
Maybe you are using include files here, which is u...
Many websites have a navigation bar fixed at the ...
Use HTML color blocks to dynamically display data...
Table of contents introduce Usage scenarios Sourc...
There are many seemingly true "rumors" ...
Today we are going to create a simple heartbeat e...
We simply need to open any text editor, copy the f...
Recently, I participated in the development of th...
1. Introduction Sometimes, after the web platform...
Although you think it may be a browser problem, i...
Introduction to CentOS CentOS is an enterprise-cl...
This article shares the specific code for JavaScr...