简体   繁体   中英

Why won't my MySQL command line dump on an individual table work? (but I can dump a full db)

I am running WAMP on Windows 7 and accessing MySQL command line to do some MySQL work. I cannot get the commands for dumping a specific table working (note: I already selected the db with USE db_name):

This works perfectly fine for doing a full db dump:

mysql> mysqldump -u root -p  db_name > output_db_name.sql

But I cannot dump a specific table like so:

mysql> mysqldump -u root -p  db_name table_name > output_table_dump.sql

Goes to

->
->

I tried many variations and I can't get it to output.

If you are not experienced with a command-line environment, you should use MySQL Workbench . It's a free GUI application that runs on Windows, Mac, and Linux.

To dump a given table in a given database, you can choose the "Data Export" function, and then select individual databases and tables.

在此输入图像描述

The GUI runs mysqldump for you. The output is that of mysqldump, so it's 100% compatible with any way you could produce the dump at the command-line.

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