1209 - The MySQL server is running with the--read-only option so it cannot execute this statement

刚好遇见Mysql / 2023-08-02 / 原文

从库 对表做truncate 时报1209 - The MySQL server is running with the--read-only option so it cannot execute this statement

处理:

select @@read_only;

set global read_only=0;

truncate table *.*

set global read_only=1;