Client does not support authentication protocol requested by server

About the problem of Client does not support authentication protocol requested by server caused by different version numbers

Searched for similar questions and got answers similar to the following

mysql>SET PASSWORD FOR
'root'@'localhost' = OLD_PASSWORD('newpassword');

But after these methods are tried, they will prompt syntax errors, as follows:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'odl_password('123456')' at line 1

Looking around for this, I found a suitable method:

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '你的密码';
FLUSH PRIVILEGES;

After this, the client suddenly connects to the server


mutual encouragement

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325729197&siteId=291194637