MySQL Error 2013

kova picture kova · Jun 18, 2009 · Viewed 36.4k times · Source

I am facing connection failure to MySQL problem when I run my program for more than couple of days.MySQL Error Code is 2013 while connecting to Database. MySQL server and client programs are both on same machine. I am using FC5 as my OS and MySQL version is 5.0.18. Can anybody throw some light on this?

I am getting mysql error 2013 while calling mysql_real_connect()...

Any help is appreciated.

Answer

spap picture spap · Sep 6, 2011

Try using localhost, instead of your own IP. I don't know why, but this immediately fixed the problem for me.

I would be very grateful if someone could clarify why this worked, all of a sudden.