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
Project scenario: Dark Horse Vue project manageme...
1. The concept of css: (Cascading Style Sheet) Ad...
Table of contents 1. Install axios 2. Use of axio...
Table of contents Project Directory Dockerfile Fi...
Use nginx to configure the separation of PC site ...
1. Setting case sensitivity of fields in the tabl...
This article shares the specific code of js+Html ...
history route History mode refers to the mode of ...
Mysql query time period intersection Usage scenar...
<br />I have always believed that Yahoo'...
This article example shares the specific code for...
Table of contents JavaScript prototype chain Obje...
mysql-5.7.17.msi installation, follow the screens...
Preface Workbench is installed on one computer, a...
Table of contents 1. Limit props to type lists 2....