Owncloud MySql

Status
Not open for further replies.

Halfe

Explorer
Joined
Apr 24, 2013
Messages
94
Hi. I dont know if im asking in the right place but.

Has anyone migrated from SQLite to MySQL successfully. and if you could help me migrate from SQLite to MySQL.

i have an MySQL server running for KODI already. so i dont need to install a new SQL server.
PS: its running on a diffrent jail.
 

Noctris

Contributor
Joined
Jul 3, 2013
Messages
163

Halfe

Explorer
Joined
Apr 24, 2013
Messages
94
I'm having trouble accessing occ commands.
anyone ever done this in a jail? there is no instructions on owncloud on accessing gaining access to those commands in FreeNAS jails
 

Noctris

Contributor
Joined
Jul 3, 2013
Messages
163
Are you running them from the shell inside the jail?

Sent from my HTC One_M8 using Tapatalk
 

Halfe

Explorer
Joined
Apr 24, 2013
Messages
94
I'm really unsure how to run the occ but what I've been reading is that you have to use sudo in Linux. And a php user. I really don't have a clue since there is no explanation on how to use occ on FreeNAS

Sent fra min SM-N910F via Tapatalk
 

Noctris

Contributor
Joined
Jul 3, 2013
Messages
163
  1. Stop your owncloud jail
  2. Take a manual snapshot of the jails dataset ( this is a backup to which you can rollback to if things go wrong)
  3. Start the jail again
  4. Create db and user for the db on your mysql
  5. Check out the freenas manual how to get into the jail shell ( http://doc.freenas.org/9.3/freenas_jails.html )
  6. locate occ using the jail shell
  7. run command: php occ db:convert-type --all-apps mysql USERNAME_YOU_CREATED_FOR_OWNCLOUDB 192.168.0.1 OWNCLOUDDB_CREATED_IN_STEP_4 ( replace 192.168.0.1 with the ip of your mysql)
 

Halfe

Explorer
Joined
Apr 24, 2013
Messages
94
Code:
root@owncloud_1:/usr/local/www/owncloud # sudo -u www-data php occ -h
sudo: unknown user: www-data
sudo: unable to initialize policy plugin


Code:
root@owncloud_1:/usr/local/www/owncloud # php occ db:convert-type
php: Command not found.
 

Noctris

Contributor
Joined
Jul 3, 2013
Messages
163
Why are you executing a completely different command?

Sent from my HTC One_M8 using Tapatalk

Edit: never mind. Missed the second. Have you tried finding where php is located ? Might need to give full path
 

Halfe

Explorer
Joined
Apr 24, 2013
Messages
94
Code:
root@owncloud_1:/usr/pbi/owncloud-amd64/etc/php # php occ db:convert-type --all-apps mysql
php: Command not found.
root@owncloud_1:/usr/pbi/owncloud-amd64/etc/php # php occ db:convert-type     
php: Command not found.


Code:
root@owncloud_1:/usr/pbi/owncloud-amd64/etc/php # php occ db:convert-type --all-apps mysql owncloud 100.0.2.11 owncloud
php: Command not found.
 

Noctris

Contributor
Joined
Jul 3, 2013
Messages
163
pkg install php5

then try again
 

Halfe

Explorer
Joined
Apr 24, 2013
Messages
94
Code:
root@owncloud_1:/usr/local/www/owncloud # php occ db:convert-type --all-apps mysql owncloud 100.0.2.11 owncloud

Fatal error: Class 'PDO' not found in /usr/pbi/owncloud-amd64/www/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php on line 172

Fatal error: Call to undefined function hash() in /usr/pbi/owncloud-amd64/www/owncloud/lib/private/request.php on line 52
root@owncloud_1:/usr/local/www/owncloud #


Well something is wrong in the plug in. Or I'm doing it wrong again



Sent fra min SM-N910F via Tapatalk
 

Noctris

Contributor
Joined
Jul 3, 2013
Messages
163
I'm sorry but are you trying too google these errors *at all*? I'm more then willing to help out but i have the distinct feeling you are expecting me to google the answer for you. The error itself gives a distinct message as to what is wrong. Have a look yourself first.

Sent from my HTC One_M8 using Tapatalk
 

Halfe

Explorer
Joined
Apr 24, 2013
Messages
94
Sorry was trying this on my phone when fixing food for my kids.
Just posted the error so I could get them easy'er later.

Sent fra min SM-N910F via Tapatalk
 

Noctris

Contributor
Joined
Jul 3, 2013
Messages
163
Did it work out with pdo?

Sent from my portable microwave
 

Avocation

Cadet
Joined
Dec 19, 2014
Messages
9
Thanks both for this thread.

Halfe - did you overcome this PDO problem as I've just hit the exact same problem.

All help gratefully received.
 

Halfe

Explorer
Joined
Apr 24, 2013
Messages
94
Hi.
No sorry. Summer has hit and not have had much time left for freedom.


Sent fra min SM-N910F via Tapatalk
 

Avocation

Cadet
Joined
Dec 19, 2014
Messages
9
Okay, thanks anyway - if I suss it I'll post here.

Noctis - any suggestions as to how to fix it please?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
you guys are executing the system wide php. if you want to work on the plugin use /usr/pbi/owncloud-amd64/bin/php
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Status
Not open for further replies.
Top