无法连接到*。*。*。*(10060)上的MySQL服务器

时间:2016-04-02 09:46:39

标签: mysql rhel7

我在RHEL服务器7.0中安装了MySQL 5.7.11。我可以使用命令提示符访问数据库,但我无法通过MySQL工作台远程登录它。 my.cnf文件放在/etc文件夹中,看起来像这样

# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html
#max_connections = 250
[mysqld]
max_connections = 250
#
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
#
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
#
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
join_buffer_size = 128M
sort_buffer_size = 2M
read_rnd_buffer_size = 2M
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0

log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

bind-address = 10.106.100.230
lower_case_table_names = 1

I have even given grant access to root user but still of no use.

1 个答案:

答案 0 :(得分:1)

有两种情况可以解决此问题:您尝试连接的计算机未在服务器的防火墙上列入白名单,或者MySQL服务器已关闭

在你的情况下,它可能是一个网络问题,所以这里有一些你想检查的事情:

1-验证每台计算机是否可以ping另一台计算机并验证端口是否已打开(例如,使用Telnet

2-确保防火墙没有阻止与MySQL侦听端口的连接,如果是这样,请将其添加到防火墙的解锁/例外列表iptables

3-从bind-address = 10.106.100.230文件中删除my.cnf

4-在Unix / Linux论坛中提出你的问题;你会得到更多的帮助