ERROR 1130: Host ***.***.***.*** is not allowed to connect to this MySQL serverERROR 1062 (23000):
經過驗證以下方法有效
mysql -u root -p
mysql>use mysql;
mysql>select 'host' from user where user='root';
mysql>update user set host = '%' where user ='root';
mysql>flush privileges;
mysql>select 'host' from user where user='root';
第一句是以許可權使用者root登入
第二句:選擇mysql庫
第三句:檢視mysql庫中的user表的host值(即可進行連線訪問的主機/IP名稱)
第四句:修改host值(以萬用字元%的內容增加主機/IP地址),當然也可以直接增加IP地址
第五句:重新整理MySQL的系統許可權相關表
第六句:再重新檢視user表時,有修改。。
重起mysql服務即可完成。
mysql>use mysql;
mysql>select 'host' from user where user='root';
mysql>update user set host = '%' where user ='root';
mysql>flush privileges;
mysql>select 'host' from user where user='root';
第一句是以許可權使用者root登入
第二句:選擇mysql庫
第三句:檢視mysql庫中的user表的host值(即可進行連線訪問的主機/IP名稱)
第四句:修改host值(以萬用字元%的內容增加主機/IP地址),當然也可以直接增加IP地址
第五句:重新整理MySQL的系統許可權相關表
第六句:再重新檢視user表時,有修改。。
重起mysql服務即可完成。
以下百度查到的,試過可以
說明所連線的使用者帳號沒有遠端連線的許可權,只能在本機(localhost)登入。
需更改 mysql 資料庫裡的 user表裡的 host項
把localhost改稱%
具體步驟:登陸到mysql
首先 use mysql;
按照別人提供的方式update的時候,出現錯誤。
mysql> update user set host='%' where user = 'root';
ERROR 1062 (23000): Duplicate entry '%-root' for key 'PRIMARY'
然後檢視了下資料庫的host資訊如下:
mysql> select host from user where user = 'root';
+-----------------------+
| host |
+-----------------------+
| % |
| 127.0.0.1 |
| localhost.localdomain |
+-----------------------+
3 rows in set (0.00 sec)
host已經有了%這個值,所以直接執行命令:
mysql>flush privileges;
再用mysql administrator連線...成功!!!
相關文章
- MySQL-1130-host ... is not allowed to connect to this MySql serverMySqlServer
- 解決MySql報錯:1130 - Host ‘xxx‘ is not allowed to connect to this MySQL server的方法MySqlServer
- Host 'localhost' is not allowed to connect to this MySQL serverlocalhostMySqlServer
- “Host ‘xxxx‘ is not allowed to connect to this MySQL server“MySqlServer
- Host 'xxx' is not allowed to connect to this MySQL server.MySqlServer
- ERROR 1062 (23000): Duplicate entry for key 'PRIMARY'Error
- Host 'xxx' is not allowed to connect to this MySQL server 解決方法MySqlServer
- Navicat連線centos裡mysql報錯Host is not allowed to connect to this MySQL serverCentOSMySqlServer
- 關於對連線資料庫時出現1130-host “**” is not allowed to connect to this MySql/mariadb server 的錯誤解決方法資料庫MySqlServer
- 虛擬機器NAT模式下連線mysql報錯:Host '192.168.30.1' is not allowed to connect to this MySQL server虛擬機模式MySqlServer
- 從ERROR 1062 (23000) at line Duplicate entry 'R01' for key 'PRIMARY' 能看出什麼Error
- navicat無法連線遠端的mysql--Host ‘xx.xx.xx.xx‘ is not allowed to connect to this MySQL server“MySqlServer
- 上手MySQL之解決問題:not allowed to connect to this MySQL serverMySqlServer
- 連線mysql時提示is not allowed to connect不允許連線MySql
- mysql 1130 問題MySql
- ssh: connect to host localhost port 22: Connection refusedlocalhost
- Error: User gpmon is not allowed to login Command CenterError
- Error: User gpmon is not allowed to login Command Center.Error
- ERROR 1410 (42000): You are not allowed to create a user with GRANTError
- PHP Fatal error: Allowed memory size of 1610612736 bytesPHPError
- Fatal NI connect error 12170 錯誤Error
- psql: error: could not connect to server: No such file or directorySQLErrorServer
- Error:Unknow host 'service.gradle.org'ErrorGradle
- 坑:ssh: connect to host github.com port 22: Connection refusedGithub
- 異常解決——GitLab : ssh: connect to host port 22: Connection refusedGitlab
- 解決方案 | MiKTex SSL connect error code 35Error
- 執行flutter run命令報錯::ERROR: Could not connect to lockdownd, error code -17FlutterError
- 解決 ssh connect to host github.com port 22 Connection timed outGithub
- local.ERROR: Symfony\Component\Debug\Exception\FatalErrorException: Allowed memory size of 134217728ErrorException
- Error:Can't connect to SOCKS proxy:Connection refused (Connection refused)Error
- 【Linux】curl: (35) SSL connect error問題處理LinuxError
- MySQL 2003 - Can’t connect to MySQL server on (10060)MySqlServer
- linux下連線mysql報錯ERROR 2002 (HY000): Can‘t connect to local MySQL server through socket ‘/var/lib/mysqLinuxMySqlErrorServer
- SSL錯誤ssl connect error 35的解決方案Error
- 帝國CMSr的Fatal error:Allowed memory size of的解決辦法Error
- ORA-00257:archiver error. Connect internal only,until freed.HiveError
- PING[ARC5]: Heartbeat failed to connect to standby 'dghq'. Error is 12154.AIError
- 帝國cms網站Fatal error: Allowed memory size of … bytes exhausted怎麼辦?網站Error
- 帝國CMS更新時提示Fatal error: Allowed memory size of的解決方法Error