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 SettingsAll UsersDesktop tttt.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.

Asked By: Débora
||

Answer #1:

Try instead:

mysqldump -u root -pabc Db -r "C:Documents and SettingsAll UsersDesktop  tttt.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.

Answered By: Débora

Answer #2:

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

mysqldump -u root -p dbName > path
ameOfFile.sql

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

Answered By: sarnold
The answers/resolutions are collected from stackoverflow, are licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0 .



# More Articles