2058 error solution when SQLyog connects to MySQL

 Configure a new connection to report an error: error number 2058, the analysis is that the mysql password encryption method has changed.


Solution: log in to mysql -u root -p under windows, log in to your mysql database, and then execute this SQL:

 ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'; #password

is the root you set yourself Password

and then reconfigure the connection of SQLyog, the connection can be successful, it is OK.

The following provides two methods to solve "'mysql' is not an internal or external command, nor a runnable program or batch file when connecting to mysql in cmd":

method one:

First, run the services.msc command,

The second step, find the MySQL service, right-click to open the properties, copy the executable file path to the bin section,

The third step, right-click My Computer -> Properties -> Advanced System Settings -> Environment Variables,

Add a new variable to the path variable, and the variable value is C:\Program Files\MySQL\MySQL Server 8.0\bin; in this way, the mysql command can be used directly.

Method Two:

After running cmd

Enter cd C:\Program Files\MySQL\MySQL Server 8.0\bin and press Enter

At this point, it has entered the C:\Program Files\MySQL\MySQL Server 8.0\bin directory,

Execute mysql -u root -p and press Enter

Enter the database password to enter mysql.

I am very happy to solve a problem. I will summarize the methods given by the big guys on the Internet, and knock on a blog to calm down.



Related Posts