简体   繁体   中英

mysqldump not recognizing database name?

I am trying to export all of the tables of one of my databases "gamestore" located on localhost, to an xml file. I open command prompt as administrator and run this command:

C:\Program Files\MySQL\MySQL Server 8.0\bin>mysqldump --xml -u root -p gamestore > backup.xml;

I am prompted for a password, and I enter the correct one, but then I'm given an error:

mysqldump: Couldn't find table: ";"

I'm not sure what's causing this. Any advice?

If I reenter the command as:

C:\Program Files\MySQL\MySQL Server 8.0\bin>mysqldump --xml -u root -p --databases gamestore > backup.xml;

and enter the correct password, I still get an error:

mysqldump: Got error: 1049: Unknown database ';' when selecting the database

Just get rid of the trailing semicolon in your command.

During parsing of > backup.xml; the Windows command processor turns it into effectively

mysqldump --xml -u root -p --databases gamestore ;

with the redirection enabled, and MySQLDump gets confused about that now-extra semicolon.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM