MySql教程

Mysql 导出

本文主要是介绍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
这篇关于Mysql 导出的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!