Digikam: QMYSQL driver not loaded

Hello everyone,
I have been using digikam with Mysql backend for a long time. A few weeks ago this stopped working. The error message on the console is:

stephan@px200e:~> digikam 
QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE
digikam(29573)/digikam (core): Error while opening the database. Error details  QSqlError(-1, "Driver not loaded", "Driver not loaded") ] 
digikam(29573)/digikam (core): Error while opening the database. Error details  QSqlError(-1, "Driver not loaded", "Driver not loaded") ] 

Has anyone seen this before and knows how to make mysql access work again with digikam? I believe I have the necessary packages installed:

rpm -qa | sort | grep -i qt | egrep  -i 'mysql|sqlite'

Installed packages seem OK to me
Your repos?

zypper lr -d

Known problem in Tumbleweed:

As a workaround you could probably install digikam 5.0.0 from KDE:Extra (which, being a Qt5/KF5 application, uses Qt5’s mysql plugin), but be aware that your config is not migrated yet.
(you can do that manually, by copying the corresponding files from ~/.kde4/share/config/ to ~/.config/).

But better make a backup of your database first.

Thanks for pointing this bug report out to me. This looks like exactly the same issue:

strings /usr/lib64/qt4/plugins/sqldrivers/libqsql{ite,mysql}.so|grep buildkey
buildkey=x86_64 linux g++-4 full-config
buildkey=x86_64 linux g++-6 full-config

Given the fact that the bug report has been updated only two days ago with what looks like a plan for a fix, I will wait some more time for updated packages.

Strange that this happened though.
AFAIK, the whole distribution was rebuilt when they switched to GCC6 as default compiler, so everything should be built with GCC6 already.

And we also added a patch to libqt4 to allow loading plugins built with an older compiler.

FYI, I just found out what the problem is:
In Tumbleweed, that patch is only applied to the main libqt4 package, but not to libqt4-sql-plugins.

This has been fixed in KDE:Qt (the devel project) over a month ago, but for some reason this change was never forwarded to Factory/Tumbleweed.

I forwarded it myself now, so it will hopefully work in standard Tumbleweed soon too.

So another workaround would be to install libqt4-sql-plugins-mysql from KDE:Qt for now, that one works fine.

The problem should be fixed now in the latest snapshot.

Thanks a lot. I just installed libqt4-sql-mysql-4.8.7-5.1.x86_64 from the oss repository and Digikam works again with MySQL backend!