解決mysql Navicat 出錯:1130-host . is not allowed to connect to this MySql server,
解決Navicat 出錯:1130-host . is not allowed to connect to this MySql server,MySQL
1. 改表法。
可能是你的帳號不允許從遠端登陸,只能在localhost。這個時候只要在localhost的那臺電腦,登入mysql後,更改 "mysql" 資料庫裡的 "user" 表裡的 "host" 項,從"localhost"改稱"%"
mysql -u root -p
mysql>use mysql;
mysql>update user set host = '%' where user = 'root';
mysql>select host, user from user;
注:個人覺得不太適用!
2. 授權法。
例如,你想myuser使用mypassword從任何主機連線到mysql伺服器的話。
GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'%' IDENTIFIED BY 'mypassword' WITH GRANT OPTION;
FLUSH PRIVILEGES;
如果你想允許使用者myuser從ip為192.168.1.6的主機連線到mysql伺服器,並使用mypassword作為密碼
GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'192.168.1.3' IDENTIFIED BY 'mypassword' WITH GRANT OPTION;
FLUSH PRIVILEGES;
如果你想允許使用者myuser從ip為192.168.1.6的主機連線到mysql伺服器的dk資料庫,並使用mypassword作為密碼
GRANT ALL PRIVILEGES ON dk.* TO 'myuser'@'192.168.1.3' IDENTIFIED BY 'mypassword' WITH GRANT OPTION;
FLUSH PRIVILEGES;
我用的第一個方法,最後執行一個語句 mysql>FLUSH RIVILEGES 使修改生效.就可以了
另外一種方法,不過我沒有親自試過的,在csdn.net上找的,可以看一下.
在安裝mysql的機器上執行:
1、d:/mysql/bin/>mysql -h localhost -u root //這樣應該可以進入MySQL伺服器
2、mysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION //賦予任何主機訪問資料的許可權
3、mysql>FLUSH PRIVILEGES //修改生效
4、mysql>EXIT //退出MySQL伺服器
這樣就可以在其它任何的主機上以root身份登入啦!
相關文章
- Navicat連線centos裡mysql報錯Host is not allowed to connect to this MySQL serverCentOSMySqlServer
- 上手MySQL之解決問題:not allowed to connect to this MySQL serverMySqlServer
- 報錯:1130-host ... is not allowed to connect to this MySql server 開放mysql遠端連線 不使用localhostMySqlServerlocalhost
- 關於對連線資料庫時出現1130-host “**” is not allowed to connect to this MySql/mariadb server 的錯誤解決方法資料庫MySqlServer
- Host 'xxx' is not allowed to connect to this MySQL server 解決方法MySqlServer
- 解決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 is not allowed to connect to this MySQL server 錯誤的處理方法MySqlServer
- mysql遠端連線 Host * is not allowed to connect to this MySQL serverMySqlServer
- MySQL-1130-host ... is not allowed to connect to this MySql serverMySqlServer
- navicat無法連線遠端的mysql--Host ‘xx.xx.xx.xx‘ is not allowed to connect to this MySQL server“MySqlServer
- Host 'xxx' is not allowed to connect to this MySQL server.MySqlServer
- “Host ‘xxxx‘ is not allowed to connect to this MySQL server“MySqlServer
- SQL Error (1130): Host IP is not allowed to connect to this MySQL serverErrorMySqlServer
- 虛擬機器NAT模式下連線mysql報錯:Host '192.168.30.1' is not allowed to connect to this MySQL server虛擬機模式MySqlServer
- 解決Can 't connect to local MySQL server through socket '/tmp/mysql.sock '(2) "MySqlServer
- Xtrabackup備份報錯Failed to connect to MySQL serverAIMySqlServer
- service mysql start出錯,mysql啟動不了,解決mysql: unrecognized service錯誤MySqlZed
- 連線MySQL錯誤:Can't connect to MySQL server (10060)MySqlServer
- Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock錯誤MySqlServer
- 解決MySQL server has gone away錯誤的解決方案MySqlServerGo
- Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)解決方法MySqlServer
- MySQL問題記錄--Can't connect to MySQL server on localhost (10061)解決方法MySqlServerlocalhost
- Navicat 連線 MySQL 失敗:2002-can‘t connect to server on localhost(10061)問題解決MySqlServerlocalhost
- Can't Connect to MySQL Server on IP Address (10061) 錯誤的解決方案MySqlServer
- 解決Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future:MySqlREM
- 連線mysql時提示is not allowed to connect不允許連線MySql
- mysql 啟動報錯Can't connect to local MySQL server through socket '/data/mysql/mysql/mysql.sock'(111)MySqlServer
- 連線mysql報錯lost connect to sever during query解決MySql
- DBeaver、Navicat、MySQL高頻報錯及解決方法,此文持續更新MySql
- navicat for mysql顯示中文亂碼解決方案MySql
- navicat本地連線mysql出現1251--Client does not support authentication protocol requested by server的解決方法MySqlclientProtocolServer
- 【MySQL篇】Navicat匯入SQL大檔案報錯終極解決方案MySql
- navicat連線MySQL8.0.11報2059錯誤的解決方案MySql
- MySQL 5.5 關閉資料庫報錯"Can't connect to local MySQL server through socket"MySql資料庫Server
- 【linux】Can't connect to MySQL server on 'XXX' (13)問題解決方式LinuxMySqlServer
- mysql 8.0 使用 navicat 登入報錯MySql
- 【MySQL】解決mysql的 1594 錯誤MySql