kb0wwp
By:
kb0wwp

Slow phpMyAdmin/MySQL import

March 4, 2015 2.9k views
MySQL Ubuntu

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.

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
Have another answer? Share your knowledge.