MySQL : How to lock all write in all databases? [closed]

I need to block all writes (insert , update, delete) on all databases.
How can I do that ?
Put all database in Read Only for a period time.

Answer

A quick search results in the correct chapter of the manual with:

mysql> FLUSH TABLES WITH READ LOCK;
mysql> SET GLOBAL read_only = ON;

Attribution
Source : Link , Question Author : AssoumaniSaïd , Answer Author : HBruijn

Leave a Comment