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.
1251 client does not support authentication protocol requested by server;consider upgrading Mysql client ERROR 1396 (HY000): Operation ALTER USER failed for 'root'@'localhost'
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; #刷新权限
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!