1.MySQL修改密码
set password for root@localhost = password(‘新密码’);
2.navicat for mysql 登录时候报:
Client does not support authentication protocol requested by server;
解决办法
命令如下:
1、use mysql;
2、alter user 'root'@'localhost' identified with mysql_native_password by '********'
3、flush privileges;
原因:
mysql8 之前的版本中加密规则是mysql_native_password,而在mysql8之后,加密规则是caching_sha2_password,
解决问题方法有两种:
方法1.升级navicat驱动;
方法2.把mysql用户登录密码加密规则还原成mysql_native_password.
官方文档地址:
https://dev.mysql.com/doc/refman/8.0/en/data-directory-initialization-mysqld.html