Tag Archives: MYSQL 8.0

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

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

Solution:
1 vim /etc/my.cnf add the following content:
[mysqld]
default_authentication_plugin=mysql_native_password

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