Bug 491042

Summary: MariaDB (MySQL) embedded files missing in fresh install
Product: [Applications] digikam Reporter: Michael Miller <michael_miller>
Component: Database-MysqlAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: caulier.gilles, metzpinguin, michael_miller
Priority: NOR    
Version: 8.4.0   
Target Milestone: ---   
Platform: macOS (DMG)   
OS: macOS   
Latest Commit: Version Fixed In: 8.5.0
Sentry Crash Report:
Attachments: Migration screenshot
symlinks pointing to nowhere
digiKam initial run
more error info
Latest errors

Description Michael Miller 2024-07-30 23:07:07 UTC
Created attachment 172135 [details]
Migration screenshot

***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

SUMMARY
Several MariaDB files are missing when doing a fresh install.  I'm unable to migrate to MySQL Internal DB.  There are several bugs, but they all appear to be related to packaging MariaDB.  I'll try to document them all here in way that makes sense.

When using the Database Migration tool, MariaDB files are not detected by digiKam.  See screenshot "migration". The MariaDB files have the "Find" button instead of the "Change" button.  When I point the binaries to an installation of MariaDB using the "Find" button to a different MariaDB installation installed via homebrew into /opt/homebrew/, I get an error message "Internal server is not used and not active!" (see screenshot "Internal server").

Further research shows the mariadb symlinks in /Applications/digiKam.org/digikam.app/Contents/etc and /Applications/digiKam.org/digikam.app/Contents/lib don't actually point to any binaries (see screenshot "symlinks").  Also, none of the MariaDB binaries exist anywhere in the /Applications/digiKam.org/digikam.app/Contents subtree, including mariadbd, mariadb-admin, mariadb-install-db, and mariadb-upgrade.

Not all of the *.sql files needed to create a new MariaDB database exist in the digiKam subtree. 

STEPS TO REPRODUCE
1. Fresh install of digiKam
2. Configure digiKam normally with SQLLite
3. Add a few images to the library
4. Shut down digiKam
5. Start digiKam
6. Navigate to Settings->Database Migration
7. Select MySQL Internal as the destination type

OBSERVED RESULT
Unable to migrate to MySQL Internal.

EXPECTED RESULT
Migration tool works as before.  The last time I used the migration was several versions ago.  Maybe 7.x something, or maybe early 8.x.


SOFTWARE/OS VERSIONS
Windows: 
macOS: 14.5 (23F79)
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Michael Miller 2024-07-31 11:02:26 UTC
Created attachment 172139 [details]
symlinks pointing to nowhere
Comment 2 caulier.gilles 2024-09-17 11:46:14 UTC
With the 8.5.0 pre-release PKG for macOS Silicon (arm64), the problem is not reproducible:

# pwd
/Applications/digiKam.org/digikam.app
# xattr -dr com.apple.quarantine .
#

https://i.imgur.com/JqqbbN9.png

PKG can be downloaded here :

https://files.kde.org/digikam/

Gilles Caulier
Comment 3 Michael Miller 2024-09-17 17:56:25 UTC
Have you tried to do a SQLite to MariaDB database migration with 8.5.0 Arm64?  I haven't tried with Macports yet, but with Homebrew I can't do a migration.  I can use MariaDB when I initially configure a new install, and I can migrate FROM MariaDB to SQLite.  I cannot, however, migrate from SQLite to MariaDB.  It says it's not active.  I' wondering if it's a Homebrew issue or something in code since MariaDB works fine for new installs.
Comment 4 caulier.gilles 2024-09-17 20:41:16 UTC
Hi Michael,

No it do not works. I see this message when migration start :

https://i.imgur.com/1C4hxgx.png

In the terminal, i can see :

