報錯:1130-host ... is not allowed to connect to this MySql server 開放mysql遠端連線 不使用localhost
MySQL伺服器的遠端連結設定有兩種方法:
一、改表法。
可能是你的帳號不允許從遠端登陸,只能在localhost登入。這個時候只要在localhost的那臺電腦,登入mysql後,更改 "mysql" 資料庫裡的 "user" 表裡的 "host" 項,從"localhost"改把host更改為"%"
a. bin/mysql -uroot-p密碼
b. usemysql----->showtables;------>select host, user fromuser;
c. updateuser set host = '%' where user = 'root';
(ERROR 1062 (23000): Duplicate entry '%-root' for key 'PRIMARY'
不予理會)
d. flush
privileges;
二、授權法。
例如,你想myuser使用mypassword從任何主機連線到mysql伺服器的話。
GRANT ALLPRIVILEGES ON *.* TO 'myuser'@'%' IDENTIFIED BY 'mypassword' WITHGRANT OPTION;
如果你想允許使用者qikai從ip為172.22.254.1的主機連線到mysql伺服器,並使用123456作為密碼 .
GRANT ALLPRIVILEGES ON *.* TO 'qikai'@'172.22.254.1' IDENTIFIED BY'123456' WITH GRANT OPTION;
相關文章
- mysql遠端連線 Host * is not allowed to connect to this MySQL serverMySqlServer
- Navicat連線centos裡mysql報錯Host is not allowed to connect to this MySQL serverCentOSMySqlServer
- Host 'localhost' is not allowed to connect to this MySQL serverlocalhostMySqlServer
- 解決mysql Navicat 出錯:1130-host . is not allowed to connect to this MySql server,MySqlServer
- navicat無法連線遠端的mysql--Host ‘xx.xx.xx.xx‘ is not allowed to connect to this MySQL server“MySqlServer
- mysql 開放遠端連線許可權連不上MySql
- 虛擬機器NAT模式下連線mysql報錯:Host '192.168.30.1' is not allowed to connect to this MySQL server虛擬機模式MySqlServer
- 連線mysql時提示is not allowed to connect不允許連線MySql
- 關於對連線資料庫時出現1130-host “**” is not allowed to connect to this MySql/mariadb server 的錯誤解決方法資料庫MySqlServer
- mysql開啟遠端連線MySql
- Host is not allowed to connect to this MySQL server 錯誤的處理方法MySqlServer
- 解決MySql報錯:1130 - Host ‘xxx‘ is not allowed to connect to this MySQL server的方法MySqlServer
- MySQL-1130-host ... is not allowed to connect to this MySql serverMySqlServer
- 遠端連線MYSQLMySql
- 連線MySQL錯誤:Can't connect to MySQL server (10060)MySqlServer
- 上手MySQL之解決問題:not allowed to connect to this MySQL serverMySqlServer
- MYSQL遠端連線配置MySql
- 配置 MySQL 遠端連線MySql
- MYSQL配置遠端連線MySql
- mysql遠端連線命令MySql
- MySQL遠端連線ERROR 2003 (HY000) Cant connect to MySQL server on (10060)MySqlErrorServer
- Host 'xxx' is not allowed to connect to this MySQL server.MySqlServer
- mysql遠端連線不上怎麼解決?MySql
- navicat連線遠端伺服器docker的mysql容器時連不上報錯伺服器DockerMySql
- MySQL 本地連線遠端伺服器報錯 2003MySql伺服器
- MySQL連線提示Can't connect to local MySQL server through socketMySqlServer
- 命令列遠端連線mysql命令列MySql
- mysql遠端連線設定MySql
- mysql 遠端無法連線MySql
- Windows 使用VSCode遠端連線到Linux開發除錯MySQLWindowsVSCodeLinux除錯MySql
- 允許mysql遠端使用者連線。MySql
- 騰訊雲安裝mysql遠端連線不上解決MySql
- Xtrabackup備份報錯Failed to connect to MySQL serverAIMySqlServer
- windows 遠端連線Linux進行開發與除錯MySQLWindowsLinux除錯MySql
- 連線mysql報錯lost connect to sever during query解決MySql
- 遠端連線mysql資料庫MySql資料庫
- MySQL資料庫遠端連線開啟方法MySql資料庫
- 雲伺服器MySQL開啟遠端連線伺服器MySql