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: https://doc.owncloud.org/server/9.0/admin_manual/configuration_database/db_conversion.html
states how to convert the db via occ command.

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

for me:

php occ db:convert-type --all-apps mysql owncloud 127.0.0.1 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: http://pastebin.com/eRqL8AX0.

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 127.0.0.1 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?

Hi,

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 127.0.0.1 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:
oc_ocsms_config
oc_ocsms_conversation_read_states
oc_ocsms_sendmessage_queue
oc_ocsms_smsdatas
oc_ocsms_user_datas
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: