ITPub博客

首页 > 数据库 > MySQL > 同步故障Last_Errno: 1091

同步故障Last_Errno: 1091

原创 MySQL 作者:xishuai236 时间:2015-06-29 10:26:20 0 删除 编辑
从库状态:
  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'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`
错误日志:
  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.itpub.net/26831783/viewspace-1709708/
  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。
疑问:
从库有相关外键,为什么删除报错呢?

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/26831783/viewspace-1715774/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: mysql最大连接数
下一篇: 没有了~
请登录后发表评论 登录
全部评论

注册时间:2014-01-10

  • 博文量
    9
  • 访问量
    17187