summaryrefslogtreecommitdiffstats
path: root/nextcloud-mysql.txt
blob: 12844428a81280ce3a5b726fa6620ea3dc65eded (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Configure MariaDB / MySQL for ownCloud
======================================

To use MariaDB / MySQL as database backend, you need to do the following:

1. Make sure that your mysql service is configured and running properly. If this
   is a fresh install, you will need to run "systemctl enable mysqld.service;
   systemctl start mysqld.service" (or mariadb.service) as root. It's also
   strongly advised to run "mysql_secure_installation" after starting the
   database for the first time.

2. Log in to the database as privileged user to create the database and a
   dedicated user account for ownCloud:
   $ mysql -u root -p
     CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
     CREATE DATABASE IF NOT EXISTS nextcloud;
     GRANT ALL PRIVILEGES ON nextcloud.* TO 'username'@'localhost' IDENTIFIED BY 'password';
   Choose identifier and password accordingly.

Now you can launch the ownCloud setup screen, select MySQL in the advanced
settings and fill in your credentials.

References
==========

https://fedoraproject.org/wiki/MariaDB
https://mariadb.com/kb/en/mariadb/documentation/
http://doc.nextcloud.org/server/7.0/admin_manual/configuration/configuration_database.html