Débora
Débora

Reputation: 5952

mysql database backup with mysqldump

I want to backup my database using mysql dump. This is the code I run in Command prompt when the location is mysql bin.
mysqldump -u root -pabc Db -r C:\Documents and Settings\All Users\Desktop\ttttt.sql
abc is the password. and I try to backup to a .sql file in desktop. I use mysql 5.5.
But the following error occured. mysqldump: Couldn't find table: "and"
But there is no table called 'and' in database and I didn't create such a table.But the error say about a 'and' table. How can I back up mysql database without this error.

Upvotes: 12

Views: 24088

Answers (2)

gprathour
gprathour

Reputation: 15333

I think there is some problem with syntax of command you are running. try something like this :

mysqldump -u root -p dbName > path\nameOfFile.sql

It will automatically ask for your password. You don't need to write it in command.

Upvotes: 10

sarnold
sarnold

Reputation: 104050

Try instead:

mysqldump -u root -pabc Db -r "C:\Documents and Settings\All Users\Desktop\ttttt.sql"

Your command shell is breaking apart the pathname into multiple arguments. The quotes tell the shell to pass it all as a single argument to the mysqldump program.

Upvotes: 17

Related Questions