简体   繁体   中英

Mysqldump of single table returns errno 32

I need to do a mysqldump of a single table from one server to another.

If I dump the entire db all goes well:

 mysqldump {database_name} | mysql -h {host_name} -u {user_name} -p{password} {database_name}

But if I try to dump a single table like this:

mysqldump {database_name} {table} | mysql -h {host_name} -u {user_name} -p{password} {database_name} {table}

I get: "mysqldump: Got errno 32 on write".

Does anybody have an idea what is causing this?

Thanks

Error 32 is "broken pipe". It means that the reading process exited before reading everything that was written to the pipe.

The problem is that you're giving incorrect arguments to the mysql command. It shouldn't have a table name at the end of it. It just executes the commands that are in the dump file that was piped to it. When you put the table name in the mysqldump command, the dump file will just contain that one table.

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