-
Notifications
You must be signed in to change notification settings - Fork 6
Force Primary Key Requirement
Thomas Shone edited this page Jul 7, 2024
·
7 revisions
Operational
You are running MySQL 8.0.13+ (changelog) without the sql_require_primary_key
variable enabled.
Every table must have a Primary Key, so it's better to enforce this at the database level.
You can either change the variable at runtime
SET GLOBAL sql_require_primary_key=ON
Or you can change the variable at startup by modifying your my.cnf
configuration
[mysqld]
sql_require_primary_key=ON