InMotion Hosting Support Center

Remote MySQL connection not working for inmotionhosting

Category: Cpanel

2013-07-18 5:55 am EST

Hits: 1,269
$con = mysql_connect("","scanco5_test","xxxxxx");
/* This particular connection query from a different web server isn't working, inspite of me giving access to that IP at RemoteMySQL section in cpanel. Is there any mistake in the query?

You must login before you can ask a follow up question.

You must login before you can submit an answer.



30,388 Points
2013-07-18 12:14 pm EST
Hello RajaSekhar,

Thank you for your question. If you are having problems connecting to a database remotely, and have already added the IP address of the connecting server to the remoteMYSQL connections, then I recommend reading our article on connecting to a database using PHP.

It gives a working example of the code you can use. Make sure you are updating the Hostname to the domain name of the site hosting the Database.

If you have any further questions, feel free to post them below.
Thank you,


You must login before you can post a comment about this answer.

Like this Question?

Support Center Login

Our Login page has moved, Click the button below to be taken to the login page.

Social Media Login

Social Login Joomla

Need more Help?


Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail:
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!