Mysql 导出
作者:互联网
常规导出
常规导出导入
# 通过 gizp 压缩,
mysqldump -uroot -p -A -B | gzip > /tmp/mysql_all.tar.gz
-A, --all-databases Dump all the databases. This will be same as --databases
with all databases selected.
导出所有数据库
-B, --databases Dump several databases. Note the difference in usage; in
this case no tables are given. All name arguments are
regarded as database names. 'USE db_name;' will be
included in the output.
gzip 压缩
# 解压缩,导入
gzip -d mysql_all.tar.gz
mysql -uroot -p < /tmp/mysql_all.tar
标签:tar,--,Mysql,databases,导出,mysql,gzip 来源: https://www.cnblogs.com/Star-Haitian/p/16342427.html