# Database Discussions > MySQL >  Can't connect to MySQL server on 'localhost' (10061)

## paperclip

Hi all,

*Server in question:*
WinServer 2003 (x64)
IIS6.0
PHP5
MySQL Server 5.0

*The problem:*
I am receiving the following error message: 


```
Warning: mysql_pconnect() [function.mysql-pconnect]: Can't connect to MySQL server on 'localhost' (10061) in E:\domains\e\esite.co.uk\user\htdocs\_DEV\ES_Website\search\settings\database.php on line 10
Cannot connect to database, check if username, password and host are correct.
```

This website was working last week and for some reason now it is not working. It is safe to assume that I have changed something but I'm not sure what.

Whats interesting is that the error message points to a database.php file on a drive that does not exist on my server. I'm confused as to where it got the path from.

I have two seperate sights running from the same server both using the same installation of MySQL. The other website works fine and can interact with the MySQL installation without any problems.

I can access MySQL using the command line with: mysql -u root -p: ***** and the login script details within the database.php match the username and password used to access the MySQL database via command line.

I would welcome any thoughts in troubleshooting this confusing issue.

Regards,

P.

----------


## kennethl

Hi,

You can find your answer here. Good luck!

http://wiki.navicat.com/wiki/index.p...xxx%27_(10061)

Kenneth

----------

