Question

Slow phpMyAdmin/MySQL import

Posted March 4, 2015 7.1k views
UbuntuMySQL

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?

1 comment
  • Have you checked that the two droplets have the same settings in their php.ini files? Also I would recommend reviewing your apache log files for any indication of what may be causing the issue.

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.

×
1 answer

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
Submit an Answer