Reputation: 3088
I'm running Windows, having installed IIS 7.5, PHP 5.3 (FastCGI). Trying to connect to MySQL and getting an error "A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.".
Started to develop a project with XAMPP, but had the requirement to move it to IIS (because of AD auth). MySQL is running from XAMPP stack. I've mapped IIS to the same docroot as Apache2's, but to another port. When accessing test page server with Apache2 host - there is no problem, but when accessing IIS + PHP FCGI page - I get this error.
Upvotes: 2
Views: 3489
Reputation: 143
try using "127.0.0.1" instead of "localhost" as MySQL host. Just saved my life XD XD XD
Upvotes: 0
Reputation: 461
In your script, try using "127.0.0.1" instead of "localhost" as MySQL host.
If this solves your problem you can add the following line to your hosts file in /Windows/System32/drivers/etc/hosts:
127.0.0.1 localhost
After that you will able to use "localhost".
Upvotes: 6