Fixing Database Connection working slow on windows 8

Today I just want to share one useful tip on fixing slow database connection issue on Windows 8 machines.Today I got this issue on my machine after new installation of LAMP stack. After playing around with the configurations of database config file I find a simple fix, We just need to replace the “localhost” with “” IP, that is it.
With this little trick, you can get rid of the delay between each query execution.

Instead of this:
$mysqli = new mysqli("localhost", "user", "password", "database");

Use this:
$mysqli = new mysqli("", "user", "password", "database");

If you want to fix the delay on PHP MyAdmin you need to add the following line at the bottom of the “xampp/phpMyAdmin/” file.

$cfg['Servers'][$i]['host'] = '';

I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face - we are here to solve your problems.

Leave a Reply

Your email address will not be published.