is this right?
mysql -uroot -ppassword mydb > myfile.sql.gz
|
|
|
|
|||||||||
|
|
The simplest way is to unzip the database file before importing. Also as mentioned by @Prof. Moriarty you shouldn't be specifying the password in the command (you'll be asked for the password). This command taken from webcheatsheet will unzip and import the database in one go:
|
|||
|
|
|
Also check if there is any USE-statement in the SQL file. Specifying the database at the command line doesn't guarantee that the data ends up there if a different destination is specified within the SQL file. |
|||
|
|
|
To display a progress bar while importing a sql.gz file, download
In CentOS/RHEL, you can install pv with |
|||
|
|