digikam.general: Testing  "mariadb-upgrade" ...
digikam.general: Testing  "mariadbd" ...
digikam.general: Testing  "mariadb-admin" ...
digikam.general: Testing  "mariadb-install-db" ...
digikam.general: Testing  "mariadbd" ...
digikam.general: Testing  "mariadb-admin" ...
digikam.general: Testing  "mariadb-upgrade" ...
digikam.general: Testing  "mariadb-install-db" ...
digikam.general: Testing  "/opt/local/bin/mariadbd" ...
digikam.general: All Binaries Found :  false
digikam.general: Testing  "/opt/local/bin/mariadb-admin" ...
digikam.general: All Binaries Found :  false
digikam.general: Testing  "/opt/local/bin/mariadb-upgrade" ...
digikam.general: All Binaries Found :  false
digikam.general: Testing  "/opt/local/bin/mariadb-install-db" ...
digikam.general: All Binaries Found :  false
digikam.general: Testing  "/opt/local/sbin/mariadbd" ...
digikam.general: All Binaries Found :  false
digikam.general: Testing  "/opt/local/sbin/mariadb-admin" ...
digikam.general: All Binaries Found :  false
digikam.general: Testing  "/opt/local/sbin/mariadb-upgrade" ...
digikam.general: All Binaries Found :  false
digikam.general: Testing  "/opt/local/sbin/mariadb-install-db" ...
digikam.general: All Binaries Found :  false
digikam.general: Testing  "/opt/local/lib/mariadb/bin/mariadbd" ...
digikam.general: All Binaries Found :  false
digikam.general: Testing  "/opt/local/lib/mariadb/bin/mariadb-admin" ...
digikam.general: All Binaries Found :  false
digikam.general: Testing  "/opt/local/lib/mariadb/bin/mariadb-upgrade" ...
digikam.general: All Binaries Found :  false
digikam.general: Testing  "/opt/local/lib/mariadb/bin/mariadb-install-db" ...
digikam.general: All Binaries Found :  false
digikam.general: Testing  "/Applications/digiKam.org/digikam.app/Contents/lib/mariadb/bin/mariadbd" ...
digikam.general: Found  "/Applications/digiKam.org/digikam.app/Contents/lib/mariadb/bin/mariadbd"
digikam.general: All Binaries Found :  false
digikam.general: Testing  "/Applications/digiKam.org/digikam.app/Contents/lib/mariadb/bin/mariadb-admin" ...
digikam.general: Found  "/Applications/digiKam.org/digikam.app/Contents/lib/mariadb/bin/mariadb-admin"
digikam.general: All Binaries Found :  false
digikam.general: Testing  "/Applications/digiKam.org/digikam.app/Contents/lib/mariadb/bin/mariadb-upgrade" ...
digikam.general: Found  "/Applications/digiKam.org/digikam.app/Contents/lib/mariadb/bin/mariadb-upgrade"
digikam.general: All Binaries Found :  false
digikam.general: Testing  "/Applications/digiKam.org/digikam.app/Contents/lib/mariadb/bin/mariadb-install-db" ...
digikam.general: Found  "/Applications/digiKam.org/digikam.app/Contents/lib/mariadb/bin/mariadb-install-db"
digikam.general: All Binaries Found :  true
digikam.dbengine: ConnectOptions  "UNIX_SOCKET=/Users/gilles/Library/Application Support/digikam/digikam/db_misc/mysql.socket"

All the mariadb binaries are here in the bundle :

