How to disable SQL_REQUIRE_PRIMARY_KEY in digital ocean manged database for mysql?

Posted September 14, 2021 1.8k views

How to disable SQLREQUIREPRIMARY_KEY in digital ocean manged database for mysql globaly?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Hi @ajaypatel,

You can reach out to DO support to disable global sqlrequireprimary_key for your MySQL managed database.

If you need to disable it on session level, you can execute the below command.

SET SESSION sql_require_primary_key = 0;

I hope this helps!