Unknown MySQL server host 'localhost' (11001)
Posted on 2013-06-13
Hi, I have a mysql database application with a PHP font end.
Suddenly I am now getting the following error in my web browser when I access a page which includes a mysql connection:
Warning: mysql_connect() [function.mysql-connect]: Unknown MySQL server host 'localhost' (11001) in <path on local hard drive> on line 13
Could not conneft to MySQL: Unknown MySQL server host 'localhost' (11001)
When I first access the application it all works fine but after about a dozen clicks (accessing of different pages/records) I locks up and I get the error.
When I try to connect the MySQL using the query browser I get the error:
Could not connect to the specified instance. MySQL Error Number 2005
Unknown MySQL server host 'locolhost' (110001)
When I ping localhost from the MySQL Query Browser I get "unable to resolve localhost" but I can still access the first web page in my browser which does not use a mysql connection so the localhost name is still resolved.
To add to this it will all suddenly start working again after about 5 -10 minutes. It's as if the connection cuts in and out!
Any help appreciated. Thank you.