Navicat连接不上MySQL 8.0

Navicat连接不上MySQL 8.0

更改加密方式

1.先通过命令行进入mysql的root账户:

C:\Windows\system32> mysql -uroot -p

2.更改加密方式:

mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER;
Query OK, 0 rows affected (0.10 sec)
3.更改密码:

mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
Query OK, 0 rows affected (0.35 sec)
4.刷新:

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

posted @ 2021-02-25 14:35  人生苦短,知足常乐!  阅读(274)  评论(0编辑  收藏  举报