DigitalOcean and sql_require_primary_key

Version: v5.11.11

Environment: Zip

Describe the bug

I host my sites on DigitalOcean and use their managed MySQL instances. One of the items that I regularly run into is their requirement of primary keys. When I run through the setup, I get the following error in the storage/laravel.log log.

ERROR 3750 (HY000) at line 1285: 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.

I did some searching and found this forum post, Error sql_require_primary_key DigitalOcean Managed Databases and then I looked at the GitHub issue that was referenced in that post and it looks like it was resolved on the Laravel side.

If this has been resolved on the Laravel side, what do I need to do to resolve the installation issue I’m having now?

Thank you!

Hi,

I suggest asking in a discussion on GitHub.

1 Like