I reinstalled the computer and installed the latest version of MySQL database. As a result, Navicat reported error 1251 when connecting to Mysql, and sqlyog reported error 2058. However, when I entered MySQL with the window command, the account and password were correct. I checked online and found that the reason for this is that the encryption rule in versions before mysql8 is mysql_native_password, while after mysql8, the encryption rule is caching_sha2_password. There are two ways to solve the problem. One is to upgrade the navicat driver; the other is to restore the mysql user login password encryption rule to mysql_native_password. I often use the second method: ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'; #Modify encryption rules ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER; #Update the user's password FLUSH PRIVILEGES; #Refresh permissions I see many people just copy the command directly, which is wrong.
So, the problem is solved. The above is the detailed content on how to solve the 1251 error when establishing a connection between MySQL and Navicat. For more information, please pay attention to other related articles on 123WORDPRESS.COM! You may also be interested in:
|
<<: How to automatically backup the script for Linux servers (mysql, attachment backup)
>>: Vue implements carousel animation
There is a new feature that requires capturing a ...
webkit scrollbar style reset 1. The scrollbar con...
1. Check whether MySQL is installed yum list inst...
There are two files a.htm and b.htm. In the same d...
The error is as follows: Uncaught TypeError: Cann...
Table of contents 1. Create a vue-cli default pro...
The parent node of the parent node, for example, t...
HTML tags have special tags to handle the title of...
Table of contents Implementing HTML Add CSS Imple...
1. Build a Docker environment 1. Create a Dockerf...
Apache Superset is a powerful BI tool that provid...
1. Introduction I have been studying the principl...
This article example shares the specific code of ...
Table of contents What is ReactHook? React curren...
Hello everyone, today we are going to learn about...