gilles@MBPM1deGilles bin % pwd 
/Applications/digiKam.org/digikam.app/Contents/lib/mariadb/bin
gilles@MBPM1deGilles bin % ls -al mariadb*
-rwxr-xr-x  1 root  wheel   5070264 Sep 17 15:58 mariadb
-rwxr-xr-x  1 root  wheel    112123 Sep 17 15:57 mariadb-access
-rwxr-xr-x  1 root  wheel   4774640 Sep 17 15:58 mariadb-admin
-rwxr-xr-x  1 root  wheel  17900320 Sep 17 15:58 mariadb-backup
-rwxr-xr-x  1 root  wheel   5040640 Sep 17 15:58 mariadb-binlog
-rwxr-xr-x  1 root  wheel   4773120 Sep 17 15:58 mariadb-check
-rwxr-xr-x  1 root  wheel   5205856 Sep 17 15:58 mariadb-client-test
-rwxr-xr-x  1 root  wheel  16502352 Sep 17 15:58 mariadb-client-test-embedded
lrwxr-xr-x  1 root  wheel        14 Sep 17 16:07 mariadb-config -> mariadb_config
-rwxr-xr-x  1 root  wheel   4596000 Sep 17 15:58 mariadb-conv
-rwxr-xr-x  1 root  wheel      4221 Sep 17 15:57 mariadb-convert-table-format
-rwxr-xr-x  1 root  wheel   4840688 Sep 17 15:58 mariadb-dump
-rwxr-xr-x  1 root  wheel      8242 Sep 17 15:57 mariadb-dumpslow
-rwxr-xr-x  1 root  wheel  16361168 Sep 17 15:58 mariadb-embedded
-rwxr-xr-x  1 root  wheel      3290 Sep 17 15:57 mariadb-find-rows
-rwxr-xr-x  1 root  wheel      1250 Sep 17 15:57 mariadb-fix-extensions
-rwxr-xr-x  1 root  wheel     35344 Sep 17 15:57 mariadb-hotcopy
-rwxr-xr-x  1 root  wheel   4773920 Sep 17 15:58 mariadb-import
-rwxr-xr-x  1 root  wheel     23417 Sep 17 15:58 mariadb-install-db
-rwxr-xr-x  1 root  wheel   4572352 Sep 17 15:58 mariadb-plugin
-rwxr-xr-x  1 root  wheel     13930 Sep 17 15:58 mariadb-secure-installation
-rwxr-xr-x  1 root  wheel     17977 Sep 17 15:57 mariadb-setpermission
-rwxr-xr-x  1 root  wheel   4772592 Sep 17 15:58 mariadb-show
-rwxr-xr-x  1 root  wheel   4792240 Sep 17 15:58 mariadb-slap
-rwxr-xr-x  1 root  wheel   5071792 Sep 17 15:58 mariadb-test
-rwxr-xr-x  1 root  wheel  16258776 Sep 17 15:58 mariadb-test-embedded
-rwxr-xr-x  1 root  wheel   4572344 Sep 17 15:58 mariadb-tzinfo-to-sql
-rwxr-xr-x  1 root  wheel   5019536 Sep 17 15:58 mariadb-upgrade
-rwxr-xr-x  1 root  wheel   4555184 Sep 17 15:58 mariadb-waitpid
-rwxr-xr-x  1 root  wheel     51072 Sep 17 15:58 mariadb_config
-rwxr-xr-x  1 root  wheel  17541640 Sep 17 15:58 mariadbd
-rwxr-xr-x  1 root  wheel     27996 Sep 17 15:57 mariadbd-multi
-rwxr-xr-x  1 root  wheel     31512 Sep 17 15:58 mariadbd-safe
-rwxr-xr-x  1 root  wheel   4535960 Sep 17 15:58 mariadbd-safe-helper

Gilles
Comment 5 caulier.gilles 2024-09-17 20:51:13 UTC
Maik,

If i try to init a mysql internal database instead sqlite, i get this error message :

https://i.imgur.com/0ZPnZKj.png

Gilles
Comment 6 Maik Qualmann 2024-09-17 21:07:58 UTC
The parameters actually look correct if the directories are correct. Could it be a rights problem? MariaDB binary files may not yet have permissions for the mayOS system - just an idea...

Maik
Comment 7 Maik Qualmann 2024-09-17 21:18:09 UTC
Another question is whether the MariaDB directory is complete (including data folders).

Maik
Comment 8 Michael Miller 2024-09-17 21:33:56 UTC
Maik and Giles,
>Another question is whether the MariaDB directory is complete (including data folders).

This is what I saw with 8.4.0. Several files were missing to initialize MariaDB, including setup scripts.  The DK SQL plugin found all the right binaries and libraries, but was unable to initialize the DB.

 In my Homebrew bundle, I rsync the entire mariadb subtree with symlinks and then prune.  This seems to work for initializing DK with a new DB, but I get an error message when I use the database migration tool.  I'll merge my changes into master later tonight.  My MariaDB bundling code will be in ./project/bundles/homebrew/04mm-build-installer.sh.
