Bug 299988

Summary: Using MySQL but on DB test got "Database connection test was not successful. Error was: Driver not loaded Driver not loaded"
Product: [Applications] digikam Reporter: Mike Gutzschhahn <info>
Component: Portability-RuntimeAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED INTENTIONAL    
Severity: major CC: caulier.gilles, jan
Priority: NOR    
Version: 2.6.0   
Target Milestone: ---   
Platform: MacPorts   
OS: macOS   
Latest Commit: Version Fixed In: 2.7.0
Sentry Crash Report:

Description Mike Gutzschhahn 2012-05-14 10:30:16 UTC
I installed with MacPorts and a local DB everything works fine. But by using a remote MySQL-DB i got "Database connection test was not successful. 
Error was: Driver not loaded Driver not loaded".

Reproducible: Always

Steps to Reproduce:
1. Install with Mac Ports using this tutorial
https://projects.kde.org/projects/extragear/graphics/digikam/digikam-software-compilation/repository/revisions/master/entry/README.MACOSX
2. Started (after some fixed access right problems in Preferences-Folder)
3. Created local DB and imported – everything works pritty fine
4. Changed DB to remote MySQL
Actual Results:  
Database connection test was not successful. 
Error was: Driver not loaded Driver not loaded

Expected Results:  
A working DB connection

I checked the login information and retried with DK 2.5 on windows. Those weren't the source of this problem.
Comment 1 caulier.gilles 2012-05-14 12:30:21 UTC
Jan,

In Macports, it sound like that MySQL driver is not available in libQt4. It's a run time dependency for digiKam. Mysql driveris a plugin in Qt4 in fact. It must be included in compilation rules of Qt4 with Macports package.

Gilles Caulier
Comment 2 Jan Gosmann 2012-06-09 21:15:38 UTC
You're right. By default the MySQL drivers will not be included in the Macports build of Qt4. But you can install the qt4-mac +mysql variant. Then the database connection test works for me (without recompilation of Digikam).

I could add that dependency to the Port, but would prefer to make it not the default. I think, most people are quite happy with the sqlite default and don't want the time consuming rebuild of qt4-mac. Ideally one would compile Digikam without mysql support when installing without the mysql variant. Is there any cmake option which deactivates mysql support?

Best, Jan
Comment 3 caulier.gilles 2012-06-10 08:14:32 UTC
Thanks Jan for the clarification. 

There is cmake option to disable mysql support. There is only a cmake check at configuration time.

Which macports package i need to refer in my README.MACOSX tutorial, about mysql support ?

https://projects.kde.org/projects/extragear/graphics/digikam/digikam-software-compilation/repository/revisions/master/entry/README.MACOSX

Gilles Caulier
Comment 4 Jan Gosmann 2012-06-10 09:48:52 UTC
Instead of using the as dependency automatically installed qt4-mac the +mysql variant has to be installed, i.e.: "sudo port install qt4-mac +mysql"
Comment 5 caulier.gilles 2012-06-10 10:45:40 UTC
Git commit c67b5bf864b290369ad45077e7c55afb1c2c6e26 by Gilles Caulier.
Committed on 10/06/2012 at 12:44.
Pushed by cgilles into branch 'master'.

add rules to install qt4 for mac with mysql plugin support

M  +1    -0    README.MACOSX

http://commits.kde.org/scratch/mwiesweg/digikam-sc/c67b5bf864b290369ad45077e7c55afb1c2c6e26
Comment 6 caulier.gilles 2012-06-10 10:48:20 UTC
Jan,

Note that under linux, i can see that Qt4 mysql plugin can be installed separately than qt4 core. It's a run-time dependency, and it can be installed later than core package. Why not to do the same with macports ?

Gilles Caulier
Comment 7 Jan Gosmann 2012-06-10 10:51:35 UTC
I don't know. You would have to discuss that with the maintainer of the qt4-mac port.
Comment 8 Mike Gutzschhahn 2012-07-25 14:04:31 UTC
Hi all,

I made a clean install with MacPorts and recompiled mysql after successfully installing Digikam 2.7. Everthing works instead of:
- Missing filemanager
- No Thumbs shown

I used the maintenance tools but without success. I think the MacPorts Team might update the routines as Gilles recommended. Will you or can i close this ticket?

Thanks for your support
Mike

PS: If you need a mac for testing, I think not everybody has one, I'd be glad to give a helping hand.