Knowledge base / Web hosting /

How to import database dump of a big size? PhpMyAdmin fails with Gateway Timeout 504 error.

​504 error in PhpMyAdmin means that php interpreter exceeds script execution time limit (limited for security reasons).

If you have SSH access provided by your hosting plan, follow these instructions:

- if database dums was compressed (zip, gz, tar.gz, bz2), uncompress it (should be with .sql extension). You may do that with any favorite archive manager or trough console, for example with command "unzip dump.zip" for zip achived dump.

- paste dump.sql file in any place you can easy to remember.

- execute command:

mysql -uUSERNAME -pPASS -f DATABASE < /path/dump.sql

Where "USERNAME" - login and PASS - password of new database user where dump is will be imported. 

"/path/dump.sql" - absolute or relative path to uncompressed dump file.

If you are experiencing difficults with console operating, contact with data center UNIT-IS technical support by providing dump file location and database account details and we will do it for you.