Linux 下使用Dump操作MySQL數據庫

Exporting a Compressed MySQL Dump

This command will dump a MySQL database, compress it on-the-fly and save it to a file. Replace keywords between { and } with their proper values (while also removing the brackets of course).

1
mysqldump -u {user} -p {database} | gzip > {database}.sql.gz

Usually I prefer to use a slightly different variation and prepend the date. This is useful if you’ve done a dump before and want to avoid overwriting it, etc. And most importantly: its cleaner. 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章