FUN WITH LINUX

Owncloud7: Convert Database from SQLite to Mysql

27 November 2014

Owncloud’s SQLite-Database is just for small use cases. On larger environments it’s better to use a mysql-database. Owncloud7 has a very nice little tool to convert the existing SQLite-database to mysql and change the owncloud-configuration.

First we have to create a mysql-database:

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> create database owncloud;
Query OK, 1 row affected (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON owncloud.* TO 'ownclouduser'@'localhost' IDENTIFIED BY 'Supersecurepassword';

Then change into owncloud-directory and set the execute-permissions on the occ-script:

chmod 700 occ

Now convert the database:

./occ db:convert-type --password="Supersecurepassword" --all-apps mysql ownclouduser localhost owncloud
[ Linux  Sysadmin  Owncloud  ]
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution 3.0 Unported License.

Copyright 2015-present Hoti