首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Mysql 5.7 -无法使用mysql“cluster.addInstance()”添加新的集群实例

Mysql 5.7 -无法使用mysql“cluster.addInstance()”添加新的集群实例
EN

Stack Overflow用户
提问于 2020-07-06 14:25:25
回答 1查看 1.3K关注 0票数 0

你好,我正在尝试建立mysql InnoDB集群体系结构,到目前为止,我在3台不同的服务器上安装了mysql服务器5.7,并使用以下命令配置了mysql集群:

代码语言:javascript
运行
复制
dba.checkInstanceConfiguration();
dba.configureLocalInstance();
var cluster = dba.createCluster("myCluster");
cluster.addInstance("admin@db2:3306") // My username is admin, and the instance hostname is db2.

问题是在运行最后一个命令mysql时显示了以下错误:

代码语言:javascript
运行
复制
WARNING: A GTID set check of the MySQL instance at 'db2:3306' determined that it contains transactions that do not originate from the cluster, which must be discarded before it can join the cluster.

db2:3306 has the following errant GTIDs that do not exist in the cluster:
26224bda-bc5b-11ea-9a6e-000c29646186:1-27,
799fe52b-bd3b-11ea-a5ee-005056241c59:1-31,
f1e4837b-b6ce-11ea-b1c5-000c29646186:1

WARNING: Discarding these extra GTID events can either be done manually or by completely overwriting the state of db2:3306 with a physical snapshot from an existing cluster member. To use this method by default, set the 'recoveryMethod' option to 'clone'.

Having extra GTID events is not expected, and it is recommended to investigate this further and ensure that the data can be removed prior to choosing the clone recovery method.
ERROR: The target instance must be either cloned or fully provisioned before it can be added to the target cluster.
Built-in clone support is available starting with MySQL 8.0.17 and is the recommended method for provisioning instances.
Cluster.addInstance: Instance provisioning required (MYSQLSH 51153)

我尝试使用命令mysqldump -uroot -proot --all-databases --triggers --routines --events --master-data > /dump.sql转储整个数据库,并将其导入目标实例,但问题仍然存在。

  • I不能升级到mysql 8并使用上面提到的克隆工具,因为我们的应用程序只兼容mysql 5.7.

如何使用MySQL5.7来解决这个问题?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-07-06 15:09:33

好的,我通过清空表: mysql.gtid_executed来解决这个问题,然后重新启动服务器并将其正确链接起来。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/62758154

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档