Posted by & filed under Internet Information Server, MySQL, PHP, Windows / Server.

One of the reasons why a PHP / MySQL combo seems so “slow” with regards to response times when moving from Windows 2003 (IIS6) to Windows 7/2008 (IIS7) / 2012 (IIS8), is the way many scripts connect to MySQL and having IPv6 enabled by default.

Many server installations leave WordPress or other PHP script installs to default to “localhost” when connecting to MySQL. Windows 7, 2008, 2012 have an issue with resolving localhost when IPv6 is enabled. With, the initial response time from MySQL goes from 600ms (using localhost) down to 70ms (using

If your issue is initial response time, but MySQL seems to function well otherwise, your connection string may be at fault. Instead of disabling IPv6, try changing “localhost” to “″  in your scripts and see if the response times improve.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>