Home > Database > Mysql Tutorial > body text

What should I do if a 1251 error occurs when sqlyog connects to Mysql?

醉折花枝作酒筹
Release: 2021-07-12 09:14:05
forward
5446 people have browsed it

SQLyog is a professional graphic management software. SQLyog is simple to operate and powerful. It can help users easily manage their own MYSQL database. SQLyog supports exporting in multiple data formats and can quickly help users back up and restore data. It can also quickly Run SQL script files directly to provide convenience for users.

What should I do if a 1251 error occurs when sqlyog connects to Mysql?

1251 client does not support authentication protocol requested by server;consider upgrading Mysql client

ERROR 1396 (HY000): Operation ALTER USER failed for 'root'@'localhost'
Copy after login

Cause of the problem:

Mainly due to the difference between the encryption rules before mysql8 and after mysql8.

Solution:

1. First, mysql must be installed. You can open cmd as an administrator and enter under the mysql file (not necessary if environment variables have been configured):

net start mysql whether the service is enabled successfully

After the service is started successfully, enter the command: mysql -u root -p (there is no password for the first login, just press Enter)!

Then enter after mysql>:

ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER; #修改加密规则 
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';  #更新一下用户的密码  
FLUSH PRIVILEGES; #刷新权限
Copy after login

After success, enter the modified password in sqlyog (I set it here is 123456) to log in

Related recommendations: "mysql tutorial"

The above is the detailed content of What should I do if a 1251 error occurs when sqlyog connects to Mysql?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:csdn.net
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template