Problem Statement

MISSION CONTROL: Unable to create table in MySQL DB because of the sql_require_primary_key setting

AuthorFullName__c
Prakriti Vishwakarma
articleNumber
000006146
FirstPublishedDate
2024-07-11T09:37:52Z
lastModifiedDate
2025-07-22
VersionNumber
1
The MySQL Database comes with the feature sql_require_primary_key. The purpose of sql_require_primary_key is to control whether MySQL requires tables to have a primary key.

When utilizing MySQL Database with the Mission Control, we could encounter scenarios where the tables are not able to be created because the system variable 'sql_require_primary_key' is set. You might see errors like this -
DB: Unable to create or change a table without a primary key, when the system variable 'sql_require_primary_key' is set. Add a primary key to the table or unset this variable to avoid this message. Note that tables without a primary key can cause performance problems in row-based replication, so please consult your DBA before changing this setting. (SQL State: HY000 - Error Code: 3750)