chetan
chetan

Reputation: 3255

create dump file from database in mysql

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

Answers (4)

Eimantas
Eimantas

Reputation: 49344

mysqldump -u user -p some_database > some_database_dump.sql

Upvotes: 55

Ali Raza
Ali Raza

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

soulmerge
soulmerge

Reputation: 75704

mysqldump can skip tables, you need the --ignore-table parameter. Check out the manual of mysqldump.

Upvotes: 22

Kishore Guruswamy
Kishore Guruswamy

Reputation: 2101

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

Upvotes: 2

Related Questions