Importing large .sql files with phpmyadmin

Got this error message when I was trying to import a large (Drupal) SQL-file with PhpMyAdmin:

You probably tried to upload too large file. Please refer to documentation for ways to workaround this limit

While my SQL dump size wasn’t close to my host limit!

My solution was to first clean the Drupal database (login as user one to your drupal site, and browse to update.php. Then execute the Drupal database update.

This way the cache_menu table is cleaned and the db dump file should be significant smaller. My dump went from 120MB to 11MB (uncompressed).

After this cleaning I exported my sql dump file again using gzip compressing. This dump file could be imported with no hassle to my newly created database.

Leave a Reply