Open hieuhtr opened 7 years ago
hi, I have one question,
FLUSH TABLES WITH READ LOCK does not prevent the server from inserting rows into the log tables
what are the log tables? binary log?
Hi
I'm trying to take a snapshot so for this i run the command FLUSH TABLES WITH READ LOCK
before taking snapshot but the issue is if i close the session where i run the flush command
and start a new session then i'm able to write data in mysql DB,
Is there any way like, after closing the session the flush command
will persist and write is blocked until we run unlock tables
cc @hieuhtr
What is FLUSH TABLES WITH READ LOCK in MySQL?
Command:
What exactly does command do?
insert/update/delete/replace/alter statements
cannot runIt means:
insert/update/delete/replace/alter
statements cannot runImportant:
FLUSH TABLES WITH READ LOCK
for preparingmysqldump
, you must keep this session, and runmysqldump
in another session.binlog
and theposition
ofbinlog
may be changed during this sessionNote:
FLUSH TABLES WITH READ LOCK
does not prevent the server from inserting rows into the log tablesHow to unlock and keep MySQL back to normal?
UNLOCK TABLES
to release the lock