Here’s how to make a MySQL database read only.
mysql> FLUSH TABLES WITH READ LOCK; mysql> SET GLOBAL read_only = ON; |
It’s very useful if creating a replica database.
cloud engineer
Here’s how to make a MySQL database read only.
mysql> FLUSH TABLES WITH READ LOCK; mysql> SET GLOBAL read_only = ON; |
mysql> FLUSH TABLES WITH READ LOCK; mysql> SET GLOBAL read_only = ON;
It’s very useful if creating a replica database.