SQLyog connects to MySQL8.0.24 remote server, error: 2058 solution

Written in front:
  • I love technology, love sharing, and love life. I always believe that technology is open source and knowledge is shared!
  • Most of the content in the blog is original, it is my daily learning record and summary, so I can review it later, and of course I hope to share my knowledge. The current content is almost basic knowledge and technical introduction, if you think it is okay, you may wish to pay attention to it, and we will make progress together!
  • In addition to sharing blogs, I also like to read books, write some daily essays and share my mood. If you are interested, you can also pay attention!
  • WeChat public account: Mr. Proud Deer

SQLyog connects to the Linux remote server and displays an error of 2058

This error occurs because the default authentication plug-in in mysql8.0 has been changed. It used to be mysql_navtive_password, but now it has been changed to caching_sha2_password

Solution:

If you are connected locally, enter the following command on the mysql command line

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

If you are remotely connecting to the mysql server, then enter the following command. First of all, your database user table must have the% data in the host field.

ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'password';

password should be replaced with your mysql password

The host field represents the address where you can access this database, localhost represents local access, and% represents remote access

connection succeeded: