MySQL remote access
I have migrated a Centos 6 server to a Centos 7 server, the Centos 6 server can connect to the db on the new Centos 7 server.
We have another Centos 6 server that gets "Connection refused" when trying to connect to the Centos 7 server with the same db user.
telnet domain 3306 gets "connection refused" from both Centos 6 servers.
Despite that I have added the IP to Additional MySQL Access Hosts and added 3306 tcp/udp to csf on the Centos 7 server, I have also restarted MySQL.
I have added the IP of Centos 7 in Remote Mysql in cpanel for the specific users on the 2:nd Centos 6 server.
What have I missed?
The centos 6 server with the moved data can still access the Centos 7 db, with the firewall ports opened or not.
The my.conf file on the Centos7 server is:
[mysqld]
performance-schema=0
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
symbolic-links=0
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
innodb_buffer_pool_size=134217728
max_allowed_packet=268435456
open_files_limit=40000
innodb_file_per_table=1
-
How about the firewall on CentOS 6? Is it allowing outgoing connections to 3306? 0 -
That did the trick, thank you very much. Its odd that the first Centos 6 server could connect to the Centos 7 without the ports being open... 0 -
I'm happy it was so easy :) 0 -
Yup, if telnet itself wasn't able to connect, that would indicate a firewall issue and not a service-level problem such as a MySQL issue. I'm glad that's all it was! 0
Please sign in to leave a comment.
Comments
4 comments