当前位置:网站首页>MySQL slave error: "you cannot 'alter' a log table“

MySQL slave error: "you cannot 'alter' a log table“

2022-06-28 13:45:00 Data ape

MySQL Slave Library Error:“You cannot ‘Alter’ a log table…”

Error 'You cannot 'ALTER' a log table if logging is enabled' on query. Default database: 'mysql'. Query: 'ALTER TABLE slow_log

The cause of the error is

mysql_upgrade All statements executed are recorded as binary records , Then copy it to slave, Result in an error 

Solution one :

Stop the copy thread , Turn off slow query log , The current error is recoverable

stop slave;
set global slow_query_log="OFF";
start slave;
set global slow_query_log="ON";

Solution two :

Skip this error step

stop slave;
#  Use the command to skip the current error statement ,sql_slave_skip_counter You can specify how many steps to skip 
set global sql_slave_skip_counter=1;
start slave;
原网站

版权声明
本文为[Data ape]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/179/202206281337096927.html

随机推荐