报错信息:

 因为之前在主数据库服务器上搭建了Zabbix,所以在配置主从时报错。
Error executing row event: 'Table 'zabbix.history_uint' doesn't exist'

           ...... Slave_IO_Running: YesSlave_SQL_Running: No......Last_Error: Error executing row event: 'Table 'zabbix.history_uint' doesn't exist'

解决办法:

只需要把主库服务器上的Zabbix数据库放到从库服务器上来就可以了。

1.主数据库服务器备份Zabbix数据库

[root@localhost ~]# mysql -uroot -p123qqq...A
mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| db1                |
| mysql              |
| performance_schema |
| sys                |
| test               |
| zabbix             |
+--------------------+
7 rows in set (0.06 sec)[root@localhost ~]# mysqldump -uroot -p123qqq...A --master-data zabbix > /root/zabbix.sql[root@localhost ~]# scp /root/zabbix.sql root@192.168.2.129:/root/

2.从数据库服务器导入备份数据并重启slave进程

[root@test2 ~]# mysql -uroot -p123qqq...Amysql> stop slave;mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| db1                |
| mysql              |
| performance_schema |
| sys                |
| test               |
+--------------------+
6 rows in set (0.01 sec)mysql> create database zabbix;
Query OK, 1 row affected (0.01 sec)mysql> exit
Bye[root@test2 ~]# mysql -uroot -p123qqq...A zabbix </root/zabbix.sql[root@test2 ~]# mysql -uroot -p123qqq...A
mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| db1                |
| mysql              |
| performance_schema |
| sys                |
| test               |
| zabbix             |
+--------------------+
7 rows in set (0.00 sec)
mysql> use zabbix;mysql> show tables;
+----------------------------+
| Tables_in_zabbix           |
+----------------------------+
| acknowledges               |
| actions                    |
| alerts                     |
| application_discovery      |
| application_prototype      |
| application_template       |
| applications               |
| auditlog                   |
| auditlog_details           |
| autoreg_host               |
| conditions                 |
| config                     |
| config_autoreg_tls         |
| corr_condition             |
| corr_condition_group       |
| corr_condition_tag         |
| corr_condition_tagpair     |
| corr_condition_tagvalue    |
| corr_operation             |
| correlation                |
......
mysql> start slave;
Query OK, 0 rows affected (0.04 sec)mysql> show slave status\G;
*************************** 1. row ***************************Slave_IO_State: Waiting for master to send eventMaster_Host: 192.168.2.128Master_User: mysqluserMaster_Port: 3306Connect_Retry: 60Master_Log_File: db128.000002Read_Master_Log_Pos: 452757169Relay_Log_File: test2-relay-bin.000002Relay_Log_Pos: 3205508Relay_Master_Log_File: db128.000002Slave_IO_Running: YesSlave_SQL_Running: YesReplicate_Do_DB:Replicate_Ignore_DB:Replicate_Do_Table:Replicate_Ignore_Table:Replicate_Wild_Do_Table:Replicate_Wild_Ignore_Table:Last_Errno: 0Last_Error:Skip_Counter: 0Exec_Master_Log_Pos: 452757169Relay_Log_Space: 3205715Until_Condition: NoneUntil_Log_File:Until_Log_Pos: 0Master_SSL_Allowed: NoMaster_SSL_CA_File:Master_SSL_CA_Path:Master_SSL_Cert:Master_SSL_Cipher:Master_SSL_Key:Seconds_Behind_Master: 0
Master_SSL_Verify_Server_Cert: NoLast_IO_Errno: 0Last_IO_Error:Last_SQL_Errno: 0Last_SQL_Error:Replicate_Ignore_Server_Ids:Master_Server_Id: 128Master_UUID: e46c9961-5780-11ea-bf2f-000c128a8b6bMaster_Info_File: /var/lib/mysql/master.infoSQL_Delay: 0SQL_Remaining_Delay: NULLSlave_SQL_Running_State: Slave has read all relay log; waiting for more updatesMaster_Retry_Count: 86400Master_Bind:Last_IO_Error_Timestamp:Last_SQL_Error_Timestamp:Master_SSL_Crl:Master_SSL_Crlpath:Retrieved_Gtid_Set:Executed_Gtid_Set:Auto_Position: 0Replicate_Rewrite_DB:Channel_Name:Master_TLS_Version:
1 row in set (0.00 sec)

 可以看到IO线程、SQL线程都是Yes状态。

↓↓↓↓↓↓

