Knowledgebase

Splitting a Large Database Export Print

  • databasesphpmyadmin, databases, database, phpmyadmin, uploads, migration, guide, howto
  • 0

When the file is too big to handle.

WHEN THIS ARISES

A database too large for phpMyAdmin's upload limit An export that times out An import that fails partway

THE BETTER ANSWER

Use the command line. It has no such limits and is the correct tool.

IF YOU CANNOT

Export tables in groups rather than all at once. In phpMyAdmin's Export tab, select a subset of tables.

Import them in the same groups.

EXCLUDING LARGE TABLES

Statistics, log and session tables are frequently most of the size and rarely need migrating.

Export the structure without the data for those, and the data for everything else.

The application recreates their contents.

COMPRESSING

A gzipped dump is a fraction of the size and frequently comes under the upload limit.

phpMyAdmin can import compressed files directly.

ORDER MATTERS

If tables reference each other, import in an order that satisfies those relationships, or disable foreign key checks during the import.

For most content applications this is not an issue.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot