Created attachment 137312 [details] DigiKam uses MariaDB installation folder to store MySQL Internal database, instead of assigned folder in DigiKam settings SUMMARY DigiKam isn't using the folder which I stipulate on DigiKam settings for storing the MySQL database. Instead, it saves all data (e.g. thumbnails, faces data, metadata) inside the MariaDB installation folder, in "C:\Program Files". The folder that should be used do get populated by some files, but only on database creation/migration, which doesn't get updated or modified posteriorly. STEPS TO REPRODUCE 1. Updated from DigiKam 7.1.0 to 7.3.0, while still using SQLite as DigiKam database in "C:\folder-A\" (folder size ~3Gb) 2. Performed clean MariaDB installation on "C:\Program Files\MariaDB 10.5\", following DigiKam suggested download link. 3. Set system environment variable "Path" to include "C:\Program Files\MariaDB 10.5\" 4. Modify DigiKam database configuration in "Setting > Configure DigiKam > Database > type" from SQLite to Mysql internal 5. Modify DigiKam database configuration in "Setting > Configure DigiKam > Database > database location" to "C:\folder-B\" 6. Modify DigiKam database configuration in "Setting > Configure DigiKam > Database > MySQL Binaries" to select "mysql_install_db.exe" and "mysqld.exe" in "C:\Program Files\MariaDB 10.5\bin\" 7. Restart DigiKam 8. Migrate SQLite database from "C:\folder-A" to MySQL internal "C:\folder-B" using DigiKam "Settings > Database migration" tool (around 40minutes to complete, no errors reported). 9. Restart DigiKam 10. Start DigiKam OBSERVED RESULT - DigiKam data is clean, collections folder needs to be reselected; thumbnails, faces data, tags, etc are gone. - DigiKam settings are preserved. - Data from the previous SQLite "C:\folder-A" (~3GB) isn't migrated to MySQL internal "C:\folder-B" (~87MB). - Newly generated data (thumbnails, faces data, tags, etc) is generated in "C:\Program Files\MariaDB 10.5\data\digikam\". - Newly generated data doesn't cause any modification in MySQL Internal "C:\folder-B" thereafter, which remains with ~87MB. - DigiKam "Setting > Configure DigiKam > Database > type" and "database location" are still set to MySQL Internal and to "C:\folder-B", respectively. EXPECTED RESULT - DigiKam data is preserved and migrated to MySQL Internal "C:\folder-B" - Newly generated data goes to "C:\folder-B" SOFTWARE/OS VERSIONS Windows: Edition Windows 10 Pro Version 21H1 Installed on 2020-10-06 OS build 19043.867 Experience Windows Feature Experience Pack 120.2212.3030.0 KDE Plasma Version: KDE Frameworks Version: KDE Frameworks 5.80.0 Qt Version: Qt 5.15.2 (built against 5.15.2) ADDITIONAL INFORMATION Digikam version 7.3.0 Build date: 2021-04-01 19:09 (target: RelWithDebInfo) Rev.: 70451ec1185a29ca7033879ed75795f8ea1c5cde CPU cores: 4 Eigen: 3.3.7 Exiv2: 0.27.4 Exiv2 supports Base Media: Yes Exiv2 supports XMP metadata: Yes HEIF encoding support: Yes ImageMagick codecs: 7.0.8 KF5: 5.80.0 LensFun: 0.3.95-0 LibCImg: 130 LibJPEG: 90 LibJasper: 2.0.23 LibLCMS: 2100 LibLqr support: No LibPGF: 7.19.03 LibPNG: 1.6.37 LibRaw: 0.21.0 LibTIFF: 4.2.0 Marble: 0.27.20 Parallelized demosaicing: No Qt: 5.15.2 Qt Webkit support: Yes Rajce support: Yes VKontakte support: No AkonadiContact support: No Baloo support: No Calendar support: Yes DBus support: No Database backend: QMYSQL Database internal server: Yes HTML Gallery support: Yes LibAVCodec: 58.54.100 LibAVFormat: 58.29.100 LibAVUtil: 56.31.100 LibGphoto2 support: No LibOpenCV: 4.5.1 LibQtAV: 1.13.0 Media player support: Yes Panorama support: Yes Database backend: QMYSQL Database internal server: Yes Database internal server Path: D:/resources/03_data-apps/data-digikam-mysql-db Database locale: System
Your approach reads right, but you will have done something wrong. Use the migration tool again to copy the database. I do this often to test the functions and databases of digiKam and have no problems. Maik
Where does this difference in the paths come from: 5. Modify DigiKam database configuration in "Setting > Configure DigiKam > Database > database location" to "C:\folder-B\" And this: Database internal server Path: D:/resources/03_data-apps/data-digikam-mysql-db Maik
digiKam does not voluntarily use the MariaDB installation folder, nor does it normally have the necessary rights. I've never done this after installing MariaDB on Windows: 3. Set system environment variable "Path" to include "C:\Program Files\MariaDB 10.5\" Maik
(In reply to Maik Qualmann from comment #2) > Where does this difference in the paths come from: > > 5. Modify DigiKam database configuration in "Setting > Configure DigiKam > > Database > database location" to "C:\folder-B\" > > And this: > > Database internal server Path: > D:/resources/03_data-apps/data-digikam-mysql-db > > Maik Sorry, I used "C:\folder-B" only to simplify the explanation. The "folder-B" I'm using is actually this "D:/resources/03_data-apps/data-digikam-mysql-db"; "folder-A" would be "D:/resources/03_data-apps/data-digikam-SQLite-db"; Everything else is as stated
Is there a ".mysql.digikam" folder in the internal server path? Maik
(In reply to Maik Qualmann from comment #5) > Is there a ".mysql.digikam" folder in the internal server path? > > Maik Yes, the ".mysql.digikam" gets created when I set the internal server path but remains unmodified after that.
So that we can see which settings are actually currently set, install DebugView from Microsoft and give us the log from the start, as described here for Windows: https://www.digikam.org/contribute/ Don't forget to set the environment variable. Maik
Created attachment 137315 [details] mariaDB installation folder
Created attachment 137316 [details] folder set in digikam settings that should be used as database
Created attachment 137317 [details] DebugView log file after starting digikam
I'm sorry guys, the problem do seem to be step 3 (Set system environment variable "Path" to include "C:\Program Files\MariaDB 10.5\"). I set this env variable so I could use MariaDB on Windows Terminal later, which is not possible otherwise. Removing MariaDB folder as a system environment variable reverted the problem. DigiKam starts using the correct folder set in database settings and stops saving new data in MariaDB installation folder (and just leaves all data in there, as if never happened). I don't know if you could consider this a bug, but DigiKam did ignore the database folder set in settings. Thanks for your help! I'll try to find a way to use MariaDB on Windows Terminal without env var set.
Ok, thanks for the feedback, I'll close the bug. Maik