Solved: SQLyog remotely connects to MySQL8 on the cloud server. Several versions report Error No.1251

Article directory

Problem Description

  1. SQLyog remotely connects to MySQL8 on the cloud server. Error No.1251 is reported in several versionsinsert image description here
  2. Check the server environment first, first ensure that mysql on the cloud server starts normally, release the port, release the database remote connection restrictions, and release the SQLyog port, (I have released all of the above, but still report an error)
  3. After investigation, the encryption rules of several versions of mysql 8 are different from the previous encryption specifications of mysql8, and the difference between the client and server versions is too large

solution

  1. Start the mysql client and enter the command line
  2. Enter after mysql> (enter the following three commands one at a time, and press Enter) as follows:
ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER; #修改加密规则

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'; #更新一下用户的密码,password为自己想要输入的密码例如'123456'

FLUSH PRIVILEGES; #刷新权限

Guess you like

Origin blog.csdn.net/qq_43408367/article/details/130378460