SOLVED MySQL remote access

ThGe

Member
Oct 11, 2013
9
5
53
cPanel Access Level
Root Administrator
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
 
Last edited by a moderator:

andrew.n

Well-Known Member
Jun 9, 2020
674
209
43
EU
cPanel Access Level
Root Administrator
How about the firewall on CentOS 6? Is it allowing outgoing connections to 3306?
 
  • Like
Reactions: ThGe