MySQL Forums
Forum List  »  InnoDB clusters

Re: Dba.createCluster: ERROR: 1 table(s) do not have a Primary Key
Posted by: Matt Lord
Date: May 23, 2017 06:45PM

Hi Sivan,

Thank you for the feature request! I agree that we should always show the offending tables in the error messages/output. I've started a discussion on that topic with the development team.

In the meantime, you CAN see that info when you enable verbose mode in the shell (notice the "test.nopktest" identifier noted at the end):
"
mysql-js> dba.verbose = 1
1
mysql-js> cluster = dba.createCluster( 'test' )
A new InnoDB cluster will be created on instance 'root@mysqlgr1:3306'.

Creating InnoDB cluster 'test' on 'root@mysqlgr1:3306'...
=========================== MySQL Provision Output ===========================
Enter the password for server (root@mysqlgr1:3306):
Enter the password for replication_user (mysql_innodb_cluster_r4302654280@'%'):

Running start command on 'mysqlgr1@3306'.
Checking Group Replication prerequisites.
* Comparing options compatibility with Group Replication... PASS
Server configuration is compliant with the requirements.
* Checking server version... PASS
Server is 5.7.18

* Checking that server_id is unique... PASS
The server_id is valid.


The user root@'mysqlgr1' does not exists on 'mysqlgr1@3306' and requires to be created.
* Checking user privileges... PASS
* Checking compliance of existing tables... FAIL
ERROR: 1 table(s) do not have a Primary Key
test.nopktest

Group Replication requires tables to use InnoDB and have a PRIMARY key. Tables that do not follow these requirements will be readable but not updateable when used with Group Replication. If your applications make updates (INSERT, UPDATE or DELETE) to these tables, ensure they use the InnoDB storage engine and have a PRIMARY KEY.
You can retry this command with the --allow-non-compatible-tables option if you'd like to enable Group Replication ignoring this warning.


ERROR: Error starting cluster: The operation could not continue due to the following requirements not being met:
Non-compatible tables found in database.
==============================================================================
Dba.createCluster: ERROR: 1 table(s) do not have a Primary 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)
"

Best Regards,

Matt

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Dba.createCluster: ERROR: 1 table(s) do not have a Primary Key
1154
May 23, 2017 06:45PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.