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)