Pretty straightforward
To compress mysqldump output :
mysqldump -uroot -psome_password db_name| gzip -c > db_name.gz |
or alternatively, to compress it to a file on another host
mysqldump -uroot -psome_password dbname | gzip -c | ssh user@host -p22 'cat > /root/db_name.sql.gz' |
To restore a database from a compressed file
gunzip < db_name.gz | mysql -uroot -psome_password db_name |

Categories
Tag Cloud
Blog RSS
Comments RSS
Last 50 Posts
Back
Void « Default
Life
Earth
Wind
Water
Fire
Light 
New Blog Post -> Gzip mysqldump output and gunzip it for import – http://www.zayinkrige.com/gzip-mysqldump…
That’s awesome, thanks !
THANKS!!!
[...] source: http://www.zayinkrige.com/gzip-mysqldump-output-and-gunzip-it-for-import/ [...]
Thank u so much…… it is very usefull…..:)
[...] http://www.zayinkrige.com/gzip-mysqldump-output-and-gunzip-it-for-import/ Me gusta:Me gustaSe el primero en decir que te [...]