Mysql
 sql >> Datenbank >  >> RDS >> Mysql

Führen Sie MySQLDump aus, ohne Tabellen zu sperren

Tut die --lock-tables=false Option funktioniert?

Gemäß der Manpage , wenn Sie InnoDB-Tabellen ausgeben, können Sie die --single-transaction verwenden Möglichkeit:

--lock-tables, -l

Lock all tables before dumping them. The tables are locked with READ
LOCAL to allow concurrent inserts in the case of MyISAM tables. For
transactional tables such as InnoDB and BDB, --single-transaction is
a much better option, because it does not need to lock the tables at
all.

Für innodb DB :

mysqldump --single-transaction=TRUE -u username -p DB