HowTo : Restore MySQL Database From the Command Line
Do not use phpMyAdmin to restore your MySQL database if the MySQL database is large.
phpMyAdmin has limit on total upload size and, there is also maximum execution time which may cause browser to time out.
The solution of how to restore large MySQL database from the sql dump file is to use Linux/Unix command line.
Restoring an existent Database
If you need to restore a database that has already been existed on the server, than you have to use 'mysqlimport' command.
The syntax for 'mysqlimport' :
Restoring a new Database
1. Create an appropriately named Database on the target server.
mysql> CREATE DATABASE customers_db;
2. Load the sql dump file using the 'mysql' command :
If the sql dump file is compressed, you can do the following :