This blog post will discuss how to use the MySQL super_read_only system variable.
It is well known that replica servers in a master/slave configuration, to avoid breaking replication due to duplicate keys, missing rows or other similar issues, should not receive write queries. It’s a good practice to set
read_only=1
on slave servers to prevent any (accidental) writes. Servers acting as replicas will NOT be in read-only mode automatically by default.
Sadly,
read_only
has an historical issue: users with the SUPER privilege can override the setting and could still run DML queries. Since Percona Server 5.6.21 and MySQL 5.7.8, however, you can use the
super_read_only
feature to extend the
read_only…[Read more]