mysql报错:The MySQL server is running with the --read-only option

1,104 阅读1分钟

mysql报错:The MySQL server is running with the --read-only option so it cannot execute this statement

是因为有人锁库了,设置为只读模式,所以才会出现上述问题

解决办法:

-- (关掉新主库的只读属性)
set global read_only=0;  
flush privileges; 
-- (开启新主库的只读属性)
set global read_only=1;
flush privileges;