Bug 472734 - Database creation on MariaDB fails
Summary: Database creation on MariaDB fails
Status: RESOLVED NOT A BUG
Alias: None
Product: digikam
Classification: Applications
Component: Database-Mysql (other bugs)
Version First Reported In: 8.1.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-28 09:19 UTC by m.kde
Modified: 2023-08-01 06:23 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description m.kde 2023-07-28 09:19:32 UTC
SUMMARY

STEPS TO REPRODUCE
1. Setup new instance of LinuxServer/digikam at docker
2. Go through the wizard and select mysql as db provider --> do the connection check
2a. Use SQLite first, then try to migrate to mysql - same result
3. Everything is fine
4. "Error while creating the database schema", although a couple of tables have successfully been created:
AlbumRoots, Albums, DownloadHistory, ImageComments, ImageCopyright, ImageHistory, ImageInformation, ImageMetadata, ImagePositions, ImageProperties, ImageRelations, ImageTagProperties, ImageTags, Images, Searches, Settings, TagProperties, Tags, TagsTree, VideoMetadata
User has full rights ln the databse (MariaDB: 10.11.4-MariaDB-log)

I have several other apps using that MariaDB instance with no problems.
Comment 1 Maik Qualmann 2023-07-28 09:42:15 UTC
Please provide a log from the terminal/console with the Qt-Debug environment variable set, as described here:

https://www.digikam.org/contribute/

Maik
Comment 2 m.kde 2023-07-28 09:54:28 UTC
> $ echo $QT_LOGGING_RULES
> digikam*=true

But I dont' really see any interesting lines in docker logs - might be an issue with the linux server container, though.

Here are the logs anyway:
digikam    | [migrations] started
digikam    | [migrations] no migrations found
digikam    | ───────────────────────────────────────
digikam    |
digikam    |       ██╗     ███████╗██╗ ██████╗
digikam    |       ██║     ██╔════╝██║██╔═══██╗
digikam    |       ██║     ███████╗██║██║   ██║
digikam    |       ██║     ╚════██║██║██║   ██║
digikam    |       ███████╗███████║██║╚██████╔╝
digikam    |       ╚══════╝╚══════╝╚═╝ ╚═════╝
digikam    |
digikam    |    Brought to you by linuxserver.io
digikam    | ───────────────────────────────────────
digikam    |
digikam    | To support LSIO projects visit:
digikam    | https://www.linuxserver.io/donate/
digikam    |
digikam    | ───────────────────────────────────────
digikam    | GID/UID
digikam    | ───────────────────────────────────────
digikam    |
digikam    | User UID:    1002
digikam    | User GID:    1015
digikam    | ───────────────────────────────────────
digikam    |
digikam    | [custom-init] No custom files found, skipping...
digikam    | _XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created.
digikam    |
digikam    | Xvnc KasmVNC 1.1.0 - built Jul 22 2023 18:35:28
digikam    | Copyright (C) 1999-2018 KasmVNC Team and many others (see README.me)
digikam    | See http://kasmweb.com for information on KasmVNC.
digikam    | Underlying X server release 12014000, The X.Org Foundation
digikam    |
digikam    | 2023/07/28 11:49:48 [warn] 224#224: could not build optimal types_hash, you should increase either types_hash_max_size: 1024 or types_hash_bucket_size: 64; ignoring types_hash_bucket_size
digikam    | [ls.io-init] done.
digikam    | Obt-Message: Xinerama extension is not present on the server
digikam    |  2023-07-28 11:50:22,955 [INFO] websocket 0: got client connection from 127.0.0.1
digikam    |  2023-07-28 11:50:22,977 [PRIO] Connections: accepted: @192.168.x.y_1690537832.962795::websocket
Comment 3 Maik Qualmann 2023-07-28 10:35:39 UTC
If you have no way to get to the terminal log, try a native digiKam version or our AppImage, which can just be started without installation.

Because the tables are created, I suspect a problem with the creation of the trigger. Check if you also have the rights to create triggers.
For triggers, see this Bug 447416 or Bug 435065 as an example.

Maik
Comment 4 m.kde 2023-07-28 11:53:39 UTC
thanks - I was able to add a test trigger by cli using the very same user.

I guess I have to get to the logs then - I'll be back!
Comment 5 m.kde 2023-07-28 18:32:51 UTC
damn, some uügrade issues with mariadb - fixed it on the db side

thanks for your quick replies!
Comment 6 Maik Qualmann 2023-08-01 06:23:39 UTC
Git commit 9ed1deb785ce30f316f89fc7c38daee126d5ec60 by Maik Qualmann.
Committed on 01/08/2023 at 08:21.
Pushed by mqualmann into branch 'master'.

add note for MySQL server on Ubuntu
Related: bug 472841
FIXED-IN: 8.2.0

M  +1    -1    NEWS
M  +3    -0    core/libs/database/utils/widgets/dbsettingswidget.cpp

https://invent.kde.org/graphics/digikam/-/commit/9ed1deb785ce30f316f89fc7c38daee126d5ec60