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
本文来自博客园, 作者:Star-Hitian, 转载请注明原文链接:https://www.cnblogs.com/Star-Haitian/p/16342427.html