Bug 389179 - Error creating mysql db for internal server (mysql_install_db)
Summary: Error creating mysql db for internal server (mysql_install_db)
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Database-Mysql (other bugs)
Version First Reported In: 5.8.0
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-18 21:22 UTC by Tobias Philipp
Modified: 2023-04-24 03:49 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 8.1.0
Sentry Crash Report:


Attachments
Error message screenshot (29.93 KB, image/png)
2018-01-18 21:22 UTC, Tobias Philipp
Details
First run dialog with mysql binaries found (114.69 KB, image/png)
2018-01-22 21:34 UTC, Tobias Philipp
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Philipp 2018-01-18 21:22:22 UTC
Created attachment 109975 [details]
Error message screenshot

Hello,

i wanted to test the new mysql functions with the the release of digikam 5.8.
I created a new user und selected in the firs-run dialog mysql "internel server".
Digicam started to create the database but the following error message ocourred:

Error while creating database (translated from german)

Details: Could not start database initializer.
Executable: mysql_install_db

See the full message in the attachment.

I tested the command from the error message in a console window and get folowing error message:

---- Start -----
FATAL ERROR: Could not find ./bin/my_print_defaults

If you compiled from source, you need to either run 'make install' to
copy the software into the correct location ready for operation.
If you don't want to do a full install, you can use the --srcddir
option to only install the mysql database and privilege tables

If you are using a binary release, you must either be at the top
level of the extracted archive, or pass the --basedir option
pointing to that location.

The latest information about mysql_install_db is available at
https://mariadb.com/kb/en/installing-system-tables-mysql_install_db
---- End -----

When i add the --basedir=/usr option to the mysql_install_db command it will run without error but digicam cannot use the created database

I'm using the new digikam 5.8 appimage on Manjaro Linux with all updates and mariadb 10.1.30-1 installed
Comment 1 Maik Qualmann 2018-01-18 22:00:27 UTC
I think it's a problem of the AppImage and finding the right path. Here under openSUSE the AppImage does not find the path to the mysqld and has to be set manually. Set in the dialog the path to mysql_install_db for testing please manually. The syntax for mysql_install_db is correct and works here under a native digiKam version without problems. Here also with a newer MariaDB version.

Maik
Comment 2 Tobias Philipp 2018-01-22 21:34:08 UTC
Hi,

sorry for the late answer...

I deleted the previously generated config files and data directories and started from scratch.
The first run dialog shows that he is finding the binaris correct. but i set them nevertheless through the file picker dialog.
Nothing changed, same error.
How a said in the first comment, if i run the mysql_install_db with the arguments given in the error message from digikam in a console window, i get an error message from mysql_install_db. i think, digikam is getting the same error message...

Aattached the screenshot with the mysql binaris found by the first run dialog, bevore i set them.
Comment 3 Tobias Philipp 2018-01-22 21:34:39 UTC
Created attachment 110057 [details]
First run dialog with mysql binaries found
Comment 4 Maik Qualmann 2018-01-23 20:11:31 UTC
The question is, are my_print_defaults and mysql_install_db not in the same directory?

Maik
Comment 5 Tobias Philipp 2018-01-23 20:14:46 UTC
Hi,

i checked the location of the files:

[philipp@ryzen ~]$ which my_print_defaults
/usr/bin/my_print_defaults
[philipp@ryzen ~]$ which mysql_install_db
/usr/bin/mysql_install_db
Comment 6 caulier.gilles 2020-08-04 08:14:23 UTC
digiKam 7.0.0 stable release is now published:

https://www.digikam.org/news/2020-07-19-7.0.0_release_announcement/

We need a fresh feedback on this file using this version.

Best Regards

Gilles Caulier
Comment 7 Tobias Philipp 2020-08-20 20:24:31 UTC
Hi,

i tested the mysql_internal feature with the 7.0 build from Manjaro (Appimage is not working) and i could create and use digikam with internal mysql db without problems.

One question: Are the mysql-bin.00000* (Binary Log Files) needed for digikam to function properly? The "digikam" folder in db_data is 6.1GB large, the bin logs add another 8.1GB... (for 196.000 images)

digikam 7.0.0-2 Manjaro
my_print_defaults  Ver 1.7
mariadb 10.4.14-1

Greetings
Tobias
Comment 8 caulier.gilles 2023-04-24 03:49:11 UTC
mysql-bin.00000* (Binary Log Files) are for recovery purpose. See details here:

https://stackoverflow.com/questions/29557000/how-to-prevent-mysql-from-createing-mysql-bin-00000x-files

Gilles Caulier