概述
Mysql读写分离配置完后,在主库已存在的表新增 插入删除数据 ,从库正常同步;但是如果在主库新增一个表,然后再此表中新增一条数据,从库不新增。
mysql版本:5.7
系统:linux 3.10.0-514.el7.x86_64
数据库配置文件my.inf内容如下:
......
[mysqld]
character_set_server=utf8 init_connect='SET NAMES utf8'
skip-name-resolve
slave_skip_errors=all
basedir = /usr/local/mysql
datadir = /opt/data
socket = /tmp/mysql.sock
port = 3306
pid-file = /opt/data/mysql.pid
user = mysql
relay-log=mysql-relay-bin
server-id=65
symbolic-links=0
log-bin=mysql-bin
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
max_connections=1000
......
建表语句以及插数据语句如下:
--drop table test_tb;
create table test_tb(id VARCHAR(12));
INSERT INTO test_tb VALUES('11111');
日志报错如下:
2020-10-13T07:32:53.314874Z 59 [Warning] Slave SQL for channel '': Error executing row event: 'Unknown error 1146', Error_code: 1146
2020-10-13T07:33:03.349435Z 59 [Warning] Slave SQL for channel '': Error executing row event: 'Unknown error 1146', Error_code: 1146
2020-10-13T07:33:13.306841Z 59 [Warning] Slave SQL for channel '': Error executing row event: 'Unknown error 1146', Error_code: 1146
2020-10-13T07:33:23.326045Z 59 [Warning] Slave SQL for channel '': Error executing row event: 'Unknown error 1146', Error_code: 1146
2020-10-13T07:33:33.330658Z 59 [Warning] Slave SQL for channel '': Error executing row event: 'Unknown error 1146', Error_code: 1146
2020-10-13T07:38:06.289980Z 59 [Warning] Slave SQL for channel '': , Error_code: 1677
2020-10-13T07:38:35.495749Z 59 [Warning] Slave SQL for channel '': , Error_code: 1677
2020-10-13T07:43:32.364440Z 59 [Warning] Slave SQL for channel '': , Error_code: 1677
请问,这是什么原因导致的?该如何解决?
最后
以上就是欢呼钢笔为你收集整理的mysql执行成功 添加不进去数据_Mysql读写分离主库新增表插入数据成功 从库失败...的全部内容,希望文章能够帮你解决mysql执行成功 添加不进去数据_Mysql读写分离主库新增表插入数据成功 从库失败...所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复