When you encounter the error shown below, it is because SQLyog adopts a new encryption method in version 8.0 or above.
Solution:
Open win + R, enter cmd, open the command line window,
and then connect to your SQLyog version of the server,
mysql -uroot -P3306 -p
Note: -P is to be capitalized, -P represents the port number of your version, generally the default is 3306, or if you change it, enter the port number you changed, here I change the port number to 13306, and then enter the installation time password.
Or when your computer has only downloaded one version of SQLyog, you can enter as follows: After entering the password, you will connect directly to the server.
mysql -uroot -p
Note: If the following error occurs when you connect to the server:
it is because the server is not started:
you can right-click the computer at this time:
click Manage, find the service, click Start, and then you can start the mysql80 server.
After starting, return to the cmd command window
and press the above
mysql -uroot -p
If your computer only has one SQL version installed, enter the above statement, enter the password, and connect to the server. If the connection is successful, the following interface will appear:
Then enter
USE mysql;
It will display Database changed, and then enter:
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'xxxxxx';
(xxxx是你的登陆密码)
Enter again
FLUSH PRIVILEGES;
That's it.
Connect again and find that the connection is successful.