Sqlog connect to MySQL 8.0.24 remote server, error: 2058 solution

Write in front:

  I love technology, love sharing, love life, I always believe: technology is open source, knowledge is shared!   Most of the content in the blog is original. It is my daily learning record and summary, which is convenient for me to review later. Of course, I hope I can share my knowledge. The current content is almost basic knowledge and technology introduction, if you think it’s OK, you might as well pay attention to it, we make progress together!   In addition to sharing blog, I also like to read books, write some daily essays and share my mood. If you are interested, you can also pay attention!   WeChat official account: Mr.
, proud proud deer.  

Sqlog connect Linux remote server to display 2058 error

The reason for this error is that the default authentication plug-in in mysql8.0 has been changed   mysql_ navtive_ Password, now it’s caching_ sha2_ password


If you are a local connection, enter the following command on the MySQL command line

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

If you are a remote connection server mysql, then enter the following command. First of all, you must have% in the user table of your database and the host field

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

Change the password to your MySQL password

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

Connection successful:

Read More: