0

I've installed WAMP on my new Windows 8 machine and for some reason when I use PHPMyAdmin to import an sql file (it's only about 5mb), it takes several minutes before timing out. And then when I check I can see it's only imported a fraction of the tables.

I've tried other sql files and it's the same story. These same sql files import perfectly fine (and in a few couple of seconds) on my Windows 7 machine also running WAMP.

I've since uninstalled WAMP and tried XAMPP, and the problem still exists. Even just browsing the databases with PHPMyAdmin takes a long time between page loads.

I am guessing it's a problem with MySQL. Any suggestions would be helpful.

3
  • try changing localhost to 127.0.0.1 and see what happens
    – MrTechie
    Dec 21, 2012 at 23:44
  • I had already tried 127.0.0.1
    – PHPnoob
    Dec 22, 2012 at 0:51
  • It may be something about your MySQL server configuration. Are you using MyISAM tables? If you do, try increasing the key buffer size (I don't know which is the equivalent variable for InnoDB tables). Check the MySQL reference for server optimization: dev.mysql.com/doc/refman/5.5/en/optimization.html
    – Barranka
    Dec 22, 2012 at 1:06

3 Answers 3

2

When MySQL is really slow on windows (not 30ms slower) is nearly always a matter of a forgotten localhost instead of 127.0.0.1 in settings or URL. Very few times it is due to a very slow fragmented hard drive (acting slower due to windows complex ACL and parallel processes using it). MySQL is slower in some benchmarks on windows but the difference is so small that cant change your experience.

0

I had the same problem some time ago. The problem, in my case, it was not the address but the IPV6. Try to disable it.

0

In your PHP code, you can speed up your script a ton by making a small adjustment to your db connection variable (hopefully in a separate .php file to make portability easier). For the host name, use "127.0.0.1" instead of "localhost". This bypasses DNS lookup for an instantaneous response (on simple short queries anyway).

Hope this helps!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.