MySQL Group Replicationを手元ですぐ試せるように雑なVagrantfileを作った。
月: 2017年9月
MySQL InnoDB Cluster初期作成時に Dba.createCluster: ERROR: 1 table(s) do not have a Primary Key or Primary Key Equivalent (non-null unique key) となった場合の対処
MySQL ShellからMySQL InnoDB Clusterを作ろうとした時に以下のようなエラーが出ましたので、その原因の調査と対応手順をまとめます。
icrootと言うのは InnoDB Cluster 管理用のユーザとします。
mysql-js> cluster = dba.createCluster('ClusterDev'); A new InnoDB cluster will be created on instance 'icroot@192.168.10.65:3306'. Warning: The instance configuration needs to be changed in order to create an InnoDB cluster. To see which changes will be made, please use the dba.checkInstanceConfiguration() function before confirming to change the configuration. Should the configuration be changed accordingly? [y|N]: y Creating InnoDB cluster 'ClusterDev' on 'icroot@192.168.10.65:3306'... Dba.createCluster: ERROR: 1 table(s) do not have a Primary Key or Primary Key Equivalent (non-null unique key). ERROR: Error starting cluster: The operation could not continue due to the following requirements not being met: Non-compatible tables found in database. (RuntimeError)