[Digikam-users] Mysql/MariaDb database expert needs...

Gilles Caulier caulier.gilles at gmail.com
Thu Nov 12 13:51:03 GMT 2015

2015-11-12 13:58 GMT+01:00 Henrique Santos Fernandes <sf.rique at gmail.com>:

> Hello,
> For the mysql itself there is no diference if it is internal or external.
> Just use the network conection.

no. The database creation is different :

- Internal : all is done by digiKam as well, thrue digikamdatabaseserver
CLI tool. grant all privilegdes cannot processed, because DB is done at
run time when digiKam session is open.

- remote : the database server need to be prepared before,
especially privilegdes stuff. It explained in Amarok setup page for ex (a
similar explainations need to be done in digiKam)

> The permissions are the same for the user just need to grant all
> privilegdes for the user.

yes, but for a internal solution, user do not acces to database, until
digiKam try to create it and fail of course due to missing privilegdes

As, the privilegdes cannot be granted from users space, but must be done by
server admin, the internal solution is a non sense. Sqlite do the stuff as
well in this situation. As i said previously, trying to run digiKam with an
internal mysql server will generate a lots of problems, a lots of reports,
and finaly, only if user is an expert, this will not possible to use this

So i will drop internal mysql support for 5.0.0

> Digikam could ask for two ways to begin, the first would be to already
> have the user it needs to connect to the database. The second it could ask
> for database admin user, in this case, digikam would create its users as it
> needs. It makes the installating easier for the user, and also more secure
> for the user digikam, so it will only have the permission it needs.

yes. The way to do it il given below :

'digikamuser'@'localhost' IDENTIFIED BY 'digikamuserpassword'; FLUSH
PRIVILEGES; GRANT SUPER ON *.* TO 'digikamuser'@'localhost'; FLUSH

digikamdb : the digiKam databse name (in case of we use only one mysql
database for all tables)
digikamuser : the name of user account used by digiKAm to access on mysql
digikamuserpassword : the password of the account.

Here, the mysql DB is hosted on local machine (localhost). Adjusting the
name of the machine permit to use a remote server as well.

> But i mean, i guess this is the easier part.. the hard part woould be the
> actual use of mysql for storing stuff right?
> I wish i knew mysql well enouh to help..

The here another pending and very important question :

With digiKam 5.0.0, we will have 3 database to manage :

1/ Core DB
2/ Thumbnails DB
3/ Face DB (since libkface is merged in digiKam core)

For each digiKam database we can use a specific name. By default i used the
name name (digikamdb) here to test, and it work for Core and Thumbnails DB.
Face DB don't work and investiguations are under progress...

So, the question is : why we have the capability to separate Core,
Thumbnails, and Face DB with different name (as for ex digikamcoredb,
digkamthumbsdb, and digikamfacedb) ?

In my /var/lib/mysql, i can see separated subfolders to host DB ? What's
the advantage ? backup facilities ? Performances ? What's must be the
default settings : common name or separated name ?

All this point are not clear for me (and also for end users as i can see in

> I prefere mysql cause it would be possible/easier to use digikam on
> multiple computers with the same database!

Sure, this is another important feature, which introduce other dysfunctions
as i can see in bugzilla.

We must investigate step by step, first with simple user cases...

Gilles Caulier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/digikam-users/attachments/20151112/67a9f233/attachment.html>

More information about the Digikam-users mailing list