Reputation: 3255
following is the that I create dump from mysql database.
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 ?
Upvotes: 42
Views: 95216
Reputation: 489
Simply type this command mysqldump -u user -p database_name_in_database > name_of_file.sql
it will ask password for user
. and there you go, your dumb file is ready. on same the location from where you run the command
Upvotes: 1
Reputation: 75704
mysqldump
can skip tables, you need the --ignore-table
parameter. Check out the manual of mysqldump
.
Upvotes: 22
Reputation: 2101
mysqldump -u <user> -p<password> --databases <dbname> -r <NameofBackup.sql>
Upvotes: 2