how to dump sql.gz file in to mysql
You should tell gunzip
to write to standard out. What you are doing right now is not going to pipe any output at all.
gunzip -c dbdump.sql.gz | mysql (args...)
I know this is ridiculous, but it was gzipped twice, so
- Extract
filename.sql.gz
- Rename extracted file from
filename.sql
tofilename.gz
- Extract again
Hope it will work
We can achieve the same with the below command as well. Here i am using gzip
gzip -d < dbdump.sql.gz | mysql (args..)
Another way is as given below
gzip -c dbdump.sql.gz | mysql (args..)