Bug #12957 Unable to connect to MySQL through IP
Submitted: 2 Sep 2005 19:49 Modified: 2 Sep 2005 21:05
Reporter: [ name withheld ] Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.0.7-beta-Debian_1 OS:Linux (Debian Sarge)
Assigned to: CPU Architecture:Any

[2 Sep 2005 19:49] [ name withheld ]
Description:
MySQL is running fine on my server, running several systems, but I cannot run PHP scripts or Java programs from another computer. When I try the command "telnet localhost 3306", I get a normal message
"Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
A
5.0.7-beta-Debian_1"
But after a few seconds, I get some random strange characters and a message "Connection closed by foreign host".
This is happening with versions 4 and 5 of the mysql server.
The first trouble I had was with the line "127.0.0.1      localhost.localdomain   localhost" in my hosts file. I got another error message. According to the bug descriptions, I changed it to "127.0.0.1 localhost localhost", and reinstalled all mysql.

How to repeat:
Install Mysql on Debian Sarge, and try to rn PHP scripts from another computer.
[2 Sep 2005 21:05] Jorge del Conde
What you're experiencing is to be expected when telnet is used to connecto to mysql and you should one of mysql's clients to connect to mysql.

The problem you're experiencing with your java and php scripts is because you don't have the correct user privileges set up.  Read our manual and things will seem clearer then.
[2 Sep 2005 21:05] Jorge del Conde
We're sorry, but the bug system is not the appropriate forum for 
asking help on using MySQL products. Your problem is not the result 
of a bug.

Support on using our products is available both free in our forums
at http://forums.mysql.com and for a reasonable fee direct from our
skilled support engineers at http://www.mysql.com/support/

Thank you for your interest in MySQL.