| Summary: | When launching the latest version of digiKam, the old internal MySql database cannot be started. | ||
|---|---|---|---|
| Product: | [Applications] digikam | Reporter: | ustuerzlinger |
| Component: | Database-Mysql | Assignee: | Digikam Developers <digikam-bugs-null> |
| Status: | REPORTED --- | ||
| Severity: | critical | CC: | caulier.gilles, fmontagut, hackintoshhd, metzpinguin, michael_miller |
| Priority: | NOR | ||
| Version First Reported In: | 8.7.0 | ||
| Target Milestone: | --- | ||
| Platform: | macOS (DMG) | ||
| OS: | macOS | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: |
Screenshot of error message
digikam 7.10 error message after upgrade mysql error log digikam error log macos related to mariadb initialization searching macOSBundlePrefix() on git indicate the potential issue |
||
|
Description
ustuerzlinger
2023-03-17 20:16:11 UTC
Hi, i already responded in the user mailing list about this problem few days ago. Look this thread: https://mail.kde.org/pipermail/digikam-users/2023-March/034674.html See also this bugzilla entry for the story: https://bugs.kde.org/show_bug.cgi?id=462736 Best Gilles Caulier Created attachment 157372 [details]
digikam 7.10 error message after upgrade
Same here on a MacBook Pro mid-2012 (MacBookPro9,1) with Ventura 13.2.1 after an upgrade of digikam 7.9/internal mysql to digikam 7.10, cf. attached screenshot. Sorry for my screenshot and comment after Gilles explanation of the problem - as you may notice from our comments' timestamps, we commented pretty much simultaneously, so I didn't have any knowledge about the problem's cause at the time of writing. Can you please post the MySQL error log from the database directory ".../.mysql.digikam/db_data/mysql.err"? Maik Created attachment 157494 [details]
mysql error log
As requested the error log
@ustuerzlinger As you use a M1 macbook pro like me, i recommend to try the Silicon PKG installer build for 8.5.0 pre-release. It's use MariaDB 10.1 provided by Macports : https://ports.macports.org/port/mariadb-10.11/ Files can be download here : https://files.kde.org/digikam/ Please try and reports... Gilles Caulier A screenshot from my MacBook pro M1 running digiKam 8.5.0 arm64 with the internal mysql database (here mariadb): https://i.imgur.com/A3CTp2Y.png Gilles Caulier Sorry, but the latest 8.5.0-arm package still doesn't work for me. My environment is a Mac arm64 VM. I removed previous SQLlite DBs and MariaDM files and dirs. I removed ~/Library/Preferences/digikamrc. This screenshot is the inital run of digiKam. https://bugs.kde.org/attachment.cgi?id=173822 If you try to run mariadbd from the command line using the parameters shown in the error message, you'll see what I mean in https://bugs.kde.org/show_bug.cgi?id=491042 about MariaDB files missing. Michael, I found a severe (and stupid) bug in the PKG installer that i just fixed : the previous install was not removed from the /Applications. Re-installing the application will mix different versions with all possible side effects that you can imagine. I will rebuild arm64 pkg asap. Gilles Hi, digiKam 8.6.0 is just released: https://www.digikam.org/news/2025-03-15-8.6.0_release_announcement/ Problem still exists with this version? Thanks in advance Gilles Caulier Created attachment 183597 [details]
digikam error log macos related to mariadb initialization
Created attachment 183598 [details]
searching macOSBundlePrefix() on git indicate the potential issue
The error persists in version 8.7.0.
I found the issue. During the initialization phase the mariadb command has an argument with a "//" that is incorrect. The correct argument should be: "--basedir=/Applications/digiKam.org/digikam.app/Contents/lib/mariadb/" and the current code generates two // between Contents and lib.
I am not developer but searched through the code, and the issue might be on databaseserver.cpp, look how the argument is generated on lines 522 and 568: mysqldServCmdArgs << QDir::toNativeSeparators(QString::fromLatin1("--basedir=%1/lib/mariadb/"). Looking other codelines, the output of macOSBundlePrefix always finish with "/", and combining both you get the wrong "..Contents//lib/... path.
I added an attachment to see the error string, and a screenshot of the search I used to find the potential typo in the code
Git commit 0fb86864cbb9390c8b3182d9150e5be3dcc77aa5 by Gilles Caulier. Committed on 28/07/2025 at 14:46. Pushed by cgilles into branch 'master'. try to fix MacOS ath for Mysql server. M +4 -2 core/libs/database/server/databaseserver.cpp M +2 -0 core/libs/database/server/databaseserver.h https://invent.kde.org/graphics/digikam/-/commit/0fb86864cbb9390c8b3182d9150e5be3dcc77aa5 I will rebuild this evening the PKG installer for MacOS version 8.8.0. It will be available at this place late today (Paris time): https://files.kde.org/digikam/ Best regards Gilles Caulier (In reply to caulier.gilles from comment #15) > Git commit 0fb86864cbb9390c8b3182d9150e5be3dcc77aa5 by Gilles Caulier. > Committed on 28/07/2025 at 14:46. > Pushed by cgilles into branch 'master'. > > try to fix MacOS ath for Mysql server. > > M +4 -2 core/libs/database/server/databaseserver.cpp > M +2 -0 core/libs/database/server/databaseserver.h > > https://invent.kde.org/graphics/digikam/-/commit/ > 0fb86864cbb9390c8b3182d9150e5be3dcc77aa5 Thanks. almost :). The / that create problems is the "/" after the %1 and before lib. The code line should be : mysqlInitCmdArgs << QDir::toNativeSeparators(QString::fromLatin1("--basedir=%1lib/mariadb/") .arg(macOSBundlePrefix())); Git commit 6daaa7f4254541ac9d2be77b34d14078d108a244 by Gilles Caulier. Committed on 28/07/2025 at 16:16. Pushed by cgilles into branch 'master'. second try to fix path under MacOS M +2 -2 core/libs/database/server/databaseserver.cpp https://invent.kde.org/graphics/digikam/-/commit/6daaa7f4254541ac9d2be77b34d14078d108a244 The new PKG 8.8.0 is now online here : https://files.kde.org/digikam/ (In reply to caulier.gilles from comment #19) > The new PKG 8.8.0 is now online here : https://files.kde.org/digikam/ Thank you Gilles. That part is fixed. I tested and unfortunately there is another error. I spent some time digging, and the problem is at the mariadb_install_db script that comes from the mysql code when you build the app. I tried to use that script manually with multiple "--basedir" combinations, and I was not successful. probably a bug on qt. I found this workaround, for other users: * Install mariadb 10.11 by yourself. If you have homebrew, run at the terminal : brew install mariadb@10.11 * Install digikam, select mysql as database. * Change the directories of the mysql binaries. Make sure the ones selected are /opt/homebrew/opt/mariadb@10.11/bin/... * will run error. select cancel and Close digikam * go to terminal and run : /opt/homebrew/opt/mariadb@10.11/bin/mariadb-install-db --defaults-file=/Applications/digiKam.org/digikam.app/Contents/Resources/digikam/database/mysql-global.conf --basedir=/opt/homebrew/opt/mariadb@10.11/ --datadir=/users/your-user/desired-db-directory.mysql.digikam/db_data replace above your-user for your user directory and -desired-dv-directory for the directory where you want the database. * open digikam again. You got digikam running with mysql database. |