Linux 下使用Dump操作MySQL数据库

来源:互联网 发布:天正看图软件 编辑:程序博客网 时间:2024/05/18 03:01

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.                                              <div class= 0 0

原创粉丝点击