Tuesday, April 12

Disable full write on MySQL slave replication

 Below parameters need to change in the MySQL slave or read-only replica.


SET GLOBAL read_only = ON;

SET GLOBAL super_read_only = ON;

SHOW VARIABLES WHERE Variable_Name LIKE "%read_only";


To make it persistent, Add below variables in my.cnf/my.ini


read_only = 1

super_read_only = 1