Remote Database Connection

Status
Not open for further replies.

ShoutX

New Member
Messages
14
Reaction score
0
Points
0
I have two sites, one is hosted here, and another I am part owner of, and is hosted at a different hosting company. Anyways, both have cPanel, but the other host has cPanel Build "11.12.0-CURRENT 17327", but it still is the cPanel 10 skin. I'm not sure if that means anything.

My site here was moved from a separate host, due to the limited resources they offered. For my site, I need to connect to a forum, which is on the other host, to get the post count number. When I moved my account here, I started to play with cPanel, to configure it to allow the file that is on this server to connect to the sql which is on another server. However, I cannot get a connection.

After 45 seconds of loading, (my internet speed is over 5 MBPS, so it's a long time), an error pops up. So I stripped down the file, just to have the connection, and the same error pops up. Here is the output.

Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'Other Site IP' (4) in /home/shoutx/public_html/DBTest.php on line 2
I cannot connect to the database because: Can't connect to MySQL server on 'Other Site IP' (4)

As you can see, I removed the IP of the other host, as I figured if I didn't do it, one of the staff would.

So, does anyone know why this isn't working? I have configured cPanel at the other sites to allow for these two IP's, but I'm not sure if any of them are correct.

74.86.116.187
74.86.133.24

If anyone can help, I'd greatly appreciate it.

Thanks.
 

Corey

I Break Things
Staff member
Messages
34,551
Reaction score
204
Points
63
We need to add the IP of where you are trying to connect to, to our firewall.

-Corey
 

alfred

New Member
Messages
87
Reaction score
0
Points
0
You could also do a mysql dump (from phpmyadmin- if your other webhost has it) and "import" the dump file on x10hosting's mysql server. That would make a far more locallized connection.
 

ShoutX

New Member
Messages
14
Reaction score
0
Points
0
Alfred- I thought about that, but it would only be as current as it was when I moved the data. The forum post count will update.

And Corey, here you are:
70.85.209.146

Everytime I post a topic here, you guys reply back so fast. Best support I've ever seen.
 
Last edited:

Corey

I Break Things
Staff member
Messages
34,551
Reaction score
204
Points
63
I added that IP to our firewall. Let us know if it works.

-Corey
 

ShoutX

New Member
Messages
14
Reaction score
0
Points
0
It still doesn't work.

Although this has worked in the past on the other host, I'll contact them. Maybe they put up a firewall, and I didn't know about it.
 

Corey

I Break Things
Staff member
Messages
34,551
Reaction score
204
Points
63
Let us know if you need further assistance.

Also as a test try adding % on the other side to the allowed hosts.

-Corey
 
Status
Not open for further replies.
Top