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.

I am Arjun from Hyderabad (India). I have been working as a software engineer from last 7+ years, and its my passion to learn new things and implement them as a practice. Aside from work, I likes gardening and spending time with pets. Protection Status