mysql备份数据库的方式是什么

1、备份所有数据库:

shell>mysqldump -uroot -p --all-database > all.sql

2、备份数据库test

shell>mysqldump -uroot -p test > test.sql

3、备份数据库test下的表emp

shell> mysqldump -uroot -p test emp > emp.sql

4、备份数据库test下的表emp和dept

SmartB2B行业电子商务 SmartB2B行业电子商务

SmartB2B 是一款基于PHP、MySQL、Smarty的B2B行业电子商务网站管理系统,系统提供了供求模型、企业模型、产品模型、人才招聘模型、资讯模型等模块,适用于想在行业里取得领先地位的企业快速假设B2B网站,可以运行于Linux与Windows等多重服务器环境,安装方便,使用灵活。 系统使用当前流行的PHP语言开发,以MySQL为数据库,采用B/S架构,MVC模式开发。融入了模型化、模板

SmartB2B行业电子商务 0 查看详情 SmartB2B行业电子商务
shell> mysqldump -uroot -p test emp dept > emp_dept.sql

5、备份数据库test下的所有表为逗号分割的文本,备份到 /tmp:

shell> mysqlddump -uroot -p -T /tmp test emp --fields-terminated-by ','
shell> more emp.txt  
 
1,z1
2,z2
3,z3
4,z4

以上就是mysql备份数据库的方式是什么的详细内容,更多请关注其它相关文章!

本文转自网络,如有侵权请联系客服删除。