MYSQL 8.0 Login Error: caching_sha2_password [How to Solve]

problem causes:
1 In the past, the mysql password authentication plug-in was mysql_native_passwd
2 After mysql8.0 version, the password authentication plug-in uses caching_sha2_password

Modify the password authentication method and change back to the mysql_native_passwd plug-in

1 vim /etc/my.cnf add the following content:

2 Log in to mysql and execute the following sql:
ALTER USER'root'@'%' IDENTIFIED WITH mysql_native_password BY'password';
flush privileges;

Similar Posts: