Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

476
Views
Matomo on DigitalOcean Managed Database Cluster MySQL 8 - sql_require_primary_key error

I've moved our Matomo installation to DigitalOcean Managed Database Cluster MySQL 8. Since I've moved it there some metrics are not accessible and I see the following error:

Mysqli statement execute error : 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.

And I can see this error in the cluster logs:

[Server] Attempt to create or modify table without primary key: xyz_matomo.matomo_logtmpsegmentceXXXXXXXXXXXXXXXXXXXX

I think I can't change the sql_require_primary_key because the Database is managed and I do not have access to the conf.

But how can this problem fixed elsewhere or is Matomo generally not compatible with DigitalOcean's Managed Database Cluster (MySQL 8).

I've also found this in the known issues list:

MySQL databases containing tables without a primary key and which contain more than 5000 rows may experience replication issues. To prevent this, DigitalOcean now requires you to add a primary key for each new table you create in any managed MySQL database created after 8 April 2020. We strongly recommend that you also [add primary keys][/docs/databases/mysql/how-to/create-primary-keys/] in existing databases to avoid replication issues.

https://www.digitalocean.com/docs/databases/mysql/

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!