user3605780
user3605780

Reputation: 7072

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

Upvotes: 1

Views: 976

Answers (1)

Barmar
Barmar

Reputation: 780798

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.

Upvotes: 1

Related Questions