[Solved] Sqlyog always reports an error when creating a new connection.

Case 1:

In versions before MySQL 8, the encryption rule is mysql_native_Password, and after MySQL 8, the encryption rule is caching_sha2_password。 There are two ways to solve the problem. The first is to upgrade the graphical interface tool version, and the second is to restore the MySQL user login password encryption rules to MySQL_native_password.
the second solution is as follows. After logging into MySQL database with the command line, execute the following command to modify the user password encryption rules and update the user password. Here, modify the user name as“ root@localhost ”The user password rule of is “mysql_native_password”, and the password value is “OK”, as shown in the figure.

//Using mysql database
USE mysql; 

//change the password rule and password for the 'root'@'localhost' user
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'ok'; 

//refresh permissions
FLUSH PRIVILEGES;

Situation II

The virtual machine MySQL is connected, and you need to perform the authorization operation
authorize the root user:
grant all on. To ‘root’ @ ‘%’ identified by ‘use password’
flush privileges;

Read More: