MySQL Forums
Forum List  »  InnoDB clusters

Re: Dba.createCluster: ERROR: 1 table(s) do not have a Primary Key or Primary Key Equivalent (non-null unique key) on sys.sys_config
Posted by: OpenSource DBA
Date: August 07, 2017 04:20AM

I am facing same issue.

[root@innodb1 ~]# mysqlsh
MySQL Shell 1.0.10

Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type '\help' or '\?' for help; '\quit' to exit.

Currently in JavaScript mode. Use \sql to switch to SQL mode and execute queries.
mysql-js> dba.verbose = 1
1
mysql-js> dba.checkInstanceConfiguration('cluster_admin@localhost:3306')
Please provide the password for 'cluster_admin@localhost:3306':
Validating instance...

=========================== MySQL Provision Output ===========================
Enter the password for server (cluster_admin@localhost:3306):

Running check command.
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.

* Checking compatibility of Multi-Threaded Slave settings... PASS
Multi-Threaded Slave settings are compatible with Group Replication.

* Checking compliance of existing tables... FAIL
ERROR: 1 table(s) do not have a Primary Key or Primary Key Equivalent (non-null unique key).
sys.sys_config

Group Replication requires tables to use InnoDB and have a PRIMARY KEY or PRIMARY KEY Equivalent (non-null unique 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 or PRIMARY KEY Equivalent.
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 checking instance: The operation could not continue due to the following requirements not being met:
Non-compatible tables found in database.
==============================================================================
The instance 'localhost:3306' is not valid for Cluster usage.

The following issues were encountered:

- 1 table(s) do not have a Primary Key or Primary Key Equivalent (non-null unique key).

Please fix these issues and try again.

{
"errors": [
"1 table(s) do not have a Primary Key or Primary Key Equivalent (non-null unique key)."
],
"restart_required": false,
"status": "error"
}
mysql-js> desc sys.sys_config
SyntaxError: Unexpected identifier
mysql-js> ^DBye!
[root@innodb1 ~]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 5.7.18-log MySQL Community Server (GPL)

Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> desc sys.sys_config;
+----------+--------------+------+-----+-------------------+-----------------------------+
| Field | Type | Null | Key | Default | Extra |
+----------+--------------+------+-----+-------------------+-----------------------------+
| variable | varchar(128) | NO | PRI | NULL | |
| value | varchar(128) | YES | | NULL | |
| set_time | timestamp | NO | | CURRENT_TIMESTAMP | on update CURRENT_TIMESTAMP |
| set_by | varchar(128) | YES | | NULL | |
+----------+--------------+------+-----+-------------------+-----------------------------+
4 rows in set (0.01 sec)



Any fix or workaround ?

Options: ReplyQuote




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.