小编Yen*_*Yen的帖子

如何解决innodb集群冲突

我目前正在维护一个具有三个节点的 innodb 集群。它运行良好,但有时会出现一个节点,MISSING然后我必须将其重新上线。

问题是我插入了一个没有主键的表。然后一个节点失败了。当我想将故障节点重新加入集群时,它说它无法加入,因为有一个没有主键的表。我更改了集群中的表以为其提供主键,但故障节点仍然抱怨相同。所以我删除了故障节点中的表并期望它会重建该表。

现在它说

ERROR: Group Replication join failed.
ERROR: Error joining instance to cluster: '192.168.123.45@3306' - Query failed. 3092 (HY000): The server is not configured properly to be an active member of the group. Please see more details on error log.. Query: START group_replication (RuntimeError)
Run Code Online (Sandbox Code Playgroud)

在我运行 cluster.checkInstanceState('root@192.168.123.45:3306'); 后

The instance '192.168.123.45:3306' is invalid for the cluster.
The instance contains additional transactions in relation to the cluster.

{
    "reason": "diverged", 
    "state": "error"
}
Run Code Online (Sandbox Code Playgroud)

我知道这是因为不同数据库中的状态不一致。但是我搜索了互联网,但没有关于如何解决 innodb 集群冲突的文档。任何意见将是有益的!

mysql innodb mysql-innodb-cluster

2
推荐指数
1
解决办法
9599
查看次数

Dba.getCluster:此功能无法通过独立实例的会话使用(运行时错误)

我正在使用 mysql innodb 集群。连接到我的实例使用\c root@localhost:3306.
当我发出 时,会弹出错误消息var cluster = dba.getCluster('testCluster')

我已经在上次会话中创建了集群。但是当我重新连接时它就不再起作用了。

我唯一改变的是主机名从localhostdb005并重新启动 mysql 服务器。也不知道和我的问题有没有关系。有人知道发生了什么事吗?

在谷歌上做了一些搜索。似乎这是 mysql 论坛的唯一资源。但还是没能解决我的问题。
https://forums.mysql.com/read.php?177,653826,657465#msg-657465

谢谢!

innodb mysql-cluster mysql-5.7

2
推荐指数
1
解决办法
2万
查看次数