Found great answer how to backup data from whole table.
But for testing purpose I want to COPY
only partial data from this table.
When using PostgreSQL I can do:
echo "COPY( SELECT * FROM \"${TABLE}\" ${WHERE} ) TO STDOUT \
WITH( FORMAT CSV, HEADER )" |\
psql -h ${DB_HOST} -p ${DB_PORT} -U ${DB_USER} ${DB_NAME}
How this could be done at mysql world?