How to dump a single table in MySQL without locking?

When I run the following command, the output consists only of the create syntax for "mytable", but none of the data:

mysqldump --single-transaction -umylogin -p mydatabase mytable > dump.sql

If I delete -single-transaction, I get an error because I cannot lock the tables.

If I delete "mytable" (and make DB), it looks like it creates INSERT statements, but the whole DB is huge.

Is there a way to reset a table - schema and data - without locking the table?

(I also tried to enter OUTFILE, but also did not have access to this.)

+3
source share
1 answer

, . InnoDB . , , .

, , . , , . , , . , 10 000 , , . , .

, , , , , .

+2

Source: https://habr.com/ru/post/1734334/


All Articles