最近刚申请了个微信公众号,上面也会分享一些运维知识,大家点点发财手关注一波,感谢大家。 【原创公众号】:非著名运维 【福利】:公众号回复 “资料” 送运维自学资料大礼包哦!

Mysql主从同步报错解决:Error executing row event: Table zabbix.history-uint doesnt exist相关推荐

  1. mysql主从同步报错Fatal error: The slave I/O thread stops because master and slave have equal MySQL server

    问题:在mysql主从同步的过程中检查主从同步状态时IO线程报错 Last_IO_Error: Fatal error: The slave I/O thread stops because mast ...

  2. Mysql主从同步报错解决:Fatal error: The slave I/O thread stops because master and slave have equal..

    报错信息:   在搭建Mysql主从架构过程中,由于从服务器是克隆的主服务器系统,导致主从Mysql uuid相同, Slave_IO无法启动,报错如下:   Last_IO_Error: Fatal ...

  3. MySQL新增字段报错:ERROR 1118 -- Row size too large. The maximum row size for the used table type

    MySQL新增字段报错:ERROR 1118 – Row size too large. The maximum row size for the used table type, not count ...

  4. mysql主从同步报错_mysql主从同步报错

    主从不同步,经查看发现如下报错 Last_Errno: 1666 ​Last_Error: Error executing row event: 'Cannot execute statement: ...

  5. 【转载保存】Mysql主从同步报错集锦

    https://www.cnblogs.com/wangxin37/p/6398755.html

  6. SQLserver主从同步报错:Message: 无法创建 AppDomain “mssqlsystemresource.dbo[runtime].

    SQLserver主从同步报错: Message: 无法创建 AppDomain "mssqlsystemresource.dbo[runtime].3537". 调用的目标发生了 ...

  7. Linux下MySql插入汉字报错解决(/etc/my.cnf不存在)

    2019独角兽企业重金招聘Python工程师标准>>> Linux下MySql插入汉字报错解决(/etc/my.cnf不存在) 看了很多帖子,大多数是说修改my.cnf,如 http ...

  8. SpringBoot项目启动 报错:Error executing Maven. end tag name </settings> must match start tag name

    SpringBoot项目启动 报错:Error executing Maven. end tag name must match start tag name from line xxx 第一次创建s ...

  9. Ldap同步报错 [LDAP: error code 21 - 00000057: LdapErr: DSID-0C090EC7

    Ldap同步报错 [LDAP: error code 21 - 00000057: LdapErr: DSID-0C090EC7 异常: javax.naming.directory.InvalidA ...

最新文章

  1. Linux 内核里的“智能指针”【转】
  2. SHUoj 字符串进制转换
  3. Linux里的稀疏文件
  4. 201521123062《Java程序设计》第10周学习总结
  5. 为什么用Java——一个来自Python阵营的程序员告诉你
  6. python题目训练(随时更新)
  7. Laravel学习笔记(33)后台切换前台模板(修改默认的加载模版路径)
  8. Windows下调试工具Windbg入门
  9. 天大《电子商务网站设计与管理》大作业期末考核
  10. Oliver的成绩(score)
  11. Mac怎么格式化U盘?Mac格式化fat32格式详解
  12. 苹果键盘怎么手写_今天才发现,苹果手机自带录音转文字功能,堪称会议神器...
  13. [题解]CodeForces1208G Polygons
  14. 关于销售订单挑库发放卡接口以及发运处理卡接口的处理方式
  15. linux sftp 命令_Linux Sftp命令示例
  16. 广义线性混合模型(GLMM)变量选择
  17. WIN32下实现输入法所需要的一些必要消息、函数和说明
  18. std::vector中 begin()、end()、front()、back()的区别
  19. 日期时间格式 - 助手类[方法] - 收集
  20. 售后服务的基本流程有哪些

热门文章

  1. noexcept与栈展开(stack unwinding)
  2. 移动互联风口频现,百度高德谁已手握地图关键钥匙
  3. JDBC之execute、executeQuery和executeUpdate之间的区别
  4. 【加水印】如何批量加文字水印和图片水印,如何批量添加文件名水印到图片里?图片的名称批量写到图片上面?
  5. GCTA学习4 | GCTA说明文档--功能分类及常见问题
  6. 神经网络架构搜索(Neural Architecture Search)杂谈
  7. 正确开展Scrum评审会议
  8. 转】用Mahout构建职位推荐引擎
  9. Lect2 BFS总结
  10. lect02_codes04_Seanborn