Home >Database >navicat >What should I do if navicat reports error 1251?

What should I do if navicat reports error 1251?

爱喝马黛茶的安东尼
爱喝马黛茶的安东尼Original
2019-08-06 11:28:188552browse

What should I do if navicat reports error 1251?

Navicat connection mysql error 1251 solution

1. Newly installed mysql8, use the cracked version of navicat It keeps reporting an error when connecting, as shown in the figure:

What should I do if navicat reports error 1251?

2. Searching the Internet for the reason, I found that the encryption rule in versions before mysql8 was mysql_native_password, but after mysql8, the encryption rule It is caching_sha2_password. There are two ways to solve the problem. One is to upgrade the navicat driver, and the other is to restore the mysql user login password encryption rule to mysql_native_password. Since I am using a cracked version of Navicat, I can only use the second method to solve it.

Related recommendations: "Navicat for mysql graphic tutorial"

3. First run cmd as an administrator, and then use the command to enter mysql.

What should I do if navicat reports error 1251?

Then enter the root password you set when installing mysql to enter. The interface after entering is as follows:

What should I do if navicat reports error 1251?

Note: If you enter mysql -u root -p, cmd prompts that mysql is not an internal or external command, nor is it an operable program or Batch file, it means that you did not add the path of mysql to the environment variable PATH after installing mysql before. This method is suggested at the end of the article;

4. Then change the encryption method in mysql first. The instructions are as follows:

ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER;

5. Then change the password. Due to the change of encryption rules, So you need to reset the password;

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '新密码';

6. Finally, refresh the database;

FLUSH PRIVILEGES;

Finally, write down how to add the path to mysql in the environment variable PATH;

1. Win r-->services.msc-->Right-click the mysql service-->Properties-->Find the executable path and copy it;

2. Right-click "My Computer"-->Properties-->Advanced System Settings-->Environment Variables-->System Variables-->PATH-->Edit-->New-->"Executable" above Path", as shown below:

What should I do if navicat reports error 1251?

What should I do if navicat reports error 1251?

The above is the detailed content of What should I do if navicat reports error 1251?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn