我已经使用组复制设置了三个MySQL 8.0.17数据库。它们都在我的Windows 10 PC上,使用端口3306,3307,3308。
我现在正在尝试建立mysqlrouter。我已经在c:/mysqlrouter/中安装了它。
但当我跑的时候
mysqlrouter --bootstrap root@localhost:3306我只得到:
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)这在所有三个端口上都是相同的,并且使用每个不同的用户(localhost、127.0.0.1等)
我已经确认了MySQL用户的存在(我已经设置了root @ localhost / 127.0.0.1 / ::1 / % ),并且我可以使用它们中的每一个登录到MySQL。
有什么东西我需要配置吗?我在文件里什么都看不见吗?
发布于 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路由器,它成功了。
https://dba.stackexchange.com/questions/243562
复制相似问题