无法连接到RHEL 5.7上的MySQL服务器

时间:2012-02-22 04:12:12

标签: firewall redhat mysql

我有一个在Red Hat 5.7上运行的标准MySQL服务器。我已经编辑了/etc/my.cnf来指定绑定地址作为我服务器的公共IP地址。

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1

# Disabling symbolic-links is recommended to prevent assorted security risks    ;
# to do so, uncomment this line:
# symbolic-links=0

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

bind-address=171.67.88.25
port=3306

我还重启了防火墙

sudo /sbin/iptables -A INPUT -i eth0 -p tcp --destination-port 3306 -j ACCEPT
/sbin/service iptables save

从远程计算机连接时,我发出

mysql -u jeffrey -p --host=171.67.88.25 --port=3306 --socket=/var/lib/mysql/mysql.sock

但收到错误:

ERROR 2003 (HY000): Can't connect to MySQL server on '171.67.88.25' (113).

有谁知道这是为什么?我还要求网络管理员打开此框的端口3306

0 个答案:

没有答案