本文使用解压版mysql8.0安装后密码默认为空
登录mysql
mysql -uroot -p;
直接回车,密码默认为空,出现输入password直接回车即可登录
use mysql;
修改 user 表 中的 authentication_string 的值 (该值就是密码)
alter user 'root'@'localhost' identified by 'root';
刷新权限
flush privileges;
地址:解决Navicat for MySQL 连接 Mysql 8.0.11 出现1251- Client does not support authentication protocol 错误