mysql 1130通過Navicat for MySQL遠程連接的時候報錯
錯誤代碼是1130,ERROR 1130: Host xxx.xxx.xxx.xxx is not allowed to connect to this MySQL server 是無法給遠程連接的用戶權限問題
www.2cto.com
給用戶授權
我用的用戶是root 密碼123456
首選語法為:
Sql代碼
GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'%' IDENTIFIED BY 'mypassword' WITH GRANT OPTION;
示例:
Sql代碼
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;
www.2cto.com
執行完後,再
mysql:flush privileges;
刷新一下權限就可以了,不用重啟
完整操作:
開始->運行->cmd
cd\
cd mysql安裝目錄\bin
mysql -u root -p123456;
mysql GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;
mysql flush privileges;
作者 heisetoufa