Slow phpMyAdmin/MySQL import

I have two identical droplets - both 2 GB / 2 CPUs / 40 GB Disk, nyc3. Both set up with WordPress/Ubuntu 14.04. The first is a production web server that has been up for 6 months or so. The second is a new test server.

I have a 9MB (zipped) phpMyAdmin export of a MySQL table with ~2 million records. I can import this into the first server in about 3 minutes. On the second server the import causes a timeout after ~4,000 records. I set the phpMyAdmin timeout to 0, and the import has been running for at least an hour so far.

What would make these two servers act so differently?

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

It will go a lot faster if you upload the file to your server and then import it from command-line (so if you upload a file called thedumpfile.sql to your home folder):

mysql  --user=yourmysqlusername --password=yourmysqlpassword  --host=localhost thedatabasename < thedumpfile.sql