遠程鏈接MYSQL提示Host is not allowed to connect to this MySQL server

若是你想鏈接你的mysql的時候發生這個錯誤:mysql

ERROR 1130: Host '192.168.1.3' is not allowed to connect to this MySQL serversql

 

 受權法。例如,你想myuser使用mypassword從任何主機鏈接到mysql服務器的話。服務器

GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'%' IDENTIFIED BY 'mypassword' WITH GRANT OPTION;
若是你想容許用戶myuser從ip爲192.168.1.3的主機鏈接到mysql服務器,並使用mypassword做爲密碼ide

GRANT ALL PRIVILEGES ON *.* TO 'root'@'192.168.1.3' IDENTIFIED BY 'mypassword' WITH GRANT OPTION;this

mysql>flush privileges;  這句必定要加上!!!3d

 

相關文章
相關標籤/搜索