log_slave_updates在线修改

时间:2023-03-09 01:26:54
log_slave_updates在线修改

http://planet.mysql.com/entry/?id=20450

  1. mysql> show variables like 'log_slave_updates';
  2. +-------------------+-------+
  3. | Variable_name     | Value |
  4. +-------------------+-------+
  5. | log_slave_updates | OFF   |
  6. +-------------------+-------+
  7. 1 row in set (0.00 sec)
  8. mysql> set global log_slave_updates=1;
  9. ERROR 1238 (HY000): Variable 'log_slave_updates' is a read only variable
    1. mysql> system gdb -p $(pidof mysqld) -ex "set opt_log_slave_updates=1" -batch
    2. mysql> show variables like 'log_slave_updates';
    3. +-------------------+-------+
    4. | Variable_name | Value |
    5. +-------------------+-------+
    6. | log_slave_updates | ON |
    7. +-------------------+-------+