1251-Client does not support authentication appears when Navicat connects to the database...problem is solved

Question details:

Navicat connects to mysql, and there is a problem when connecting: 1251 client does not support authentication protocol requested by server...

insert image description here

 

After installing MySQL again, the above exception will appear when using Navicat or MySQL yog.

Solution:
In fact, this is a simple permission and security problem. You only need to enter two lines of commands in MySQL Shell to solve the problem.

1. Run the CMD window as an administrator.

Press [ctrl+shfit+esc] to open the task manager;
click [File] - [Run New Task];
check [Create this task with system administrative privileges], enter cmd in the box, and click OK;

insert image description here

 

2. Enter the mysql installation directory through the cd statement (MySQL used by the author is version 8.0.27, and the default path of mysql server installation is: C:\Program Files\MySQL\MySQL Server 8.0\bin)

insert image description here

 

3. Enter mysql -u root -p and the database password to enter the MySQL console.

insert image description here

 

4. Copy and paste the following two commands one by one to the console ('password' is your database login password).

 alter user 'root'@'localhost' identified with mysql_native_password by 'password';

 flush privileges;



[Note] Don't forget to write the semicolon when entering the above statement!

5. Reconnect in Navicat, and the connection is successful (test using Navicat for mysql)
insert image description here

The original author: Zaozhi icon-default.png?t=N2N8https://blog.csdn.net/piupiu78?type=blog , the original link: [MySql] Navicat connection database appears 1251 - Client does not support authentication protocol ...... The solution to the problem_1251 client_Zaozhi's Blog-CSDN Blog

Guess you like

Origin blog.csdn.net/weixin_64854388/article/details/129743492