MySQL master-Slave synchronization problems (1032)

Source: Internet
Author: User

event_scheduler effects on master and slave:
1 for the existing master-slave, the new establishment events have no effect. 2 for the newly established master and slave, if there is events, then you need to set the Event_scheduler from the library to off.
When upgrading from the library to the main library, consider the event to change the status of the event to Enable:alter event Event_test_insert enable;

Here we in the decision from the time I met the above error, tangled up my long time, has not been resolved, suddenly one day I saw an article here

Both the main library and the library have an event, and when turned on, it affects the master-slave synchronization

mysql>  Select from information_schema.events; +------------------+----------+--------------+| Event_Name       | status   | Event_schema |+------------------+----------+--------------+| E_status_check   | ENABLED | huamu_db     | | E_status_check   | ENABLED | Huamu_licai  | | e_upd_total_user | ENABLED | Huamu_licai  |+------------------+----------+--------------+


3 Rows in Set (0.00 sec)

Here I find that the event I recovered from the library to the vault was actually turned on.

Here I need to change the status of my event from the library to the closed state.

Mysql> Alter event Huamu_licai.e_status_check disable on slave;
Query OK, 0 rows Affected (0.00 sec)

Mysql> Alter event Huamu_db.e_status_check disable on slave;
Query OK, 0 rows affected (0.01 sec)

Mysql> Alter event Huamu_licai.e_upd_total_user disable on slave;
Query OK, 0 rows Affected (0.00 sec)
Mysql> Select Event_Name, Status,event_schema from Information_schema.events;
+------------------+--------------------+--------------+
| Event_Name | Status | Event_schema |
+------------------+--------------------+--------------+
| E_status_check | slaveside_disabled | huamu_db |
| E_status_check | slaveside_disabled | Huamu_licai |
| E_upd_total_user | slaveside_disabled | Huamu_licai |
+------------------+--------------------+--------------+
3 Rows in Set (0.00 sec)

There are three kinds of event states here.
[ENABLE | DISABLE | DISABLE on SLAVE]

But when it's time to switch to the main library, we need to turn these event

Original Digest from:

http://blog.itpub.net/25099483/viewspace-1745466/

Http://www.linuxidc.com/Linux/2012-11/74644.htm

https://www.zhihu.com/question/26471158?sort=created

MySQL master-Slave synchronization problems (1032)

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.