问题
连接Navicat时报错
Authentication plugin 'caching_sha2_password' cannot be loaded
原因
MySQL升级到8后,加码方式改变。
解决
- 升级Navicat
- 修改MySQL加码规则
这里选择修改加码规则的方式
mysql> grant all privileges on *.* to 'root'@'%' ;
Query OK, 0 rows affected (0.18 sec)
mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> select user,host from user;
+------------------+-----------+
| user | host |
+------------------+-----------+
| root | % |
| dduser | localhost |
| mysql.infoschema | localhost |
| mysql.session | localhost |
| mysql.sys | localhost |
| username | localhost |
+------------------+-----------+
6 rows in set (0.00 sec)
mysql> ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '123123';
Query OK, 0 rows affected (0.08 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.05 sec)