| Summary: | digiKam "You have insufficient privileges on database. | ||
|---|---|---|---|
| Product: | [Applications] digikam | Reporter: | David <ticedoff8> |
| Component: | Database-Multiusers | Assignee: | Digikam Developers <digikam-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | caulier.gilles, metzpinguin, ticedoff8 |
| Priority: | NOR | ||
| Version First Reported In: | 8.1.0 | ||
| Target Milestone: | --- | ||
| Platform: | Microsoft Windows | ||
| OS: | Microsoft Windows | ||
| Latest Commit: | Version Fixed/Implemented In: | 8.6.0 | |
| Sentry Crash Report: | |||
| Attachments: |
Database configuration details
phpMyAdmin shows proper privileges for database user "digikam" List of 28 tables that are in the database "digikam" and were created by the digiKam app on the first pass. Log file from DebugView when starting DigiKam - waited a minute and <Cancel> on the popup Log file after changing to IP address - did not help |
||
Created attachment 178622 [details]
phpMyAdmin shows proper privileges for database user "digikam"
Created attachment 178623 [details]
List of 28 tables that are in the database "digikam" and were created by the digiKam app on the first pass.
Did you expect that all different computers access to the same database stored on the NAS ? If yes, it's not supported. https://docs.digikam.org/en/setup_application/collections_settings.html# Do you also use the '%' placeholder with digiKam? Then please use the IP address of the NAS. We have already seen strange effects here, depending on the network configuration. Otherwise we need a DebugView log of the process, as described here for Windows: https://www.digikam.org/contribute/#windows-host Maik Created attachment 178658 [details]
Log file from DebugView when starting DigiKam - waited a minute and <Cancel> on the popup
Comment on attachment 178658 [details]
Log file from DebugView when starting DigiKam - waited a minute and <Cancel> on the popup
[quote]Do you also use the '%' placeholder with digiKam? Then please use the IP address of the NAS. We have already seen strange effects here, depending on the network configuration.[/quote]
There was a % placeholder pre-loaded in one of the options when I installed DigiKam, but I can't double-check until I get past the failure to CREATE TABLES issues. Where should I look related to your question?
Created attachment 178659 [details]
Log file after changing to IP address - did not help
Changed Remote Server Settings "Host Name" from its DNS short hostname to the IP address, but it still fails
I noticed these lines about "No space left on device" in the DebugView log:
00000112 93.99256897 [19380] digikam.coredb: Core database: running schema update
00000113 93.99736786 [19380] digikam.dbengine: Failure executing query:
00000114 93.99736786 [19380] ""
00000115 93.99736786 [19380] Error messages: "QMYSQL: Unable to execute query" "Error writing file './digikam/PrivCheck.frm' (Errcode: 28 \"No space left on device\")" "3" 2
00000116 93.99736786 [19380] Bound values: QList()
00000117 93.99742126 [19380] digikam.dbengine: Error while executing DBAction [ "CheckPriv_CREATE_TABLE" ] Statement [ "CREATE TABLE IF NOT EXISTS PrivCheck\n (id INT,\n name VARCHAR(35))\n ENGINE InnoDB;\n " ]
00000118 93.99750519 [19380] digikam.coredb: Core database: error while creating a trigger. Details: QSqlError("3", "QMYSQL: Unable to execute query", "Error writing file './digikam/PrivCheck.frm' (Errcode: 28 \"No space left on device\")")
At this point, the C:\ has 181GB free (1TB nVME), D:\ has 294GB (1TB SSD) free and the NAS has 10TB free.
The message is clear: there is no more free space in the area where the MySQL NAS server wants to write the file "PrivCheck.frm". Error messages: "QMYSQL: Unable to execute query" "Error writing file './digikam/PrivCheck.frm' (Errcode: 28 \"No space left on device\")" It is possible that the NAS segments the maximum MySQL storage per user and needs to be changed. This would not be unusual. Maik To explain, we always create a table (also a trigger) with the name "CheckPriv_CREATE_TABLE" at the start to check whether this works without problems and whether we have all the rights. This is then deleted again. Your NAS server no longer has space to create this table. Maik F'ing Western Digial and their NAS. So close. I thought I had the "Easy Button". I'll open a case with them and find out if it's possible to expand. Or, I need to find a good docker-compose entry for MariaDB and run it on my swarm (swarm of 2). [SOLVED] The issue is resolved. It was caused by the disk being full, and the solution was to move the database to the RAID5 (with 10TB free). Details: By default, when the "Network Database" is enabled on the WD PR4100, it will use a small partition of one drive that is left over after a larger 4-drive RAID5 is created. The "solution" was to stop the MariaDB service (using the PR4100 AdminGUI and turning off the "Network Database"), then SSH into the PR4100 and look for the folder .@database@ on one of the 4 drives (/mnt/HD_(a,b,c,d)4). Then use mv (move) command to move that folder to the protected RAID5 mount (/mnt/HD/HD_a2). After that, make a link in the original location (EG: /mnt/HD_b4) to the new location (/mnt/HD/HD_a2/.@database@) and re-enable the "Network Database" option in the AdminGUI. digiKam now starts with no warnings. However, while the entire list of Albums is displayed, not all of them have picture previews. phpMyAdmin Status shows network traffic and what appears to be reads. And on digiKam it looks like it is rescanning the Collections (maybe to fill in the missing entries that got skipped when the database ran out of space the 1st time). Thanks for the feedback and description. Maik |
Created attachment 178621 [details] Database configuration details SUMMARY: I am getting an error message when I restart digiKam saying the MySQL database user "digikam" lacks the privilege to "CREATE TABLES". Everything worked the first time when it created all the tables and entries needed to catalog the 300k images (screenshots attached), so it seems it was okay at first, then something changed. I'm trying to set up a system where multiple PC can access the same SMB shared NAS picture library. The NAS (WD PR4100 w/ 16GB RAM, 24TB usable) has a "built-in" MariaDB (v10.5.19-MariaDB) being used for the MySQL Server in the digiKam app. This error message is popping up on both PCs that were fine when the logged in the 1st time and started to catalog images, so they are both now locked out. And, most importantly, when I was testing this on a smaller scale, I didn't have to do anything to see if digiKam on a MySQL server with multiple PCs access the shared image library was possible. It just worked. Then I uninstalled digiKam on 2 PCs, dumped the database and started over from scratch. STEPS TO REPRODUCE 1. Using a Remote MySQL server that is "built-in" on a WD PR4100 NAS (MariaDB v10.5.19-MariaDB) and phpMyAdmin to manage (3rd Party app installed on the NAS). Used phpMyAdmin to create a new user "digikam" and assigned a simple password (digikam) for that use. phpMyAdmin also created a database with the name "digikam" and assigned all the privileges for that user to own the database. At this point, the database is empty with no tables. 2. Install digiKam 8.1 on the Windows 10 PC, filled in all the details for the remote MySQL server and the local databases. Then create a new collection and start cataloging 300k images (see attached screenshots). At this point, all the tables get successfully created on the NAS's digikam database and over the course of 36 hours, the tables end up with enough entries for 300K-plus images. 3. After it finished, I closed digiKam. After that, digiKam will not start again. Every time I start digiKam, it fails to open with the error message popped up. The only option is to cancel, so I can't see if there is something fixable in another setting 4. According to phpMyAdmin, all the privileges are the same as when I started and nothing has changed. The local databases are on a drive that still has 600GB free 5. I completely uninstalled DigiKam from the PC and drop the NAS database digikam. I also disabled and re-enabled the NAS's "Network Shared Database" to get a fresh copy running and started over from scratch. I tried this 2x with the same results. 6. I retyped the "Remote Server Settings" password to match the database server's digikam account, and that didn't help. OBSERVED RESULT Failure to open digiKam or reconnect to the remote MySQL database EXPECTED RESULT DigiKam should run normally and connect to the remote MySQL database SOFTWARE/OS VERSIONS Windows: 10 Pro (64bit X86), 22H2 (OS Build 19045.5487) Western Digital PR4100 (16GB RAM / 24TB usable, OS5 5.30.103) using MariaDB 10.5.19-MariaDB - Source distribution). DigiKam 8.1.0 for Windows. ADDITIONAL INFORMATION The NAS was updated with a new version of its OS5 on Feb 11. But the release notes do not have any mention of an update to the MariaDB version.