0

I am trying to establish a remote MySQL connection from one VPS to another.

I have tried and done everything, I have allowed the outgoing TCP port (3306) in csf.conf, I have used Iptable rules online and of course have allowed remote MySQL from the host I am trying to establish to.

Here are some fsockopen's I have done for checking if the port is retrievable:

fsockopen("REMOTE_SERVER", 3306, $err, $err, 3); 
Return:  fsockopen(): unable to connect to REMOTE_SERVER:3306 (Connection timed out) 

I have confirmed that my remote host is not blocked by doing the following:

fsockopen("REMOTE_SERVER", 80, $err, $err, 3); //connects to port 80 fine

I have also allowed remote connections from my home network and am able to successfully connect to my remote MySQL server.

I have spent the last three or so hours trying everything to understand where the blockage lays.

Anyone else here ever come across an odd issue like this?

  • 1
    What type of VPS? Have you contacted them and asked if there are any special hoops to jump through to allow internal communications? – NickW Jan 5 '15 at 14:46
  • I have a centOS 5 VPS which I use cPanel for. It's provided by Voxility. – Tom Doobies Jan 5 '15 at 14:48
  • I have not contacted them regarding it, they don't offer much support and especially in convenience. – Tom Doobies Jan 5 '15 at 14:53
  • I have tried connecting from four other VPS servers, they connect through fine. You made a good point, I need to contact my host. – Tom Doobies Jan 5 '15 at 15:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.