0

I have set up a set of three MySQL 8.0.17 databases using group replication. They are all on my Windows 10 PC, using ports 3306,3307,3308.

I am now trying to set up mysqlrouter. I have installed it in c:/mysqlrouter/.

But when I run:

mysqlrouter --bootstrap root@localhost:3306

I simply get:

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)

This is the same on all three ports, and using each of the different users (localhost, 127.0.0.1 etc)

I have confirmed that the MySQL user exists (I have root @ localhost / 127.0.0.1 / ::1 / % all set up) and I can login to MySQL using each of them.

Is there something I need to configure? I can't see anything obvous in the documentation?

IGGt
  • 2,266
  • 6
  • 35
  • 49

1 Answers1

1

I think I have solved it.

It appears that there is a difference between Group Replication and Innodb Cluster that perhaps needs to be made clearer in the documentation.

Anyway, I ran:

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

and got:

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)

This was the first clue that something was missing. Then I eventually found the following:

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

This tells you that you need to "convert" group replication to an Innodb Cluster by running:

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

This tells you that:

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

After that I tried bootstrapping mysqlrouter, and it worked.

IGGt
  • 2,266
  • 6
  • 35
  • 49