首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Windows 10上的MySQLRouter无法连接到元数据服务器

Windows 10上的MySQLRouter无法连接到元数据服务器
EN

Database Administration用户
提问于 2019-07-23 15:48:30
回答 1查看 575关注 0票数 0

我已经使用组复制设置了三个MySQL 8.0.17数据库。它们都在我的Windows 10 PC上,使用端口3306,3307,3308。

我现在正在尝试建立mysqlrouter。我已经在c:/mysqlrouter/中安装了它。

但当我跑的时候

代码语言:javascript
复制
mysqlrouter --bootstrap root@localhost:3306

我只得到:

代码语言:javascript
复制
Error: Unable to connect to the metadata server: Error connecting to MySQL server at 127.0.0.1:3306: 
Lost connection to MySQL server at 'waiting for initial communication packet', system error: 10060 (2013)

这在所有三个端口上都是相同的,并且使用每个不同的用户(localhost127.0.0.1等)

我已经确认了MySQL用户的存在(我已经设置了root @ localhost / 127.0.0.1 / ::1 / % ),并且我可以使用它们中的每一个登录到MySQL。

有什么东西我需要配置吗?我在文件里什么都看不见吗?

EN

回答 1

Database Administration用户

发布于 2019-07-25 10:09:28

我想我已经解决了。

似乎组复制和Innodb集群之间存在着差异,可能需要在文档中更清楚地说明这一点。

总之,我跑了:

mysqlrouter --bootstrap root@[::1]:3306

并得到:

Error: Expected MySQL Server '::1:3306' to contain the metadata of MySQL InnoDB Cluster, but the schema does not exist. Checking version of the metadata schema failed with: Error executing MySQL query: Unknown database 'mysql_innodb_cluster_metadata' (1049)

这是第一条线索,那就是什么东西不见了。最后,我发现了以下几点:

https://dev.mysql.com/doc/refman/8.0/en/mysql-innodb-cluster-from-group-replication.html

这告诉您,需要通过运行以下命令将组复制“转换”为Innodb群集:

var cluster = dba.createCluster('prodCluster', {adoptFromGR: true});

这告诉你:

A new InnoDB cluster will be created based on the existing replication group on instance 'localhost:3306'.

在那之后,我尝试了引导After路由器,它成功了。

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

https://dba.stackexchange.com/questions/243562

复制
相关文章

相似问题

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