Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MySQL Error 2013

Status
Not open for further replies.

wmichael

IS-IT--Management
Oct 2, 2003
103
US
Howdy all;

Complete noob here.

I set up a PHP/Apache MySql install on a Win XP machine. The server works fine, PHP is donig it's thing. When I try to fire up MySQL (version 5.0), I get the following;

ERROR 2013 (HY000) Lost Connection to MySQL server during query

This happens from both the command line and the admin GUI. I am quite sure of the user name and password.

Any thoughts? Other online forums indicate this is an issue, but provide no solutions that I can see.

Thanks much!


~wmichael

"small change can often be found under seat cushions
 
Further info:

I can telnet to 3306 when i turn of f my internet security, but lose connectivity almost immeditaely.

~wmichael

"small change can often be found under seat cushions
 
I don't use Windows and I've never had an issue on Linux.

One question. You said you telnet to 3306. Telnet is port 23. The mysql server by default runs on 3306. Not sure what you're trying to do there.

OS aside, it sounds like the user/password you're using from the php program does not have rights to whatever database you're trying to use. Try this...

>cd c:\mysql\bin
>mysql -uroot -p
>(type password if one exists)
>GRANT ALL PRIVILEGES ON databasename.* TO username@localhost IDENTIFIED BY "password" WITH GRANT OPTION;

The "WITH GRANT OPTION" is optional. Keep the double-quotes around password, and don't forget the semi-colon at the end.

Of course replace the username and password in the sql statement with the user/pass from the php program.

Mark
 
Kozusnik,

Telnet can be for any port. It's simple a way to test connectivity. "Telnet localhost 3306" produces results in this case. If you do not specify a port, then you will default to 23. Another example is issuing a telnet command on port 25 and sending an EHLO or HELO command to a mail server.

I would do what you suggest, but I cannot stay connected long enough to issue commands.

Thanks anyway.

~wmichael

"small change can often be found under seat cushions
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top