Comment 9 Michael Miller 2024-09-18 01:31:00 UTC
Hi Gilles and Maik,
New Homebrew MariaDB bundling is waiting for MR approval.  There's more cleanup that could be done to reduce the final package size, but this works well.  The MariaDB install is also portable so it can be run from anywhere as long as it keeps it relative location in the DK bundle.  There are 4 changes to Macports needed to make this work, if you want to use it.

1. https://invent.kde.org/graphics/digikam/-/blob/9b08d1df1f6917a0493d63c0e2a87476b6a6ab16/project/bundles/homebrew/04mm-build-installer.sh#L154
2. https://invent.kde.org/graphics/digikam/-/blob/9b08d1df1f6917a0493d63c0e2a87476b6a6ab16/project/bundles/homebrew/04mm-build-installer.sh#L457
3. https://invent.kde.org/graphics/digikam/-/blob/9b08d1df1f6917a0493d63c0e2a87476b6a6ab16/project/bundles/homebrew/04mm-build-installer.sh#L723
4. https://invent.kde.org/graphics/digikam/-/blob/9b08d1df1f6917a0493d63c0e2a87476b6a6ab16/core/app/utils/digikam_globals_bundles.cpp#L176

Please note, the relative path in the bundle at runtime for MariaDB is derived from https://invent.kde.org/graphics/digikam/-/blob/9b08d1df1f6917a0493d63c0e2a87476b6a6ab16/core/app/utils/digikam_globals_bundles.cpp#L194 which is #ifdef to Homebrew.  I don't see any harm in making this change for all MacOS builds, and not just Homebrew since both statements will evaluate to the same value once DK is installed.

I'm using my custom tool to rebase the rpaths in the binaries, but I think adding @executable_path/../../.. rpaths should be enough, and it's already being done in the Macports 04 script, so you may be able to remove my rebasing loop.
Comment 10 caulier.gilles 2024-09-18 03:20:18 UTC
This is the reason :


digikam.databaseserver: Database Parameters:
   Type:                        "QMYSQL"
   DB Core Name:                "digikam"
   DB Thumbs Name:              "digikam"
   DB Face Name:                "digikam"
   DB Similarity Name:          "digikam"
   Connect Options:             "UNIX_SOCKET=/Users/gilles/Library/Application Support/digikam/digikam/db_misc/mysql.socket"
   Host Name:                   ""
   Host Port:                   -1
   WAL Mode:                    false
   Internal Server:             true
   Internal Server Path:        "/Users/gilles/Pictures/"
   Internal Server Init Cmd:    "/Applications/digiKam.org/digikam.app/Contents/lib/mariadb/bin/mariadb-install-db"
   Internal Server Admin Cmd:   "/Applications/digiKam.org/digikam.app/Contents/lib/mariadb/bin/mariadb-admin"
   Internal Server Program Cmd: "/Applications/digiKam.org/digikam.app/Contents/lib/mariadb/bin/mariadbd"
   Internal Server Upgrade Cmd: "/Applications/digiKam.org/digikam.app/Contents/lib/mariadb/bin/mariadb-upgrade"
   Username:                    "root"
   Password:                    ""

digikam.databaseserver: Internal Server data path: "/Users/gilles/Pictures/.mysql.digikam/db_data"
digikam.databaseserver: The mysql configuration was already up-to-date: "/Users/gilles/Library/Application Support/digikam/digikam/mysql.conf"
digikam.databaseserver: Database initializer: "/Applications/digiKam.org/digikam.app/Contents/lib/mariadb/bin/mariadb-install-db" QList("--defaults-file=/Applications/digiKam.org/digikam.app/Contents/Resources/digikam/database/mysql-global.conf", "--basedir=/Applications/digiKam.org/digikam.app/Contents//lib/mariadb/", "--datadir=/Users/gilles/Pictures/.mysql.digikam/db_data")
digikam.databaseserver: "Could not start database initializer."
digikam.databaseserver: Executable: "/Applications/digiKam.org/digikam.app/Contents/lib/mariadb/bin/mariadb-install-db"
digikam.databaseserver: Arguments: "--defaults-file=/Applications/digiKam.org/digikam.app/Contents/Resources/digikam/database/mysql-global.conf, --basedir=/Applications/digiKam.org/digikam.app/Contents//lib/mariadb/, --datadir=/Users/gilles/Pictures/.mysql.digikam/db_data"
digikam.databaseserver: Stdout: "\nFATAL ERROR: Could not find /Applications/digiKam.org/digikam.app/Contents//lib/mariadb//lib/mariadb-10.11/bin/mariadbd\n\nIf you compiled from source, you need to either run 'make install' to\ncopy the software into the correct location ready for operation.\nIf you don't want to do a full install, you can use the --srcdir\noption to only install the mysql database and privilege tables.\n\nIf you are using a binary release, you must either be at the top\nlevel of the extracted archive, or pass the --basedir option\npointing to that location.\n\nThe latest information about mysql_install_db is available at\nhttps://mariadb.com/kb/en/installing-system-tables-mysql_install_db\n"
digikam.databaseserver: Stderr: ""
digikam.databaseserver: Exit code: 1
digikam.databaseserver: Process error: "Unknown error"
digikam.databaseserver: Cannot start internal database server

