記錄一下安裝使用MySql8.0以及允許Navicat11遠端連線
阿新 • • 發佈:2019-02-06
1.新建my.ini和data資料夾
建立my.ini 複製以下內容,注意修改路徑,建立data資料夾
[mysqld] basedir=E:/Program Files/MySQL/MySQL Server 8.0 datadir=E:/Program Files/MySQL/MySQL Server 8.0/data port = 3306 character-set-server=utf8 #忘記密碼時使用 #skip-grant-tables #設定協議認證方式 default_authentication_plugin=mysql_native_password [mysql] default-character-set=utf8
2.將mysql資料庫user表裡的root使用者的host改成%
update user set host='%' where user='root';
3.允許root使用者遠端訪問
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'IDENTIFIED BY '密碼' WITH GRANT OPTION;
4.Navicat11連線mysql8報錯Client does not support authentication protocol requested by server; consider upgrading MySQL client
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '密碼';
FLUSH PRIVILEGES;