从库状态:
错误日志:
说明:start slave后,SQL_slave_skip_counter自动改回0。
疑问: 从库有相关外键,为什么删除报错呢?
- mysql> show slave status \G
- *************************** 1. row ***************************
- Slave_IO_State: Waiting for master to send event
- Master_Host: 10.128.45.8
- Master_User: slave
- Master_Port: 3306
- Connect_Retry: 60
- Master_Log_File: mysql-bin.000037
- Read_Master_Log_Pos: 166473700
- Relay_Log_File: mysqld-relay-bin.000096
- Relay_Log_Pos: 88687390
- Relay_Master_Log_File: mysql-bin.000035
- Slave_IO_Running: Yes
- Slave_SQL_Running: No
- Last_Errno: 1091
- Last_Error: Error 'Can't DROP 'FK_Reference_15'; check that column/key exists' on query. Default database: 'storefeedback'. Query: 'ALTER TABLE `second_division` DROP FOREIGN KEY `FK_Reference_15`
- 2015-06-26 23:57:39 2804 [ERROR] Slave SQL: Error 'Can't DROP 'FK_Reference_11'; check that column/key exists' on query. Default database: 'storefeedback'. Query: 'ALTER TABLE `division` DROP FOREIGN KEY `FK_Reference_11`', Error_code: 1091
- 2015-06-26 23:57:39 2804 [Warning] Slave: Can't DROP 'FK_Reference_11'; check that column/key exists Error_code: 1091
- 2015-06-26 23:57:39 2804 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START\". We stopped at log 'mysql-bin.000035' position 88680824
解决同Last_Errno: 1051
http://blog.csdn.net/u010587433/article/details/46706099
- mysql> stop slave;
- Query OK, 0 rows affected (0.01 sec)
- mysql> set GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
- Query OK, 0 rows affected (0.00 sec)
- mysql> start slave;
- Query OK, 0 rows affected (0.01 sec)
疑问: 从库有相关外键,为什么删除报错呢?