https://bugs.kde.org/show_bug.cgi?id=527903
Bug ID: 527903
Summary: During initial setup on macOS, choosing "Mysql
Internal" fails with "Could not start MariaDB database
initializer"
Classification: Applications
Product: digikam
Version First 9.1.0
Reported In:
Platform: macOS (DMG)
OS: macOS
Status: REPORTED
Severity: normal
Priority: NOR
Component: Database-MariaDB
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Created attachment 197716
--> https://bugs.kde.org/attachment.cgi?id=197716&action=edit
Initial setup error; the same error occured when I selected Homebrew MariaDB
tools afterward
DESCRIPTION
During initial setup of digiKam 9.1.0 on macOS arm64, three options are given
for database storage: SQLite, Mysql Internal, and Mysql Server. selecting
"Mysql Internal" fails with "Could not start database initializer."
Running the bundled mariadb-install-db script directly reveals that it
constructs an incorrect path to the bundled mariadbd executable. A corrected
copy of the initializer successfully initialized an empty test database.
Possibly related: https://bugs.kde.org/show_bug.cgi?id=467505
That report is marked fixed in 9.0.0; comment 25 requests a new report for
subsequent MariaDB issues on macOS. (Whether this is a regression hasn't been
established.)
STEPS TO REPRODUCE
1. Install and launch digiKam 9.1.0 on macOS arm64.
2. During initial setup, select "Mysql Internal" and use the bundled MariaDB
tools in /Applications/digiKam.org/digikam.app/Contents/lib/mariadb/bin/.
3. Select a local database directory and continue setup.
OBSERVED RESULT
Setup displays:
> An error occurred during the internal server start.
>
> Details:
> Could not start database initializer.
>
> ...
>
> Process error: Unknown error
Running the bundled initializer directly with the same configuration and base
directory, targeting a separate empty test database directory, exits with
status 1:
```
FATAL ERROR: Could not find
/Applications/digiKam.org/digikam.app/Contents/lib/mariadb//lib/mariadb-10.11/bin/mariadbd
```
The bundled executable exists at:
/Applications/digiKam.org/digikam.app/Contents/lib/mariadb/bin/mariadbd
EXPECTED RESULT
The bundled MariaDB tools initialize the database successfully, allowing
initial setup to continue without installing another database package or
modifying the initializer.
SOFTWARE/OS VERSIONS
Operating System: macOS 27.0.1 (26A434), arm64
KDE Plasma Version: Not applicable
KDE Frameworks Version: Not collected
Qt Version: Not collected
digiKam: 9.1.0
Bundled MariaDB: 10.11.13
ADDITIONAL INFORMATION
The original setup failure occurred with the bundled MariaDB tools. Selecting
Homebrew MariaDB 13.0.2 tools afterward did not resolve it. The reproduction
and successful test below use the bundled tools only.
COMMAND-LINE REPRODUCTION
The following reproduces the bundled invocation using a separate temporary
database directory:
```
bundle="/Applications/digiKam.org/digikam.app/Contents"
test_root="$(mktemp -d)"
"$bundle/lib/mariadb/bin/mariadb-install-db" \
--defaults-file="$bundle/Resources/digikam/database/mysql-global.conf" \
--basedir="$bundle/lib/mariadb/" \
--datadir="$test_root/db_data"
```
The bundled "mariadb" directory is a symbolic link to "mariadb-10.11". In its
explicit-basedir branch, the initializer appends
"lib/mariadb-10.11/bin/mariadbd" to a base directory that *already* points
inside the MariaDB installation.
TESTED LOCAL CORRECTION
A copy of the initializer was made outside the application bundle. These
literal substitutions were applied:
$basedir/lib/mariadb-10.11/bin
→ $basedir/bin
$basedir/lib/mariadb-10.11/plugin
→ $basedir/plugin
The substitutions affect both the explicit-basedir and relative-location
branches. Only the explicit-basedir branch was exercised in this test.
Running the corrected initializer with the same bundled configuration, base
directory, and empty test database location exited with status 0 and reported:
```
Installing MariaDB/MySQL system tables in '.../db_data' ...
OK
```
A hostname-resolution warning was also printed, but initialization completed.
--
You are receiving this mail because:
You are watching all bug changes.