MySQL 在mysql中从数据库创建转储文件

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2537486/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 15:39:31  来源:igfitidea点击:

create dump file from database in mysql

mysqldump

提问by chetan

following is the that I create dump from mysql database.

以下是我从 mysql 数据库创建转储。

mysqldump -u root tempbkk > ttt.dump

but I want to create a dump that exclude one or more file while creating dump from database we select.What is the command for that ?

但我想在从我们选择的数据库中创建转储时创建一个排除一个或多个文件的转储。

采纳答案by soulmerge

mysqldumpcan skip tables, you need the --ignore-tableparameter. Check out the manual of mysqldump.

mysqldump可以跳过表,需要--ignore-table参数。查看 的手册mysqldump

回答by Eimantas

mysqldump -u root some_database > some_database_dump.sql

mysqldump -u root some_database > some_database_dump.sql

回答by Kishore Guruswamy

mysqldump -u <user> -p<password> --databases <dbname> -r <NameofBackup.sql>