SQL Error (1130): Host IP is not allowed to connect to this MySQL server

通過HeidiSQL連接MYSQL數據庫報錯:
SQL Error (1130): Host ‘192.168.1.100’ is not allowed to connect to this MySQL server
說明所連接的用戶帳號沒有遠程連接的權限,只能在本機(localhost)登錄。

需更改 mysql 數據庫裏的 user表裏的 host項
把localhost改稱%

首先按下面的步驟登錄Mysql服務器

登錄mysql需要切換到dos下的mysql的bin目錄,進行如下操作:

mysql>use mysql;

mysql>update user set host = ‘%’ where user =’root’;

mysql>flush privileges;

mysql>select ‘host’,’user’ from user where user=’root’;

mysql>quit
OK。遠程連接成功!
這裏寫圖片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章