MySQL replication Prompt error cannot ALTER a log table

Source: Internet
Author: User

The MySQL Replication encountered the following error message: (mysql> show slave status\g # simplified message below)

last_errno:1580
Last_error:error ' You cannot ' ALTER ' a log table if logging are enabled ' on query. Default database: ' MySQL '. Query: ' ALTER
TABLE Slow_log ...
last_sql_errno:1580
Last_sql_error:error ' You cannot ' ALTER ' a log table if logging are enabled ' on query. Default database: ' MySQL '. Query: ' ALTER TABLE slow_log ...


MySQL Replication encounters Error ' You cannot ' ALTER ' a log table if logging is enabled ' in query. Repair

This article has the writing solution:

MySQL replication Error ' You cannot ' ALTER ' a log table if logging are enabled ' on query

It appears to be the problem caused by the show_query_log of MySQL, first turn off and let him perform the following steps:

1.SHOW SLAVE Status\g # See what the problem is
2.STOP SLAVE;
3.SET GLOBAL slow_query_log = ' off '; SET GLOBAL sql_log_bin = 0; # First turn off the
4.START SLAVE;
5.SHOW SLAVE Status\g # to see if the normal start of the
6.SET GLOBAL slow_query_log = ' on '; SET GLOBAL sql_log_bin = 1; # change it back
7. To complete

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.