Jump to content
The Uniform Server Community
Crypton

[FIX] Slow MySQL on Windows7

Recommended Posts

Hello,

 

I've noticed that MySQL performance was really bad (i.e. took seconds to load simple page) after moving my website from 3rd-party hosting provider to my own server which was running on UniServer. First, I thought that MySQL was badly configured, so I've tried to tweak the config file (mostly upping allowed memory usage, etc.) after reading a few tutorials.

 

It didn't help and reinstalling UniServer to the most recent version didn't help either. Today, I've started measuring the php script execution time and I found out that the problem isn't caused by bad configuration or UniServer itself, but Windows 7's IPv6 issue.

 

Changing from "localhost" to "127.0.0.1" when connecting to MySQL (i.e. calling mysql_connect) solves the speed problem. Improving speed from ~1.23 sec to ~0.0073sec.

 

The problem is described in this post:

http://www.bluetopazgames.com/uncategorize...host-windows-7/

 

Why I'm posting this here? This issue is pretty common, but can be easily detected using a script, so I think that it would be great if UniServer could detect this issue after startup. :)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...