- 论坛徽章:
- 0
|
各位好,
在網內想在不同的機器就遠端登錄到特定的mysql機器上. 但是失敗的.會出現錯誤如下:
- [root@localhost root]# mysql -h 192.168.0.9 -uroot -p
- Enter password:
- ERROR 1130: Host '192.168.0.9' is not allowed to connect to this MySQL server
- [root@localhost root]#
复制代码
MySQL 服務器 192.68.0.9
例如需要192.168.0.0 這個網域的才可以遠端登錄到 MySQL 服務器上.
我已經在 iptables 開啟了 port 口 3306 如:
- iptables -A INPUT -i eth1 -s 192.168.0.0/24 -p tcp -m tcp --dport 3306 -j ACCEPT
复制代码
但當測試是否開通 3306 時出現
- root@localhost:~/bin# telnet 192.168.0.9 3306
- Trying 192.168.0.9...
- Connected to 192.168.0.9.
- Escape character is '^]'.
- GHost '192.168.0.9' is not allowed to connect to this MySQL serverConnection closed by foreign host.
- root@localhost:~/bin#
复制代码
請問怎樣才可以使做遠端登錄到 MySQL 服務器上呢?? 請指教. 謝謝. |
|