Importing a large database

phpMyAdmin has an upload size limit, and a large database import will fail part-way through – often leaving the database half-populated, which is worse than not starting.

Signs you have hit the limit

The import ends with no error and not everything is there, or the browser times out, or you get a maximum execution time message. If your dump file is more than a few tens of megabytes, expect this.

What to do instead

Compress it first

phpMyAdmin accepts gzip files directly. A SQL dump usually compresses to a small fraction of its size, and that alone gets many imports under the limit.

Split it

For a very large dump, splitting it into several files and importing each in turn works, provided you keep them in order.

Ask us to import it

This is usually the quickest route. Upload the dump to your account – over FTP or in File Manager – and open a ticket telling us the file name and which database to import it into. We can do it at the command line where none of these limits apply, and it takes moments.

Before importing over an existing database

An import usually drops and recreates the tables, destroying what is there. If the target database is not empty, export it first. If you meant to merge rather than replace, stop – that is a different job and an import will not do it.

Character sets

If imported text shows odd characters where apostrophes and accents should be, the dump was made with a different character set. Re-export specifying UTF-8 rather than trying to repair the text afterwards.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Managing your MySQL databases

Everything to do with databases is in cPanel, in two places: MySQL Databases for creating and...

How databases and database users are named

Database and user names are always prefixed with your cPanel account name and an underscore. You...

Creating a database and a database user

An application needs two things: a database to store data in, and a user with permission to use...

Using phpMyAdmin without breaking anything

phpMyAdmin, in cPanel, gives you direct access to your data. That is useful and it is also the...

Connecting to MySQL from your own computer

By default, databases only accept connections from the server itself. That is deliberate: it...