mysql 只读配置的含义


  –read_only         Make all non-temporary tables read-only, with the
exception for replication (slave) threads and users with
the SUPER privilege

SUPER privilege :

The SUPER privilege enables an account to use CHANGE MASTER TO , KILL or mysqladmin kill to kill threads belonging to other accounts (you can always kill your own threads), PURGE BINARY LOGS , configuration changes using SET GLOBAL to modify global system variables, the mysqladmin debug command, enabling or disabling logging, performing updates even if the read_only system variable is enabled, starting and stopping replication on slave servers, specification of any account in the DEFINER attribute of stored programs and views, and enables you to connect (once) even if the connection limit controlled by the max_connections system variable is reached.

To create or alter stored routines if binary logging is enabled, you may also need the SUPER privilege, as described in Section 18.6, “Binary Logging of Stored Programs” .



1. 对replication threads例外,以保证slave能够正常的进行replication。

2. 对于拥有super权限的用户,可以ignore这个选项。

SUPER 权限 : 1. 可以有change master to, kill其他用户的线程的权限。

2. Purge binary logs 来删除binary log, set global来动态设置变量的权限。

3. 执行mysqladmin debug命令,开启或者关闭log,在read-only打开时执行update/insert操作。

4. 执行start slave, stop slave.

5. 当连接数已经达到max_connections的最大值时,也可以连接到server。

Comment (1)

  1. Pingback: mysql master HA solution: one master, one candidate master, and multiple slaves configuration | 香蕉与打火机

Leave a Comment

电子邮件地址不会被公开。 必填项已用*标注