MySQL_errors

MySQL

版本:MySQL8.0.11

系统:MacOS 10.14.1

Q1:Unable to load authentication plugin ‘caching_sha2_password’.

​ datagrip连接的时候连接不到,原因是mysql8.0之前的版本用的是mysql_native_password, 但mysql8.0之后的版本连接使用的密码是caching_sha2_password。

————————————————————2018.12.5—————————————————————————

解决:

1
2
3
4
5
6
7
8
9
10
11
mysql> ALTER USER 'test'@'localhost' IDENTIFIED BY '1234' PASSWORD EXPIRE NEVER; 
Query OK, 0 rows affected (0.08 sec)

mysql> ALTER USER 'test'@'localhost' IDENTIFIED WITH mysql_native_password BY '1234';
Query OK, 0 rows affected (0.03 sec)

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)

mysql> alter user 'root'@'localhost' identified by '1234';
Query OK, 0 rows affected (0.01 sec)
给咱来个🍰,啾咪