MySQL Forums
Forum List  »  Newbie

Re: error 2002 (connection attempt failed)
Posted by: Rick James
Date: September 13, 2014 10:00AM

In summary...

mysql –h192.168.0.10 –ujeremy –pmypasswordhere
works, but the equivalent in PHP with mysql_connect fails to see the mysql server on that IP address:

> the connected party did not properly respond after a period of time
> (trying to connect via tcp://192.168.0.10:3306)

This points the finger at PHP. What version of PHP are you using? Study all the options in php.ini. (I can't think of any that would relate to this.)

> //DO NOT EDIT BELOW THIS LINE

This smells like a 3rd party piece of software. If so, see if they can help you. And while you are at it, point out that the mysql interface is deprecated and needs to be replaced by the mysqli interface.

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.