Failed to connect to database

Ask all your questions regarding OC 5.x 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

Failed to connect to database

Postby euloko » Tue Nov 19, 2013 8:12 pm

So my Owncloud worked perfectly but then I changed the path where the files are saved to my hdd and when I rebooted so I tried to connect to myserverip/owncloud and i got the message:
Code: Select all
Failed to connect to database
Before changing anything, It worked perfectly. What is going wrong?

Also I cant see my hdd anymore when i run:

Code: Select all
sudo fdisk -l


My HDD is plugged into a powered hub. So that's not the problem...
Last edited by euloko on Tue Nov 19, 2013 9:00 pm, edited 1 time in total.
euloko
Beginner
 
Posts: 21
Joined: Tue Nov 19, 2013 11:22 am
Database: MySQL
OS: Linux
PHP version: 5

Re: Failed to connect to database

Postby Rancor » Tue Nov 19, 2013 8:41 pm

Hi,

its also important that you're not just change the datadir location. You need to copy your database (you're probably using SQLite) which is placed in your old datadir (data/owncloud.db) to the new location and also make sure that the user which is running your webserver has rw permissions to the owncloud.db and w permissions to the new datadir and its parents folders.

You will probably also find some more infos about this when inserting the search term:

Failed to connect to database

into the forums search.
Rancor
OwnCloud master
 
Posts: 6113
Joined: Sat May 26, 2012 2:00 pm
ownCloud version: 6.0.2
Webserver: nginx
Database: MySQL
OS: Linux
PHP version: 5.4.x

Re: Failed to connect to database

Postby euloko » Tue Nov 19, 2013 8:56 pm

Rancor wrote:Hi,

its also important that you're not just change the datadir location. You need to copy your database (you're probably using SQLite) which is placed in your old datadir (data/owncloud.db) to the new location and also make sure that the user which is running your webserver has rw permissions to the owncloud.db and w permissions to the new datadir and its parents folders.

You will probably also find some more infos about this when inserting the search term:

Failed to connect to database

into the forums search.


The problem is, I cant go to the dir anymore since it cant read my hdd anymore.
euloko
Beginner
 
Posts: 21
Joined: Tue Nov 19, 2013 11:22 am
Database: MySQL
OS: Linux
PHP version: 5

Re: Failed to connect to database

Postby Rancor » Tue Nov 19, 2013 9:55 pm

Hi,

don't think that someone can guess whats happen with your hdd from remote.
Rancor
OwnCloud master
 
Posts: 6113
Joined: Sat May 26, 2012 2:00 pm
ownCloud version: 6.0.2
Webserver: nginx
Database: MySQL
OS: Linux
PHP version: 5.4.x

Re: Failed to connect to database

Postby euloko » Tue Nov 19, 2013 10:10 pm

Rancor wrote:Hi,

don't think that someone can guess whats happen with your hdd from remote.



Ok I restarted the raspberry a few times and connected the hdd different a couple of times and it worked.
euloko
Beginner
 
Posts: 21
Joined: Tue Nov 19, 2013 11:22 am
Database: MySQL
OS: Linux
PHP version: 5


Return to ownCloud Community Edition 5.x

Who is online

Users browsing this forum: Bing [Bot] and 5 guests