This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Failed to open database

Tags: None
(comma "," separated)
xtx
Registered Member
Posts
21
Karma
0
OS

Failed to open database

Wed Apr 17, 2013 2:10 pm
Gentoo with KDE 4.10.2 & digikam 3.0.0
Using MariaDB

When I first downloaded and opened digikam it gave me the error:
Code: Select all
Error while opening the database. digiKam will try to automatically reconnect to the database.

I hit cancel and go to Settigns -> Configure digikam and change the database to MySQL and check "Internal Server." When I check the db connection I get the error "Database connection test was not successful. Error was:
Code: Select all
Can't connect to local MySQL server through socket '~/.kde4/share/apps/digikam/db_misc/mysql.socket' (2) QMYSQL: Unable to connect


Then for fun I decided to specify a database. So I executed these commands
Code: Select all
mysql -u root -h localhost -p
CREATE DATABASE digikam;
GRANT ALL ON gentoo.* TO 'digiuser'@'localhost' IDENTIFIED BY 'password';


I then returned to digikam configuration and unchecked "Internal Server" and filled out the info as follows:
Host Name: localhost
Port: 3306
Schema Name: digikam
Thumbnails Schema Name: digikam
User: digiuser
Password: ***
Database Connection Options:

I then click "Check DB Connection" and it says it is successful. An odd thing though is it will say this even if I change settings, for example, if I set an incorrect port or schema name, it will still say successful. I put everything back as I think it should, then click OK, and get the error

Code: Select all
Failed to open the database. Error message from database: The driver "SQLITE" for SQLITE3 databases is not available. digiKam depends on the drivers provided by the SQL module of Qt4


Any help?

****edit****
Figured out sqlite, I had to compile qtsql with the sqlite use flag. I still don't understand why MySQL didn't work though
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Failed to open database

Fri Apr 19, 2013 6:35 am
It appears that Digikam was attempting to use the SQLite database connector to connect to your MySQL based database in at least one instance, which indicates that there is a possible bug here. Does Digikam use the SQLite database even though MySQL is configured, or does it only work when configured to use SQLite?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot], rblackwell