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

Ask all your questions regarding OC 4.x and older. Please read the Support Forum Rules
Forum rules
Before you post; make sure you are using at least PHP Version 5.3.x - Also read How To Solve Problems By Yourself

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

Postby Richie » Tue Jun 19, 2012 3: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! =)
Richie
Beginner
 
Posts: 13
Joined: Fri Jun 15, 2012 2:18 am

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

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

I am interested in this as well. I run now owncloud with sqllite but want to switch to mysql.
octom
Beginner
 
Posts: 28
Joined: Fri Feb 17, 2012 12:03 pm

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

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

I am interested too. I began with SQlite and i plan to migrate to MySQL
Lateralus
Beginner
 
Posts: 10
Joined: Thu May 24, 2012 7:41 pm

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

Postby ad2012 » Wed Jul 04, 2012 11:15 am

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!
ad2012
Beginner
 
Posts: 23
Joined: Thu Jun 28, 2012 9:56 pm

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

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

@ad2012

Thank you :D
Richie
Beginner
 
Posts: 13
Joined: Fri Jun 15, 2012 2:18 am

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

Postby Legoless » Fri Jul 06, 2012 8: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.
Legoless
Beginner
 
Posts: 10
Joined: Sat Jun 09, 2012 1:51 am

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

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

@ Legoless

Thank you :D
Richie
Beginner
 
Posts: 13
Joined: Fri Jun 15, 2012 2:18 am

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

Postby syscol » Wed Jun 19, 2013 4: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/
syscol
Newbie
 
Posts: 1
Joined: Wed Jun 19, 2013 3:45 pm
ownCloud version: 5.0.7
Webserver: Apache
Database: MySQL
OS: Linux

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

Postby Morphonet » Sun Aug 11, 2013 3: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!
Morphonet
Newbie
 
Posts: 2
Joined: Sun Aug 11, 2013 3: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 Frank » Thu Dec 05, 2013 12: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.
Frank
Admin
 
Posts: 4
Joined: Mon Feb 18, 2013 6:23 pm
ownCloud version: 4.5.6

Next

Return to ownCloud Community Edition 4.x and older

Who is online

Users browsing this forum: No registered users and 11 guests