Why the FATAL_ERROR message only appears on the terminal and not in the GUI?

Gilles
Comment 11 caulier.gilles 2024-09-18 03:49:36 UTC
It was a missing symlink in the bundle. i add it and now the server start properly. The dialog. to add a collection to the database appears as expected, but 2 times. Why?

I add (2 times) the same collection pointing to my $HOME/Pictures. A complete scan without error visible on the Terminal is done, and at end digiKam report an error dialog :

https://i.imgur.com/ViHuOca.png

I think the message dialog is relevant of the 2 entries of the same collection path. The first one is parsed, the second one cannot. Note that the collection setup only shows an empty collection registration in the settings. This is why i re-enter the same collection.

I close the error dialog, digiKam starts as expected and it's fully suitable :

https://i.imgur.com/A3CTp2Y.png

Gilles
Comment 12 caulier.gilles 2024-09-18 03:58:58 UTC
Michael,

Thanks to pointing your solution with homebrew, but as a working simple symlink was missing in the macports bundle, I will only make this change for the moment...

Gilles
Comment 13 caulier.gilles 2024-09-18 04:46:39 UTC
Git commit 05cf68ae7c0223e4ea35633e5335acda92cafbfb by Gilles Caulier.
Committed on 18/09/2024 at 04:45.
Pushed by cgilles into branch 'master'.

missing mariadb symlink in the bundle

M  +6    -3    project/bundles/macports/04-build-installer.sh

https://invent.kde.org/graphics/digikam/-/commit/05cf68ae7c0223e4ea35633e5335acda92cafbfb
Comment 14 Michael Miller 2024-09-18 10:24:46 UTC
Created attachment 173821 [details]
digiKam initial run
Comment 15 Michael Miller 2024-09-18 10:25:30 UTC
Created attachment 173822 [details]
more error info
Comment 16 Maik Qualmann 2024-09-18 10:46:22 UTC
For comment 14:
We check at the start whether the MariaDB binary files stored in the config are still there. Perhaps the server has been updated and the paths in the config are no longer correct.

https://invent.kde.org/graphics/digikam/-/blob/master/core/libs/album/manager/albummanager_database.cpp?ref_type=heads#L113

Maik
Comment 17 Maik Qualmann 2024-09-18 10:47:57 UTC
For comment 15 you might be able to find out more in the terminal log with the Qt debug variable enabled.

Maik
Comment 18 Michael Miller 2024-09-18 19:27:44 UTC
Created attachment 173842 [details]
Latest errors
Comment 19 Maik Qualmann 2024-09-18 19:36:40 UTC
Please start digiKam in the macOS Terminal with Qt debug variable, there may be better information:

export QT_LOGGING_RULES="digikam*=true"
/Applications/digiKam.org/digikam.app/Contents/MacOS/digikam

Maik
Comment 20 Michael Miller 2024-09-18 19:38:07 UTC
I'm still getting errors when I launch digiKam with a fresh install.

https://bugs.kde.org/attachment.cgi?id=173842

