I have mysql working on a server (lets say ServerA) and am trying to access it from another server (lets say ServerB).
The mysql connection works perfectly with localhost calls from same server.
It also works perfectly if I call it from my local windows system, and yet another online linux server (lets say ServerC).
But it does not connect from ServerB.
Error that I get is:
Can't connect to MySQL server on 'xx.xx.xx.xx' (115)
xx.xx.xx.xx being the ip of ServerB.
I have given remote access to this ip on the ServerA already (I had to give same access to my local system ip and also the ServerC ip in order to make them work).
I also did a test that even if I remove the remote access for the ServerB still the error message keeps saying:
Can't connect to MySQL server on 'xx.xx.xx.xx' (115)
While on the other hand, if I remove access for my local system ip (my internet ip) or for my ServerC ip, it immediately gives me the error:
Host 'xx.xx.xx.xx' is not allowed to connect to this MySQL server
My guess is that, the ServerB has some setting which is blocking the request to go out, is that possible?
The ServerB is a simple hosting server with below details:
cPanel Version: 110.0 (build 17)
Apache Version: 2.4.58
MySQL Version: 10.2.44-MariaDB-cll-lve
Architecture: x86_64
Operating System: linux
Kernel Version: 5.4.0-1105-gke
While the host server that has the mysql db (ServerA) is also a simple hosting server with below details:
cPanel Version: 110.0 (build 15)
Apache Version: 2.4.58
MySQL Version: 5.7.44-cll-lve
Architecture: x86_64
Operating System: linux
Kernel Version: 2.6.32-954.3.5.lve1.4.93.el6.x86_64
Does someone have any idea why mysql connection is blocked from ServerB only?