本文使用解壓版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 錯誤