tags:

views:

12

answers:

1

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.

  • will the standalone installation of MySQL help?
  • what are your advises?
+1  A: 

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".

Levon Mirzoyan
heh, forgot about this kind of solution. thank you.
nefo_x