PHP cannot connect to MySql server on Windows 7
If you're struggling to get your php application to connect to a MySql server
running on localhost, while you still can confirm the MySql daemon
is up and running (by using mysqladmin), you might want to try
connect to 127.0.0.1 instead of localhost, because
that mapping seems to be removed in
Windows 7 .