Jump to content

Not Connecting


unidox

Recommended Posts

I have this domain: http://daskeet.com/, and I am trying to have it remotely connect to a sql db on the deviantgaming.net server. I have this code:

 

<?php 
mysql_connect("deviantgaming.net", "username", "password") or die(mysql_error());
mysql_select_db("table") or die(mysql_error());
?>

 

But I am getting the error: Can't connect to MySQL server on 'deviantgaming.net' (10060)

 

On cpanel for deviantgaming.net I added both the domain and domain ip to the remote sql allowable ips. Any ideas?

Link to comment
Share on other sites

Some hosts will force intranet IP's for their SQL server and most of the time the SQL server does not share the same Host address as the server itself this is really common among shared hosting providers.

 

I can't really tell you because I don't know how your hosting is set up. I think I remember this being true with 1and1 hosting. and it is probably true among other shared hosting providers.

Link to comment
Share on other sites

Provided you have enough permission you could add a new user to your database allowing the remote connection. eg;

 

GRANT ALL PRIVILEGES ON *.* TO 'foo'@'remotehostiporhostname' IDENTIFIED BY 'pass' WITH GRANT OPTION;

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.