Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to create or change a table without a primary key #12197

Closed
xiangyanw opened this issue Jun 10, 2024 · 0 comments · Fixed by #12206
Closed

Unable to create or change a table without a primary key #12197

xiangyanw opened this issue Jun 10, 2024 · 0 comments · Fixed by #12206

Comments

@xiangyanw
Copy link

Describe the bug
Failed to create tables when initialing MySQL DB using mysql-schema.sql in AWS RDS Multi-AZ DB Cluster. Error message as below:

Unable to create or change a table without a primary key, when the system variable 'sql_require_primary_key' is set.

This is because sql_require_primary_key is set to true in MySQL cluster. But roles and permissions table have no primary key.

Expected behavior
Be able to init table successfully.

Actually behavior
Failed to create table roles and permissions.

How to Reproduce
Steps to reproduce the behavior:

  1. Create an AWS RDS MySQL Cluster;
  2. Download mysql-schema.sql;
  3. Init database by mysql-schema.sql;
  4. See errors

Desktop (please complete the following information):

  • MySQL version: 8.0.35
  • Deployment option: Multi-AZ DB Cluster
  • Nacos version: 2.3.2

Additional context
Add any other context about the problem here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants