Nextcloud works ‘out of the box’ with SQLite as a database.
That is fine if your Cloud has few users. I have opted for an RDBMS. Ihave chosen MariaDB. The advantage is that MariaDB is Open Source and will remain (as opposed to MySQL). However, if you want to use a graphical tool to manage the database (s) from the Raspberry pi then that is not possible. None of the existing tooling for MariaDB works on the Raspberry Pi. (Maybe that is different for MySQL but I have not tried that.)

Install MariasDB as follows: sudo apt-get install mariadb server
Of course you want to put the database data on the Raid drive. Log in to MariaDB with command: sudo mysql -u root
(You do not have to enter a password because the root user is linked to the Linux user via the unix-socket plugin; you can check this with SQL: select host, user, plugin from mysql.user;)

Then type: select @@ datadir; This shows you the current location of the database; (/var/lib/mysql).

Log in to MariaDB with command: sudo mysql -u root and then create the database that you will use for Nextcloud.

Close the mysql session withcommand: quit

For Nextcloud you also need to modify file /etc/mysql/mariadb.conf.d/50-server.cnf again. Put the following lines somewhere after the [mysqld] header:
transaction_isolation = READ-COMMITTED
binlog_format = ROW
Then restart the database: sudo service mysql restart


Previous pageNext page