Convert database, sqlite to mysql

Hi there!
I encountered a problem while converting from sqlite3 to mysql, any help is appreciated :slight_smile:

The admin manual at:
states how to convert the db via occ command.

php occ db:convert-type --all-apps mysql oc_mysql_user new_db_name

for me:

php occ db:convert-type --all-apps mysql owncloud owncloud_db
(Btw. it does state, that one has to add the user 'oc_mysql_user', create the DB, grant permission to the user and flush the privileges )

Afterwards occ does the conversion for some tables, but it does not work for all of them.
E.g. the sms app seems to be a problem.
Sadly the process crashes right there .... .
I have uploaded the output to pastebin:

I do not know if all tables got converted or not + config.php still states:

'dbtype' => 'sqlite3'

Of course, if i reuse

php occ db:convert-type --all-apps mysql owncloud owncloud_db

i get:

Base table or view already exists: 1050 Table 'oc_appconfig' already exists

and the process stops.

Any ideas?
Perhaps, deleting all tables in the created mysql_db, deactivate sms app and trying to convert once again?


if tables of 3rdparty apps are showing issues first delete that app from the /apps/ folder.

Yeepaa! :slight_smile:

Thanks, after dropping all tables from my OC db and removing the 3rdparty app (OCSMS), i ran

sudo -u www-data  php occ db:convert-type --all-apps mysql owncloud owncloud_db

again. (which i actually did the first time too)

This time it told me

Creating schema in new database
The following tables will not be converted:
Continue with the conversion (y/n)? [n] y

Afterwards everthiny worked as expected and config.php changed to

'dbtype' => 'mysql',

Glad to see that, my sqlite db was allready ~50mb :stuck_out_tongue: