Why is Nextcloud documentation recommending MySQL/MariaDB?

The system requirements page lists the supported databases:

  • MySQL 5.7+ or MariaDB 10.2+ (recommended)
  • Oracle Database 11g (only as part of an enterprise subscription)
  • PostgreSQL 9.5/9.6/10/11
  • SQLite (only recommended for testing and minimal-instances)

What is the rationale behind recommending MySQL?

  1. Does Nextcloud work better with MysQL/MariaDB? If yes, what specifically?
  2. Is MySQL just the most “popular” and therefore recommended?

I have been using PostgreSQL and Nextcloud for years and didn’t encounter any problems. In fact, IMHO PostgreSQL is superior because it is usually more hassle-free and supports more convenient SQL-Syntax while MySQL seems to be a little bit cobbled together. While developing the user_backend_sql_raw app, I found that the code for PostgreSQL was simple and straight forward but I had to add several workarounds and ugly hacks for MySQL.

I don’t want to start a flame war, but I am genuinly curious why new users are pushed into the MySQL path.

1 Like

Not a recent answer (and I am not a nextcloud dev), but an issue (nextcloud/server#5912) was raised asking this very question. It started in 2017 with an attempted revival in early 2020.

My takeaway is really summed up with:

MorrisJobke commented on Jul 28, 2017

This is the recommendation, because in bigger setups we had better experience with it and we know how to handle.

I haven’t seen any recent benchmarks. I haven’t seen (though haven’t looked all that hard) for new bugs in the server or other repos relating to postgresql-vs-mysql/mariadb.

I’m with you in the sense that I prefer PostgreSQL over MySQL for several reasons, utf8mb4 being just one of them. I’ve been using NC on postgres in one location for well over 4 years with no issues. I’m in the process of upgrading an older server (ubuntu-14.04!) that has a mysql-based NC instance on it. I ran

php occ db:convert-type pgsql dbuser dbhost dbdb --all-apps

on the old server, and 30 minutes later (ish) my NC19 had shifted from mysql to postgres. (Time will tell if that breaks anything.)