Change the database of ownCloud from "sqlite" -> "mysql"

Ask all your questions regarding OC 5.x Please read the Support Forum Rules
Forum rules
ownCloud 5.x reached end of life and is officially unsupported. For details see Wiki page.

Please upgrade your ownCloud.
Richie
Beginner
Posts: 13
Joined: Fri Jun 15, 2012 3:18 am

Change the database of ownCloud from "sqlite" -> "mysql"

Postby Richie » Tue Jun 19, 2012 4:19 am

:D Good day everyone!
Please share your knowledge here on how we can upgrade or change the default databse (sqlite) of ownCloud to (mysql)

Thanks everyone! =)

octom
Beginner
Posts: 28
Joined: Fri Feb 17, 2012 1:03 pm

Re: Change the database of ownCloud from "sqlite" -> "mysql"

Postby octom » Mon Jun 25, 2012 10:57 pm

I am interested in this as well. I run now owncloud with sqllite but want to switch to mysql.

Lateralus
Beginner
Posts: 10
Joined: Thu May 24, 2012 8:41 pm

Re: Change the database of ownCloud from "sqlite" -> "mysql"

Postby Lateralus » Sat Jun 30, 2012 3:42 am

I am interested too. I began with SQlite and i plan to migrate to MySQL

ad2012
Beginner
Posts: 23
Joined: Thu Jun 28, 2012 10:56 pm

Re: Change the database of ownCloud from "sqlite" -> "mysql"

Postby ad2012 » Wed Jul 04, 2012 12:15 pm

Interested, too.

I found - during my tests - a way - but you will LOOSE all users (must be added again; they keep their files):

1. Backup you configuration - especially of your users.
2. Make sure you're the only one who can access your ownCloud-Server (IP rules, etc)!
3. Edit config.php, set

Code: Select all

"installed" => false,

4. Open ownCloud, set MySQL up
5. Register all of your users
6. Make your ownCloud available again.

Regards!

Richie
Beginner
Posts: 13
Joined: Fri Jun 15, 2012 3:18 am

Re: Change the database of ownCloud from "sqlite" -> "mysql"

Postby Richie » Fri Jul 06, 2012 5:12 am

@ad2012

Thank you :D

Legoless
Beginner
Posts: 10
Joined: Sat Jun 09, 2012 2:51 am

Re: Change the database of ownCloud from "sqlite" -> "mysql"

Postby Legoless » Fri Jul 06, 2012 9:31 am

There is always a workaround, and there is even a better one. ;) I suggest if you wish to move your database is that you backup your SQLite database and do a clean install of ownCloud with MySQL. Then you should import SQLite data into newly created MySQL database. There are more ways to do this:

1. Find an appropriate tool here: http://www.sqlite.org/cvstrac/wiki?p=ConverterTools
2. See this post for more information: http://stackoverflow.com/questions/1867 ... 3-to-mysql

Experiment and have fun. It can be done.

Richie
Beginner
Posts: 13
Joined: Fri Jun 15, 2012 3:18 am

Re: Change the database of ownCloud from "sqlite" -> "mysql"

Postby Richie » Mon Jul 09, 2012 3:27 am

@ Legoless

Thank you :D

syscol
Newbie
Posts: 1
Joined: Wed Jun 19, 2013 4:45 pm
ownCloud version: 5.0.7
Webserver: Apache
Database: MySQL
OS: Linux

Re: Change the database of ownCloud from "sqlite" -> "mysql"

Postby syscol » Wed Jun 19, 2013 5:09 pm

I found and use this how-to to do it and it work very well :

http://fabianpeter.de/cloud/owncloud-mi ... -to-mysql/

Morphonet
Newbie
Posts: 2
Joined: Sun Aug 11, 2013 4:17 pm
ownCloud version: 5.0.6
Webserver: Apache
Database: MySQL
OS: Linux
PHP version: 5

Re: Change the database of ownCloud from "sqlite" -> "mysql"

Postby Morphonet » Sun Aug 11, 2013 4:21 pm

@syscol tutorial worked like a charm
juste one simple noob command was missing before :
chmod a+x sqlite3-to-mysql.py

it's
wget http://www.redmine.org/attachments/down ... o-mysql.py sqlite3-to-mysql.py

for very noob unix users like me =)

thx for the link!

Frank
Admin
Posts: 4
Joined: Mon Feb 18, 2013 7:23 pm
ownCloud version: 4.5.6

Re: Change the database of ownCloud from "sqlite" -> "mysql"

Postby Frank » Thu Dec 05, 2013 1:30 pm

This conversion script will break your ownCloud. It changed the db structure in a way that ownCloud can migrate to a new version with the next update. We have tons of bug reports because of that. Even on this forum . Just search for hanging maintenance more after an update. So please don't use this script.


  • Similar Topics
    Replies
    Views
    Last post

Return to “ownCloud Community Edition 5.x and older”

Who is online

Users browsing this forum: No registered users and 5 guests