13

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.

2 Answers 2

18

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.

Sign up to request clarification or add additional context in comments.

2 Comments

Thank you very much. It worked. But Ealier the code I showed in my question worked well when the OS is Windows 7.But when I run the same, in windows XP, It didn't worked. I think there is something in OS as well.Your code worked well in XP .Thank you once again
It could be that Microsoft extended the shell to recognize this exact situation and spare you the quotes. But I'm not too familiar with newer Windows.
10

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.