使用mysqldump备份mysql数据库 [英] mysql database backup with mysqldump
问题描述
我想使用mysql dump备份数据库.当位置为mysql bin时,这是我在命令提示符下运行的代码.
mysqldump -u root -pabc Db -r C:\Documents and Settings\All Users\Desktop\ttttt.sql
abc是密码.我尝试备份到桌面上的.sql文件.我使用mysql 5.5.
但是发生了以下错误. mysqldump: Couldn't find table: "and"
但是数据库中没有名为``and''的表,我也没有创建这样的表,但是关于``and''表的错误提示.我如何备份mysql数据库而不会出现此错误.
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.
推荐答案
请尝试:
mysqldump -u root -pabc Db -r "C:\Documents and Settings\All Users\Desktop\ttttt.sql"
您的命令外壳程序将路径名分成多个参数.引号告诉外壳程序将所有内容作为单个参数传递给mysqldump
程序.
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.
这篇关于使用mysqldump备份mysql数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!