Steps to reproduce:
1. Install latest digiKam-8.5.0-20240918T163828-Qt6-MacOS-arm64
2. delete ~/Library/Preferences/digikamrc
3. delete MySQL DB files (.mysql.digikam)
4. Launch digiKam from the Finder
5. During install, select MySQL Internal as the DB type

No files or subdirectories in .mysql.digikam
Comment 21 Michael Miller 2024-09-18 19:41:16 UTC
michmill@Michaels-Virtual-Machine ~ % /Applications/digiKam.org/digikam.app/Contents/MacOS/digikam
digikam.widgets: Breeze icons resource file found
digikam.general: Qt standard translations removed: 0
digikam.general: Qt standard translations path: "/Applications/digiKam.org/digikam.app/Contents/Resources/translations"
digikam.general: Loaded Qt standard translations "en_US" from catalog "qt"
digikam.general: Loaded Qt standard translations "en_US" from catalog "qtbase"
digikam.general: Loaded Qt standard translations "en_US" from catalog "qt_help"
digikam.general: Loaded Qt standard translations "en_US" from catalog "qtdeclarative"
digikam.general: Loaded Qt standard translations "en_US" from catalog "qtmultimedia"
digikam.general: Loaded Qt standard translations "en_US" from catalog "qtwebengine"
digikam.general: Loaded Qt ECM translations "en" from catalog "kcoreaddons6_qt"
digikam.general: Loaded Qt ECM translations "en" from catalog "kwidgetsaddons6_qt"
qt.svg: Could not create image from "/media/250gb/valokuvat/Syksy 02-09-05 Kuusamo, inkavaaralla luonnonpuistossa suomen komeimman kosken kuvaamista/img_5766_4.jpg"
qt.svg: Could not create image from "/media/250gb/valokuvat/Syksy 02-09-05 Kuusamo, inkavaaralla luonnonpuistossa suomen komeimman kosken kuvaamista/img_5766_4.jpg"
qt.qpa.fonts: Populating font family aliases took 65 ms. Replace uses of missing font family "Bitstream Vera Sans" with one that exists to avoid this cost.
digikam.general: Switch to widget style:  "Breeze"
digikam.general: AlbumWatch is disabled
digikam.general: Database Parameters:
   Type:                        "QMYSQL"
   DB Core Name:                "digikam"
   DB Thumbs Name:              "digikam"
   DB Face Name:                "digikam"
   DB Similarity Name:          "digikam"
   Connect Options:             "UNIX_SOCKET=/Users/michmill/Library/Application Support/digikam/digikam/db_misc/mysql.socket"
   Host Name:                   ""
   Host Port:                   -1
   WAL Mode:                    false
   Internal Server:             true
   Internal Server Path:        "/Users/michmill/testpics"
   Internal Server Init Cmd:    "/Applications/digiKam.org/digikam.app/Contents/lib/mariadb/bin/mariadb-install-db"
   Internal Server Admin Cmd:   "/Applications/digiKam.org/digikam.app/Contents/lib/mariadb/bin/mariadb-admin"
   Internal Server Program Cmd: "/Applications/digiKam.org/digikam.app/Contents/lib/mariadb/bin/mariadbd"
   Internal Server Upgrade Cmd: "/Applications/digiKam.org/digikam.app/Contents/lib/mariadb/bin/mariadb-upgrade"
   Username:                    "root"
   Password:                    ""

digikam.databaseserver: Database Parameters:
   Type:                        "QMYSQL"
   DB Core Name:                "digikam"
   DB Thumbs Name:              "digikam"
   DB Face Name:                "digikam"
   DB Similarity Name:          "digikam"
   Connect Options:             "UNIX_SOCKET=/Users/michmill/Library/Application Support/digikam/digikam/db_misc/mysql.socket"
   Host Name:                   ""
   Host Port:                   -1
   WAL Mode:                    false
   Internal Server:             true
   Internal Server Path:        "/Users/michmill/testpics"
   Internal Server Init Cmd:    "/Applications/digiKam.org/digikam.app/Contents/lib/mariadb/bin/mariadb-install-db"
   Internal Server Admin Cmd:   "/Applications/digiKam.org/digikam.app/Contents/lib/mariadb/bin/mariadb-admin"
   Internal Server Program Cmd: "/Applications/digiKam.org/digikam.app/Contents/lib/mariadb/bin/mariadbd"
   Internal Server Upgrade Cmd: "/Applications/digiKam.org/digikam.app/Contents/lib/mariadb/bin/mariadb-upgrade"
   Username:                    "root"
   Password:                    ""

