同步故障Last_Errno: 1091

从库状态:
  1. mysql> show slave status \G
  2. *************************** 1. row ***************************
  3.                Slave_IO_State: Waiting for master to send event
  4.                   Master_Host: 10.128.45.8
  5.                   Master_User: slave
  6.                   Master_Port: 3306
  7.                 Connect_Retry: 60
  8.               Master_Log_File: mysql-bin.000037
  9.           Read_Master_Log_Pos: 166473700
  10.                Relay_Log_File: mysqld-relay-bin.000096
  11.                 Relay_Log_Pos: 88687390
  12.         Relay_Master_Log_File: mysql-bin.000035
  13.              Slave_IO_Running: Yes
  14.             Slave_SQL_Running: No
  15.                    Last_Errno: 1091
  16.                    Last_Error: Error 'Can'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`
错误日志:
  1. 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
  2. 2015-06-26 23:57:39 2804 [Warning] Slave: Can't DROP 'FK_Reference_11'; check that column/key exists Error_code: 1091
  3. 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

  1. mysql> stop slave;
  2. Query OK, 0 rows affected (0.01 sec)
  3. mysql> set GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
  4. Query OK, 0 rows affected (0.00 sec)
  5. mysql> start slave;
  6. Query OK, 0 rows affected (0.01 sec)
说明:start slave后,SQL_slave_skip_counter自动改回0。
疑问:
从库有相关外键,为什么删除报错呢?
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

上海阿丽

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值