1

I have a MySQL InnoDB Cluster(version 5.7). I just have two server, a master and a slave.

I am try to remove master instance to let slave promote to master.
When I execute command cluster.removeInstance('root@mysql-master:3306'). I got a error:

The instance will be removed from the InnoDB cluster. Depending on the instance
being the Seed or not, the Metadata session might become invalid. If so, please
start a new session to the Metadata Storage R/W instance.

Cluster.removeInstance: get_string(7): field is NULL (LogicError)

I can't find any solution about this error messages. Could someone help me?

Rukeith
  • 123
  • 6

1 Answers1

0

Just out of curiosity, why do you only have 2 servers with an InnoDB Cluster? Is it so you can use MySQL Router auto-configure feature?

In any case, just turn off the master server and the slave should become the master.

I have just tried with a 3 server setup with MySQL 5.7.24 and got the same error. This must be a bug in the method's implementation although it does check for the server name (try a fake name and you will see a different error).

You can manually eliminate the instance by changing by deleting the entries for that server in the instances and hosts tables in the mysql_innodb_cluster_metadata database. You should also reflect the change in the mysql configuration file.