Contents
How do I make MySQL read only?
Put the source S1 in a read-only state by executing these statements on it:
- mysql> FLUSH TABLES WITH READ LOCK; mysql> SET GLOBAL read_only = ON;
- mysql> SET GLOBAL read_only = OFF; mysql> UNLOCK TABLES;
- mysql> FLUSH TABLES WITH READ LOCK; mysql> SET GLOBAL read_only = ON;
Why is MySQL table read only?
When trying Edit Table Data in MySQL Workbench 5.2. 37, its in read only mode. It is editable only if the table has a primary key.
When to enable read only in MySQL replication?
When it is enabled, the server permits no updates except from users that have the SUPER privilege or (on a slave server) from updates performed by slave threads. In replication setups, it can be useful to enable read_only on slave servers to ensure that slaves accept updates only from the master server and not from clients.
How does master and slave replication work in MySQL?
MySQL Master-Slave Replication on the Same Machine. MySQL replication is a process that enables data from one MySQL database server (the master) to be copied automatically to one or more MySQL database servers (the slaves).
Should a replication slave be set to read only?
In replication setups, it can be useful to enable read_only on slave servers to ensure that slaves accept updates only from the master server and not from clients. Thus, anyone with SUPER privilege can read and write at will to such a Slave… Make sure all non-privileged users do not have the SUPER Privilege.
What happens when MySQL slave is read only?
When a Slave is read-only, it is not 100% shielded from the world. According to MySQL Documentation on read-only This variable is off by default. When it is enabled, the server permits no updates except from users that have the SUPER privilege or (on a slave server) from updates performed by slave threads.