MySQL报错:Last_Errno: 1008 | Last_SQL_Errno: 1008
发表于:2025-11-07 作者:千家信息网编辑
千家信息网最后更新 2025年11月07日,MySQL主从复制不能同步,查看slave状态,报错如下:mysql> show slave status \G*************************** 1. row *********
千家信息网最后更新 2025年11月07日MySQL报错:Last_Errno: 1008 | Last_SQL_Errno: 1008
MySQL主从复制不能同步,查看slave状态,报错如下:
mysql> show slave status \G*************************** 1. row *************************** Slave_IO_State: Waiting for master to send event Master_Host: 192.168.0.134 Master_User: slave Master_Port: 3306 Connect_Retry: 60 Master_Log_File: master-bin.000006 Read_Master_Log_Pos: 520 Relay_Log_File: relay-log-bin.000028 Relay_Log_Pos: 252 Relay_Master_Log_File: master-bin.000006 Slave_IO_Running: Yes Slave_SQL_Running: No Replicate_Do_DB: Replicate_Ignore_DB: Replicate_Do_Table: Replicate_Ignore_Table: Replicate_Wild_Do_Table: Replicate_Wild_Ignore_Table: Last_Errno: 1008 Last_Error: Error 'Can't drop database 'aaa'; database doesn't exist' on query. Default database: ''. Query: 'drop database aaa' Skip_Counter: 1 Exec_Master_Log_Pos: 356 Relay_Log_Space: 868 Until_Condition: None Until_Log_File: Until_Log_Pos: 0 Master_SSL_Allowed: No Master_SSL_CA_File: Master_SSL_CA_Path: Master_SSL_Cert: Master_SSL_Cipher: Master_SSL_Key: Seconds_Behind_Master: NULLMaster_SSL_Verify_Server_Cert: No Last_IO_Errno: 0 Last_IO_Error: Last_SQL_Errno: 1008 Last_SQL_Error: Error 'Can't drop database 'aaa'; database doesn't exist' on query. Default database: ''. Query: 'drop database aaa'1 row in set (0.00 sec)
解决办法:
mysql> stop slave; Query OK, 0 rows affected (0.00 sec)mysql> set global sql_slave_skip_counter = 1; # 将同步指针向下移动一个,可以重复操作mysql> start slave;Query OK, 0 rows affected (0.00 sec)mysql> show slave status \G*************************** 1. row *************************** Slave_IO_State: Waiting for master to send event Master_Host: 192.168.0.134 Master_User: slave Master_Port: 3306 Connect_Retry: 60 Master_Log_File: master-bin.000006 Read_Master_Log_Pos: 520 Relay_Log_File: relay-log-bin.000030 Relay_Log_Pos: 252 Relay_Master_Log_File: master-bin.000006 Slave_IO_Running: Yes Slave_SQL_Running: Yes Replicate_Do_DB: Replicate_Ignore_DB: Replicate_Do_Table: Replicate_Ignore_Table: Replicate_Wild_Do_Table: Replicate_Wild_Ignore_Table: Last_Errno: 0 Last_Error: Skip_Counter: 0 Exec_Master_Log_Pos: 520 Relay_Log_Space: 551 Until_Condition: None Until_Log_File: Until_Log_Pos: 0 Master_SSL_Allowed: No Master_SSL_CA_File: Master_SSL_CA_Path: Master_SSL_Cert: Master_SSL_Cipher: Master_SSL_Key: Seconds_Behind_Master: 0Master_SSL_Verify_Server_Cert: No Last_IO_Errno: 0 Last_IO_Error: Last_SQL_Errno: 0 Last_SQL_Error: 1 row in set (0.00 sec)
同步
主从
办法
指针
状态
移动
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
维护网络安全活动主题
低价软件开发股有哪些
通信网络安全产业园
微擎数据库修改登录账户密码
网络安全密码匹配不到人
远程教育中的网络安全
直板机软件开发
我的世界服务器对话框很小怎么办
sql数据库安全性总结
警察进小学课堂网络安全课件
家庭照片服务器
网络安全主题活动方案开场导语
785G 服务器内存
维护网络安全应注意哪些
魔兽世界3.35数据库编号
c 如何打开数据库
双引号数据库百科
网络安全对应各个层级
oa软件开发联系方式
工作会议记录软件开发
嵌入式软件开发目标
诚信网络技术有限公司
信息化网络安全发展
中国一拖网络安全比赛
国家最新网络安全知识
数据库新增数据查询不到
长沙的软件开发园
大芒果数据库账号在哪里
重装系统数据库还能用吗
跃威服务器