digikam.databaseserver: Internal Server data path: "/Users/michmill/testpics/.mysql.digikam/db_data"
digikam.databaseserver: The mysql configuration was already up-to-date: "/Users/michmill/Library/Application Support/digikam/digikam/mysql.conf"
digikam.databaseserver: Database initializer: "/Applications/digiKam.org/digikam.app/Contents/lib/mariadb/bin/mariadb-install-db" QList("--defaults-file=/Applications/digiKam.org/digikam.app/Contents/Resources/digikam/database/mysql-global.conf", "--basedir=/Applications/digiKam.org/digikam.app/Contents//lib/mariadb/", "--datadir=/Users/michmill/testpics/.mysql.digikam/db_data")
digikam.databaseserver: "Could not start database initializer."
digikam.databaseserver: Executable: "/Applications/digiKam.org/digikam.app/Contents/lib/mariadb/bin/mariadb-install-db"
digikam.databaseserver: Arguments: "--defaults-file=/Applications/digiKam.org/digikam.app/Contents/Resources/digikam/database/mysql-global.conf, --basedir=/Applications/digiKam.org/digikam.app/Contents//lib/mariadb/, --datadir=/Users/michmill/testpics/.mysql.digikam/db_data"
digikam.databaseserver: Stdout: "\nFATAL ERROR: Could not find /Applications/digiKam.org/digikam.app/Contents//lib/mariadb//lib/mariadb-10.11/bin/mariadbd\n\nIf you compiled from source, you need to either run 'make install' to\ncopy the software into the correct location ready for operation.\nIf you don't want to do a full install, you can use the --srcdir\noption to only install the mysql database and privilege tables.\n\nIf you are using a binary release, you must either be at the top\nlevel of the extracted archive, or pass the --basedir option\npointing to that location.\n\nThe latest information about mysql_install_db is available at\nhttps://mariadb.com/kb/en/installing-system-tables-mysql_install_db\n"
digikam.databaseserver: Stderr: ""
digikam.databaseserver: Exit code: 1
digikam.databaseserver: Process error: "Unknown error"
digikam.databaseserver: Cannot start internal database server
digikam.general: Testing  "mariadb-upgrade" ...
digikam.general: Testing  "mariadbd" ...
digikam.general: Testing  "mariadb-admin" ...
digikam.general: Testing  "mariadb-install-db" ...
digikam.general: Testing  "mariadbd" ...
digikam.general: Testing  "mariadb-admin" ...
digikam.general: Testing  "mariadb-upgrade" ...
digikam.general: Testing  "mariadb-install-db" ...
digikam.general: Testing  "/opt/local/bin/mariadbd" ...
digikam.general: All Binaries Found :  false
digikam.general: Testing  "/opt/local/bin/mariadb-admin" ...
digikam.general: All Binaries Found :  false
digikam.general: Testing  "/opt/local/bin/mariadb-upgrade" ...
digikam.general: All Binaries Found :  false
digikam.general: Testing  "/opt/local/bin/mariadb-install-db" ...
digikam.general: All Binaries Found :  false
digikam.general: Testing  "/opt/local/sbin/mariadbd" ...
digikam.general: All Binaries Found :  false
digikam.general: Testing  "/opt/local/sbin/mariadb-admin" ...
digikam.general: All Binaries Found :  false
digikam.general: Testing  "/opt/local/sbin/mariadb-upgrade" ...
digikam.general: All Binaries Found :  false
digikam.general: Testing  "/opt/local/sbin/mariadb-install-db" ...
digikam.general: All Binaries Found :  false
digikam.general: Testing  "/opt/local/lib/mariadb/bin/mariadbd" ...
digikam.general: All Binaries Found :  false
digikam.general: Testing  "/opt/local/lib/mariadb/bin/mariadb-admin" ...
digikam.general: All Binaries Found :  false
digikam.general: Testing  "/opt/local/lib/mariadb/bin/mariadb-upgrade" ...
digikam.general: All Binaries Found :  false
digikam.general: Testing  "/opt/local/lib/mariadb/bin/mariadb-install-db" ...
digikam.general: All Binaries Found :  false
digikam.general: Testing  "/Applications/digiKam.org/digikam.app/Contents/lib/mariadb/bin/mariadbd" ...
digikam.general: Found  "/Applications/digiKam.org/digikam.app/Contents/lib/mariadb/bin/mariadbd"
digikam.general: All Binaries Found :  false
digikam.general: Testing  "/Applications/digiKam.org/digikam.app/Contents/lib/mariadb/bin/mariadb-admin" ...
digikam.general: Found  "/Applications/digiKam.org/digikam.app/Contents/lib/mariadb/bin/mariadb-admin"
digikam.general: All Binaries Found :  false
digikam.general: Testing  "/Applications/digiKam.org/digikam.app/Contents/lib/mariadb/bin/mariadb-upgrade" ...
digikam.general: Found  "/Applications/digiKam.org/digikam.app/Contents/lib/mariadb/bin/mariadb-upgrade"
digikam.general: All Binaries Found :  false
digikam.general: Testing  "/Applications/digiKam.org/digikam.app/Contents/lib/mariadb/bin/mariadb-install-db" ...
digikam.general: Found  "/Applications/digiKam.org/digikam.app/Contents/lib/mariadb/bin/mariadb-install-db"
digikam.general: All Binaries Found :  true
digikam.general: Testing  "/Applications/digiKam.org/digikam.app/Contents/lib/mariadb/bin/mariadb-upgrade" ...
digikam.general: Found  "/Applications/digiKam.org/digikam.app/Contents/lib/mariadb/bin/mariadb-upgrade"
digikam.general: All Binaries Found :  true
digikam.general: Testing  "/Applications/digiKam.org/digikam.app/Contents/lib/mariadb/bin/mariadbd" ...
digikam.general: Found  "/Applications/digiKam.org/digikam.app/Contents/lib/mariadb/bin/mariadbd"
digikam.general: All Binaries Found :  true
digikam.general: Testing  "/Applications/digiKam.org/digikam.app/Contents/lib/mariadb/bin/mariadb-admin" ...
digikam.general: Found  "/Applications/digiKam.org/digikam.app/Contents/lib/mariadb/bin/mariadb-admin"
digikam.general: All Binaries Found :  true
digikam.general: Testing  "/Applications/digiKam.org/digikam.app/Contents/lib/mariadb/bin/mariadb-install-db" ...
digikam.general: Found  "/Applications/digiKam.org/digikam.app/Contents/lib/mariadb/bin/mariadb-install-db"
digikam.general: All Binaries Found :  true
digikam.databaseserver: Internal database server stopped
Comment 22 Maik Qualmann 2024-09-18 20:09:22 UTC
MariaDB appears to be installed in:

/Applications/digiKam.org/digikam.app/Contents/lib/mariadb/bin/mariadbd

MariaDB appears to be compiled with the version number in the path:

/Applications/digiKam.org/digikam.app/Contents//lib/mariadb//lib/mariadb-10.11/bin/mariadbd

Presumably mariaDB uses the path with version number in its own config. Maybe a symlink will help?

Maik
Comment 23 Michael Miller 2024-09-18 20:49:26 UTC
(In reply to Maik Qualmann from comment #22)
> MariaDB appears to be installed in:
> 
> /Applications/digiKam.org/digikam.app/Contents/lib/mariadb/bin/mariadbd
> 
> MariaDB appears to be compiled with the version number in the path:
> 
> /Applications/digiKam.org/digikam.app/Contents//lib/mariadb//lib/mariadb-10.
> 11/bin/mariadbd
> 
> Presumably mariaDB uses the path with version number in its own config.
> Maybe a symlink will help?
> 
> Maik

I just added:
>sudo ln  -s "./mariadb" /Applications/digiKam.org/digikam.app/Contents/lib/mariadb-10.11

but it didn't work.  Same error.