Remote MySQL connection not working for inmotionhosting

Category: Cpanel

RajaSekhar
Asked:
2013-07-18 5:55 am EST

Hits: 937
<?php
$con = mysql_connect("74.124.214.199","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.

OTHER ANSWERS

0

johnpaulb-imhs1
Staff
8,310 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,

-John-Paul

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

Like this Question?

Related Articles

It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Need more Help?

Search

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: support@InMotionHosting.com
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!