Skip to main content

How can I import a big dump file?

If the database dump is very large, we recommend importing it via SSH.

First, you have to create the database, the user and the password.

After that, you have to upload the dump file to the server. E.g., you can use FTP.

To import the file, use the following command:

mysql -uUSER -pPASSWORD DBNAME < /var/www/USER_NAME/data/dump.sql
  • USER is the database user.
  • PASSWORD is the user's password.
  • DBNAME is the database name.
  • /var/www/USER_NAME/data/ is the path to the database dump.
  • dump.sql is the name of the MySQL dump file.

If you are importing the dump using the pv utility, you can watch the import progress.

pv /var/www/USER_NAME/data/dump.sql | mysql -uUSER -pPASSWORD DBNAME