Bug 435179 - face write to database with wrong user (''@'%') MariaDB backend
Summary: face write to database with wrong user (''@'%') MariaDB backend
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Database-Faces (show other bugs)
Version: 7.2.0
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-31 10:59 UTC by gessel
Modified: 2021-04-03 21:48 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 7.3.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gessel 2021-03-31 10:59:50 UTC
SUMMARY

when writing a new face ID either from the image preview face tag interface or from the tags manager interface, the operation fails.  

STEPS TO REPRODUCE

In tag manager select "People" -> green plus sign -> in "Create New Tag in "/Poeple" enter "Name of Person" as tag (without quotes, no slashes) click "OK" and get: 

Tag creation Error --digiKam
An error occurred during tag creation:
Tag Path              Error
/people/Person Name   Failed to add tag to database

It fails silently in the image preview (detect face->label face with "Persons Name" -> click green "Confirm" -> nothing happens.


Console debug during image preview creation process:

QPixmap::scaled: Pixmap is a null pixmap
digikam.database: Creating new tag for name "Persons Name" fullName "Persons Name"
digikam.dbengine: Failure executing query:
 "INSERT INTO Tags (pid, name) VALUES( ?, ?);" 
Error messages: "QMYSQL3: Unable to execute statement" "The user specified as a definer (''@'%') does not exist" "1449" 2 
Bound values:  (QVariant(int, 4), QVariant(QString, "Persons Name"))
digikam.dbengine: Error while executing DBAction [ "InsertTag" ] Statement [ "INSERT INTO Tags (pid, name) VALUES( :tagPID, :tagname);" ]
digikam.database: Attempt to create tag properties for tag id 0
digikam.general: Failed to get person tag
QPixmap::scaled: Pixmap is a null pixmap

Console debug during tag manager insert attempt:

digikam.general: ("Persons Name")
digikam.general: "Persons Name"  ::  "/People/Persons Name"
digikam.dbengine: Failure executing query:
 "INSERT INTO Tags (pid, name) VALUES( ?, ?);" 
Error messages: "QMYSQL3: Unable to execute statement" "The user specified as a definer (''@'%') does not exist" "1449" 2 
Bound values:  (QVariant(int, 4), QVariant(QString, "Persons Name"))
digikam.dbengine: Error while executing DBAction [ "InsertTag" ] Statement [ "INSERT INTO Tags (pid, name) VALUES( :tagPID, :tagname);" ]

This database connection attempt is with a null user: '', it should be with the user configured in database settings.  Operations such as modifying a tag are successful, it is just create that's being attempted with a null user.  core/libs/database/coredb/coredb.cpp? 


EXPECTED RESULT
I'd expect the tag to be written to the database, it is not.  In either case t


SOFTWARE/OS VERSIONS 
Linux/KDE Plasma: 20.04.2 LTS (Focal Fossa) 5.8.0-48-generic 
(available in About System)
KDE Plasma Version: plasmashell 5.18.5
KDE Frameworks Version: 5.68.0
Qt Version: 5.12.8

mariadb  Ver 15.1 Distrib 10.3.25-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2


ADDITIONAL INFORMATION
digikam version 7.2.0
CPU cores: 8
Eigen: 3.3.7
Exiv2: 0.27.3
Exiv2 supports Base Media: No
Exiv2 supports XMP metadata: Yes
HEIF encoding support: Yes
ImageMagick codecs: 6.9.10
KF5: 5.68.0
LensFun: 0.3.2-0
LibCImg: 130
LibJPEG: 80
LibJasper: 2.0.27
LibLCMS: 2090
LibLqr support: Yes
LibPGF: 7.19.03
LibPNG: 1.6.37
LibRaw: 0.21.0
LibTIFF: 4.1.0
Marble: 0.27.20
Parallelized demosaicing: Yes
Qt: 5.12.8
Qt WebEngine support: Yes
Rajce support: Yes
VKontakte support: No
AkonadiContact support: No
Baloo support: Yes
Calendar support: Yes
DBus support: Yes
Database backend: QMYSQL
Database internal server: No
HTML Gallery support: Yes
LibAVCodec: 58.91.100
LibAVFormat: 58.45.100
LibAVUtil: 56.51.100
LibGphoto2: 2.5.25
LibOpenCV: 4.2.0
LibQtAV: 1.13.0
Media player support: Yes
Panorama support: Yes
Comment 1 caulier.gilles 2021-03-31 11:10:22 UTC
I supose that you use
Comment 2 caulier.gilles 2021-03-31 11:11:12 UTC
I suppose that you use remote MariaDB server. Which configuration is set in Setup/Database dialog exactly ?
Comment 3 gessel 2021-03-31 11:20:49 UTC
Local MariaDB instance.

(note that other than this, the DB is working as expected and quite zippy)

Host Name: localhost
User: (username)
Password: ***********
Connect options: UNIX_SOCKET=/var/run/mysqld/mysqld.sock
Host Port: 3306
Core Db Name: digikam
Thumbs Db Name: digikam
FaceDb Name: digikam
Similiarty Db Name: digikam

Check Connection -> Database connection test successful
Comment 4 caulier.gilles 2021-03-31 11:24:18 UTC
Did you use AppImage bundles ?

Gilles Caulier
Comment 5 gessel 2021-03-31 11:29:46 UTC
+--------------------+---------------+
| database           | size in MB    |
+--------------------+---------------+
| digikam            | 5215.12500000 |
| information_schema |    0.17187500 |
| mysql              |    1.12736318 |
| performance_schema |    0.00000000 |
| sys                |    0.01562500 |
+--------------------+---------------+

+--------------------+---------+
| Table              | size    |
+--------------------+---------+
| Thumbnails         | 5053.58 |
| ImageHaarMatrix    |   35.56 |
| Images             |   28.77 |
| FilePaths          |   22.22 |
| UniqueHashes       |   21.56 |
| ImageInformation   |    9.95 |
| ImageCopyright     |    9.48 |
| ImageMetadata      |    8.52 |
| ImageTags          |    5.58 |
| ImageProperties    |    5.14 |
| ImageComments      |    4.67 |
| CustomIdentifiers  |    3.13 |
| ImageTagProperties |    2.77 |
| ImagePositions     |    2.50 |
| Albums             |    0.48 |
| ImageHistory       |    0.20 |
| Tags               |    0.19 |
| TagProperties      |    0.14 |
| VideoMetadata      |    0.13 |
| TagsTree           |    0.09 |
| ImageRelations     |    0.08 |
| KDTree             |    0.08 |
| ThumbSettings      |    0.03 |
| DownloadHistory    |    0.03 |
| FaceSettings       |    0.03 |
| SimilaritySettings |    0.03 |
| ImageSimilarity    |    0.03 |
| FaceMatrices       |    0.03 |
| AlbumRoots         |    0.03 |
| IdentityAttributes |    0.03 |
| Settings           |    0.03 |
| Searches           |    0.02 |
| Identities         |    0.02 |
+--------------------+---------+
Comment 7 gessel 2021-03-31 12:17:24 UTC
Oh, getting the same error with "delete tag" function:

digikam.dbengine: Error while executing DBAction [ "DeleteTag" ] Statement [ "DELETE FROM Tags WHERE id=:tagID;" ]
digikam.general: Delete Shortcut assigned to tag  468
digikam.dbengine: Failure executing query:
 "DELETE FROM Tags WHERE id=?;" 
Error messages: "QMYSQL3: Unable to execute statement" "The user specified as a definer (''@'%') does not exist" "1449" 2 
Bound values:  (QVariant(int, 487))

I suppose giving '' full admin access would resolve the issue, but that's pretty anti-secure.
Comment 8 Maik Qualmann 2021-03-31 12:28:56 UTC
The problem is a wrong server / database setup. Do not use the "%" in the GRANT, but either "localhost" or "IP address 192.168.xxx.xxx".
The "%" placeholder for everything cannot always be resolved by the server, the causes can be varied.

Maik
Comment 9 gessel 2021-03-31 12:53:15 UTC
Thank you for the support.  I'm pretty sure it is granted for "localhost"

MariaDB [(none)]> show grants;
+------------------------------------------------------------------------------------------------------------------------+
| Grants for gessel@localhost                                                                                            |
+------------------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO `gessel`@`localhost` IDENTIFIED BY PASSWORD '*5**************************************C' |
+------------------------------------------------------------------------------------------------------------------------+

The user specified (''@'%') is coming from digiKam, not from the database configuration nor from the digikam preferences set up.
Comment 10 gessel 2021-03-31 13:12:44 UTC
In the general log, attempting to create the person tag entry and then assign it I get:

210331 16:11:45	    39 Query	BEGIN WORK
		    39 Prepare	INSERT INTO Tags (pid, name) VALUES( ?, ?)
		    39 Reset stmt	
		    39 Close stmt	
		    39 Query	COMMIT
210331 16:11:52	    39 Query	BEGIN WORK
		    39 Prepare	INSERT INTO Tags (pid, name) VALUES( ?, ?)
		    39 Reset stmt	
		    39 Close stmt	
		    39 Query	COMMIT
Comment 11 gessel 2021-03-31 13:29:57 UTC
Configuring users on the database as:

+-----------+--------+-------------------------------------------+
| host      | user   | password                                  |
+-----------+--------+-------------------------------------------+
| localhost | root   | ***************************************** |
| localhost | admin  | ***************************************** |
| localhost | gessel | ***************************************** |
| %         | gessel | ***************************************** |
| 127.0.0.1 | gessel | ***************************************** |
+-----------+--------+-------------------------------------------+
5 rows in set (0.000 sec)

didn't help...
Comment 12 gessel 2021-03-31 13:40:27 UTC
Aaaannnd... 

MariaDB [(none)]> CREATE USER ``@`%` IDENTIFIED BY '';
MariaDB [(none)]> GRANT ALL ON digikam.* TO ''@'%' IDENTIFIED BY '' WITH GRANT OPTION;
MariaDB [(none)]> FLUSH PRIVILEGES;

solves the problem by creating an anonymous users as tag operations are incorrectly using, whilst creating a massive security hole.
Comment 13 Maik Qualmann 2021-03-31 14:07:02 UTC
Why you only have this problem with the "Tags" table is strange. Note that the "Tags" table has a trigger when inserting and deleting rows.

Maik
Comment 14 gessel 2021-03-31 14:39:17 UTC
I noticed in three operations:

From main window, face tab (left) -> scan for faces -> enter new label -> failed.

From tag manger -> create tag

From tag manager-> delete tag.


certainly I can't say there aren't more locations.  

It is odd that the vast majority of operations worked normally, including creating the database and geolocation operations, both in creating database entries and in writing the metainformation to files.  

However, in these situations (at least) the operations failed due to, it would seem, defaulting to null credentials:  ''@'%' INDENTFIED BY ''. 

I'm sanguine about the solution for me as this is a single user environment without remote access, but it seems sufficiently suboptimal to justify validation and repair.  I'm happy to patch and test or poke around further if it will help.
Comment 15 Maik Qualmann 2021-03-31 20:01:12 UTC
The problem is definitely due to an incorrect database / server configuration and cannot be resolved within digiKam.
Please post the mysql output of "SHOW TRIGGERS;".

Maik
Comment 16 gessel 2021-03-31 21:21:10 UTC
MariaDB [digikam]> show triggers;
+-----------------+--------+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------+------------------------+-------------------------------------------------------------------------------------------+---------+----------------------+----------------------+--------------------+
| Trigger         | Event  | Table | Statement                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | Timing | Created                | sql_mode                                                                                  | Definer | character_set_client | collation_connection | Database Collation |
+-----------------+--------+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------+------------------------+-------------------------------------------------------------------------------------------+---------+----------------------+----------------------+--------------------+
| insert_tagstree | INSERT | Tags  | INSERT INTO TagsTree SELECT NEW.id, NEW.pid
                     UNION SELECT NEW.id, pid FROM TagsTree WHERE id = NEW.pid                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | AFTER  | 2021-03-26 21:09:24.38 | STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION | @%      | utf8mb4              | utf8mb4_general_ci   | utf8mb4_general_ci |
| move_tagstree   | UPDATE | Tags  | BEGIN
                        IF (NEW.pid != OLD.pid) THEN
                            DELETE FROM TagsTree WHERE ((id = OLD.id) OR id IN (SELECT id FROM
                              (SELECT id FROM TagsTree WHERE pid = OLD.id) AS tmpTree1))
                             AND pid IN (SELECT pid FROM
                              (SELECT pid FROM TagsTree WHERE id = OLD.id) AS tmpTree2);
                            INSERT INTO TagsTree SELECT NEW.id, NEW.pid
                             UNION SELECT NEW.id, pid FROM TagsTree
                              WHERE id = NEW.pid
                             UNION SELECT id, NEW.pid FROM TagsTree
                              WHERE pid = NEW.id
                             UNION SELECT A.id, B.pid FROM TagsTree A, TagsTree B
                              WHERE A.pid = NEW.id AND B.id = NEW.pid;
                        END IF;
                    END | AFTER  | 2021-03-26 21:09:24.47 | STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION | @%      | utf8mb4              | utf8mb4_general_ci   | utf8mb4_general_ci |
| delete_tagstree | DELETE | Tags  | BEGIN
                        DELETE FROM TagsTree WHERE id IN (SELECT id FROM
                          (SELECT id FROM TagsTree WHERE pid = OLD.id) AS tmpTree1);
                        DELETE FROM TagsTree WHERE id = OLD.id;
                    END                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | AFTER  | 2021-03-26 21:09:24.43 | STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION | @%      | utf8mb4              | utf8mb4_general_ci   | utf8mb4_general_ci |
+-----------------+--------+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------+------------------------+-------------------------------------------------------------------------------------------+---------+----------------------+----------------------+--------------------+
3 rows in set (0.001 sec)
Comment 17 Maik Qualmann 2021-04-01 05:55:43 UTC
We have the problem that the users of the triggers are "@%". It should something like "gessel@%". You have probably GRANT the database after creating the database or deleted a user in the meantime.

Try this:

GRANT TRIGGER ON <db_name>.* TO '<db_user>'@'localhost';

Maik
Comment 18 gessel 2021-04-01 11:27:27 UTC
Sure, since it works with the user ''@'%' and working is better than secure, the current state is :

Current database: digikam

+----------------------------------------------------------------------------------------------------------------------------------+
| Grants for gessel@%                                                                                                              |
+----------------------------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO `gessel`@`%` IDENTIFIED BY PASSWORD '*****************************************' WITH GRANT OPTION |
+----------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.004 sec)

Current database: digikam

+-----------------------------------------------------------------+
| Grants for @%                                                   |
+-----------------------------------------------------------------+
| GRANT USAGE ON *.* TO ``@`%`                                    |
| GRANT ALL PRIVILEGES ON `digikam`.* TO ``@`%` WITH GRANT OPTION |
+-----------------------------------------------------------------+


So to test:

 MariaDB [digikam]> DROP USER ``@`%`;
 MariaDB [digikam]> flush privileges;
 MariaDB [digikam]> show grants for ''@'%';
 ERROR 1141 (42000): There is no such grant defined for user '' on host '%'


And... 

digikam.database: Creating new tag for name "TT" fullName "TT"
digikam.dbengine: Failure executing query:
 "INSERT INTO Tags (pid, name) VALUES( ?, ?);" 
Error messages: "QMYSQL3: Unable to execute statement" "The user specified as a definer (''@'%') does not exist" "1449" 2 
Bound values:  (QVariant(int, 4), QVariant(QString, "Tony Thomas"))
digikam.dbengine: Error while executing DBAction [ "InsertTag" ] Statement [ "INSERT INTO Tags (pid, name) VALUES( :tagPID, :tagname);" ]
digikam.database: Attempt to create tag properties for tag id 0
digikam.general: Failed to get person tag

(as before, consistency is good.)

 MariaDB [digikam]> GRANT TRIGGER ON digikam.* TO 'gessel'@'localhost';
 Query OK, 0 rows affected (0.000 sec)
 MariaDB [digikam]> flush privileges;
 
 MariaDB [digikam]> show grants for 'gessel'@'localhost';
 +------------------------------------------------------------------------------------------------------------------------+
 | Grants for gessel@localhost                                                                                            |
 +------------------------------------------------------------------------------------------------------------------------+
 | GRANT ALL PRIVILEGES ON *.* TO `gessel`@`localhost` IDENTIFIED BY PASSWORD '*51A4B3BD9F7DFD67D84ED8C045C952264A901F4C' |
 | GRANT TRIGGER ON `digikam`.* TO `gessel`@`localhost`                                                                   |
 +------------------------------------------------------------------------------------------------------------------------+

Initial test, no change, restart digikam and...

 digikam.database: Creating new tag for name "TT" fullName "TT"
 digikam.dbengine: Failure executing query:
  "INSERT INTO Tags (pid, name) VALUES( ?, ?);" 
 Error messages: "QMYSQL3: Unable to execute statement" "The user specified as a definer (''@'%') does not exist" "1449" 2 
 Bound values:  (QVariant(int, 4), QVariant(QString, "Tony Thomas"))
 digikam.dbengine: Error while executing DBAction [ "InsertTag" ] Statement [ "INSERT INTO Tags (pid, name) VALUES( :tagPID, :tagname);" ]
 digikam.database: Attempt to create tag properties for tag id 0
 digikam.general: Failed to get person tag

No improvements... so add a few more grants to extend the user class:

 MariaDB [digikam]> GRANT TRIGGER ON digikam.* TO 'gessel'@'127.0.0.1';
 MariaDB [digikam]> GRANT TRIGGER ON digikam.* TO 'gessel'@'%';
 MariaDB [digikam]> flush privileges;


still no change:

 digikam.database: Creating new tag for name "TT" fullName "TT"
 digikam.dbengine: Failure executing query:
  "INSERT INTO Tags (pid, name) VALUES( ?, ?);" 
 Error messages: "QMYSQL3: Unable to execute statement" "The user specified as a definer (''@'%') does not exist" "1449" 2 
 Bound values:  (QVariant(int, 4), QVariant(QString, "Tony Thomas"))
 digikam.dbengine: Error while executing DBAction [ "InsertTag" ] Statement [ "INSERT INTO Tags (pid, name) VALUES( :tagPID, :tagname);" ]
 digikam.database: Attempt to create tag properties for tag id 0
 digikam.general: Failed to get person tag

Now add back user ''@'%' and see:

 MariaDB [digikam]> CREATE USER ``@`%` IDENTIFIED BY '';
 Query OK, 0 rows affected (0.004 sec)
 MariaDB [digikam]> GRANT ALL ON digikam.* TO ''@'%' IDENTIFIED BY '' WITH GRANT OPTION;
 Query OK, 0 rows affected (0.000 sec)
 MariaDB [digikam]> FLUSH PRIVILEGES;


Person tag successfully created.
Comment 19 gessel 2021-04-02 10:52:24 UTC
One kind of obvious thing I point out only timidly as likely to be silly to mention, but the default install of either MySQL or MariaDB does create an anonymous user. 

Running # sudo mysql_secure_installation advises removing this anonymous user, which I did, and which created (for me) the issues in this ticket. 

(I documented my install steps at https://www.blackrosetech.com/gessel/2021/03/26/compile-and-install-digikam-on-ubuntu-20-04-focal) 

Restoring that anonymous user resolves the issues.  

That is Digikam works as expected against a default "unsecured" MariaDB installation but for me at least, had face tag issues with a "secured" installation with the default anonymous user deleted, which were resolved by restoring an anonymous user.
Comment 20 Maik Qualmann 2021-04-02 11:02:48 UTC
I think you did something wrong when creating the digiKam database. Maybe they should start all over again. My triggers don't run with an anonymous user, but with 'maik'@'localhost'.

Maik
Comment 21 Maik Qualmann 2021-04-02 11:10:07 UTC
I don't see in their beautiful description that they are creating the "digikam" database. You have to create this before you want to use digiKam with MySQL. 

CREATE USER 'maik'@'localhost' IDENTIFIED BY 'password';
GRANT ALL ON *.* TO 'maik'@'localhost' IDENTIFIED BY 'password';
CREATE DATABASE digikam;
GRANT ALL PRIVILEGES ON digikam.* TO 'maik'@'localhost';
FLUSH PRIVILEGES;

Maik
Comment 22 gessel 2021-04-02 18:57:49 UTC
Hi Malik, thank you for the appreciation of the description.

I have to admit, I'm not 100% sure I did create the database first.  There were no complaints about it existing or not and the user I created connected just fine.  The current state of the database is:

MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| digikam            |
| information_schema |
| mysql              |
| performance_schema |
| sys                |
+--------------------+
5 rows in set (0.001 sec)

That is the database "digikam" clearly exists.  Tables have been created and seem to be working fine: 

MariaDB [digikam]> show table status from digikam;
+--------------------+--------+---------+------------+--------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+------------+--------------------+----------+----------------+---------+------------------+-----------+
| Name               | Engine | Version | Row_format | Rows   | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time         | Update_time         | Check_time | Collation          | Checksum | Create_options | Comment | Max_index_length | Temporary |
+--------------------+--------+---------+------------+--------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+------------+--------------------+----------+----------------+---------+------------------+-----------+
| AlbumRoots         | InnoDB |      10 | Dynamic    |      1 |          16384 |       16384 |               0 |        16384 |         0 |              3 | 2021-03-26 21:09:20 | NULL                | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| Albums             | InnoDB |      10 | Dynamic    |   4645 |             63 |      294912 |               0 |       442368 |         0 |           6356 | 2021-03-26 21:09:20 | 2021-04-02 14:12:14 | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| CustomIdentifiers  | InnoDB |      10 | Dynamic    |   4253 |            373 |     1589248 |               0 |      1671168 |   4194304 |           NULL | 2021-03-26 21:09:25 | 2021-04-02 13:52:47 | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| DownloadHistory    | InnoDB |      10 | Dynamic    |      0 |              0 |       16384 |               0 |        16384 |         0 |              1 | 2021-03-26 21:09:21 | NULL                | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| FaceMatrices       | InnoDB |      10 | Dynamic    |    197 |            748 |      147456 |               0 |        16384 |         0 |            198 | 2021-03-26 21:10:01 | 2021-04-02 13:31:38 | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| FaceSettings       | InnoDB |      10 | Dynamic    |      2 |           8192 |       16384 |               0 |        16384 |         0 |           NULL | 2021-03-26 21:10:01 | NULL                | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| FilePaths          | InnoDB |      10 | Dynamic    | 103941 |            135 |    14090240 |               0 |     19644416 |   6291456 |           NULL | 2021-03-26 21:09:25 | 2021-04-02 14:17:25 | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| Identities         | InnoDB |      10 | Dynamic    |     27 |            606 |       16384 |               0 |            0 |         0 |             28 | 2021-03-26 21:10:01 | 2021-04-02 13:31:37 | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| IdentityAttributes | InnoDB |      10 | Dynamic    |     81 |            202 |       16384 |               0 |        16384 |         0 |           NULL | 2021-03-26 21:10:01 | 2021-04-02 13:31:37 | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| ImageComments      | InnoDB |      10 | Dynamic    |  22899 |            187 |     4292608 |               0 |      3440640 |   4194304 |          41700 | 2021-03-26 21:09:23 | 2021-04-02 14:04:23 | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| ImageCopyright     | InnoDB |      10 | Dynamic    |  40121 |             81 |     3260416 |               0 |      6602752 |   4194304 |         115309 | 2021-03-26 21:09:23 | 2021-04-02 13:44:26 | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| ImageHaarMatrix    | InnoDB |      10 | Dynamic    |  38551 |            967 |    37289984 |               0 |            0 |   6291456 |           NULL | 2021-03-26 21:09:26 | 2021-04-02 14:04:55 | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| ImageHistory       | InnoDB |      10 | Dynamic    |   1265 |             90 |      114688 |               0 |        98304 |         0 |           NULL | 2021-03-26 21:09:23 | 2021-04-02 14:04:57 | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| ImageInformation   | InnoDB |      10 | Dynamic    | 116716 |             67 |     7880704 |               0 |      4636672 |   4194304 |           NULL | 2021-03-26 21:09:23 | 2021-04-02 14:12:55 | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| ImageMetadata      | InnoDB |      10 | Dynamic    |  99648 |            110 |    11026432 |               0 |            0 |   4194304 |           NULL | 2021-03-26 21:09:20 | 2021-04-02 14:04:57 | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| ImagePositions     | InnoDB |      10 | Dynamic    |  44065 |            106 |     4685824 |               0 |            0 |   4194304 |           NULL | 2021-03-26 21:09:21 | 2021-04-02 14:04:57 | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| ImageProperties    | InnoDB |      10 | Dynamic    |  46926 |             67 |     3162112 |               0 |      2228224 |   4194304 |           NULL | 2021-03-26 21:09:21 | 2021-04-02 13:42:35 | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| ImageRelations     | InnoDB |      10 | Dynamic    |      0 |              0 |       16384 |               0 |        65536 |         0 |           NULL | 2021-03-26 21:09:23 | NULL                | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| ImageSimilarity    | InnoDB |      10 | Dynamic    |      0 |              0 |       16384 |               0 |        16384 |         0 |           NULL | 2021-03-26 21:09:25 | NULL                | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| ImageTagProperties | InnoDB |      10 | Dynamic    |   8129 |            259 |     2113536 |               0 |       786432 |   4194304 |           NULL | 2021-03-26 21:09:24 | 2021-04-02 13:54:44 | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| ImageTags          | InnoDB |      10 | Dynamic    |  93758 |             67 |     6307840 |               0 |      4489216 |   4194304 |           NULL | 2021-03-26 21:09:23 | 2021-04-02 13:54:34 | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| Images             | InnoDB |      10 | Dynamic    | 114441 |            114 |    13123584 |               0 |     26460160 |   7340032 |         117248 | 2021-03-26 21:09:23 | 2021-04-02 14:12:55 | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| KDTree             | InnoDB |      10 | Dynamic    |      0 |              0 |       16384 |               0 |        65536 |         0 |              1 | 2021-03-26 21:10:01 | NULL                | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| Searches           | InnoDB |      10 | Dynamic    |      2 |           8192 |       16384 |               0 |            0 |         0 |              4 | 2021-03-26 21:09:21 | NULL                | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| Settings           | InnoDB |      10 | Dynamic    |     17 |            963 |       16384 |               0 |        16384 |         0 |           NULL | 2021-03-26 21:09:21 | 2021-04-01 14:18:03 | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| SimilaritySettings | InnoDB |      10 | Dynamic    |      2 |           8192 |       16384 |               0 |        16384 |         0 |           NULL | 2021-03-26 21:09:26 | NULL                | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| TagProperties      | InnoDB |      10 | Dynamic    |    829 |            118 |       98304 |               0 |        16384 |         0 |           NULL | 2021-03-26 21:09:23 | 2021-04-02 13:31:38 | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| Tags               | InnoDB |      10 | Dynamic    |    980 |             66 |       65536 |               0 |        81920 |         0 |           5845 | 2021-03-26 21:09:21 | 2021-04-02 13:53:01 | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| TagsTree           | InnoDB |      10 | Dynamic    |   1821 |             53 |       98304 |               0 |            0 |         0 |           NULL | 2021-03-26 21:09:21 | 2021-04-02 13:53:01 | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| ThumbSettings      | InnoDB |      10 | Dynamic    |      2 |           8192 |       16384 |               0 |        16384 |         0 |           NULL | 2021-03-26 21:09:25 | NULL                | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| Thumbnails         | InnoDB |      10 | Dynamic    | 214657 |          32764 |  7033225216 |               0 |            0 |   5242880 |         242067 | 2021-03-26 21:09:25 | 2021-04-02 14:17:25 | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| UniqueHashes       | InnoDB |      10 | Dynamic    | 145007 |             89 |    12959744 |               0 |     17596416 |   6291456 |           NULL | 2021-03-26 21:09:25 | 2021-04-02 14:17:25 | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| VideoMetadata      | InnoDB |      10 | Dynamic    |   2362 |             76 |      180224 |               0 |            0 |         0 |           NULL | 2021-03-26 21:09:20 | 2021-04-02 14:12:55 | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
+--------------------+--------+---------+------------+--------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+------------+--------------------+----------+----------------+---------+------------------+-----------+
33 rows in set (0.001 sec)


I suppose it is possible I initially connected before removing the default anonymous user and that as a result of having this default anonymous user available, the face subroutine used that anonymous user rather than the user/pass defined in "customize database settings" I can delete the database and start over. It seems still quite odd given that the "customize database settings" configuration is set all at once and the face subroutine would not have known where to find the socket without also knowing the default user.

Since the database 'digikam' obviously already exists, I will first try something that shouldn't work, but might: Currently grants look like:

MariaDB [digikam]> show grants for 'gessel'@'localhost';
+------------------------------------------------------------------------------------------------------------------------+
| Grants for gessel@localhost                                                                                            |
+------------------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO `gessel`@`localhost` IDENTIFIED BY PASSWORD '*****************************************' |
| GRANT TRIGGER ON `digikam`.* TO `gessel`@`localhost`                                                                   |
+------------------------------------------------------------------------------------------------------------------------+
2 rows in set (0.011 sec)

So lets try adding:
GRANT ALL PRIVILEGES ON digikam.* TO 'gessel'@'localhost';
and then
DROP USER ``@`%`;
FLUSH PRIVILEGES;

and now we have:

MariaDB [digikam]> show grants for 'gessel'@'localhost';
+------------------------------------------------------------------------------------------------------------------------+
| Grants for gessel@localhost                                                                                            |
+------------------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO `gessel`@`localhost` IDENTIFIED BY PASSWORD '*51A4B3BD9F7DFD67D84ED8C045C952264A901F4C' |
| GRANT ALL PRIVILEGES ON `digikam`.* TO `gessel`@`localhost`                                                            |
+------------------------------------------------------------------------------------------------------------------------+

and...

QPixmap::scaled: Pixmap is a null pixmap
digikam.database: Creating new tag for name "Tuxedo" fullName "Tuxedo"
digikam.dbengine: Failure executing query:
 "INSERT INTO Tags (pid, name) VALUES( ?, ?);" 
Error messages: "QMYSQL3: Unable to execute statement" "The user specified as a definer (''@'%') does not exist" "1449" 2 
Bound values:  (QVariant(int, 4), QVariant(QString, "Tuxedo"))
digikam.dbengine: Error while executing DBAction [ "InsertTag" ] Statement [ "INSERT INTO Tags (pid, name) VALUES( :tagPID, :tagname);" ]
digikam.database: Attempt to create tag properties for tag id 0
digikam.general: Failed to get person tag
QPixmap::scaled: Pixmap is a null pixmap


OK, deleting database and preferences and starting over. 

 MariaDB [(none)]> drop database digikam;
Query OK, 33 rows affected (4.449 sec)

MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
+--------------------+
4 rows in set (0.000 sec)

and:

gessel@dg-dl:~/.config$ mv digikamrc /home/gessel/digikamrc.backup
gessel@dg-dl:~/.config$ mv digikam_systemrc /home/gessel/digikam_systemrc.backup

Then clean up the users and start over, now:

ariaDB [(none)]> SELECT host, user FROM mysql.user;
+-----------+--------+
| host      | user   |
+-----------+--------+
| %         | gessel |
| 127.0.0.1 | gessel |
| localhost | admin  |
| localhost | gessel |
| localhost | root   |
+-----------+--------+

and we got just:

MariaDB [(none)]> SELECT host, user FROM mysql.user;
+-----------+-------+
| host      | user  |
+-----------+-------+
| localhost | admin |
| localhost | root  |
+-----------+-------+
2 rows in set (0.000 sec)

Now 

CREATE USER 'gessel'@'localhost' IDENTIFIED BY '*****';
GRANT ALL ON *.* TO 'gessel'@'localhost' IDENTIFIED BY '*****';
CREATE DATABASE digikam;
GRANT ALL PRIVILEGES ON digikam.* TO 'gessel'@'localhost';
FLUSH PRIVILEGES;

and we have:

MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| digikam            |
| information_schema |
| mysql              |
| performance_schema |
| sys                |
+--------------------+
5 rows in set (0.001 sec)

MariaDB [(none)]> show table status from digikam;
Empty set (0.000 sec)

and

MariaDB [(none)]> SELECT host, user FROM mysql.user;
+-----------+--------+
| host      | user   |
+-----------+--------+
| localhost | admin  |
| localhost | gessel |
| localhost | root   |
+-----------+--------+
3 rows in set (0.000 sec)

And now I'll try to get back to where I was....  this will take a while.
Comment 23 gessel 2021-04-02 19:24:35 UTC
Initial setup log:

gessel@dg-dl:~/.config$ digikam | tee /home/gessel/projects/digikam-7.2.0/log.txt
digikam.widgets: Use installed icons
digikam.general: "/home/gessel"
digikam.general: Testing  "mysql_install_db" ...
digikam.general: Found  "mysql_install_db"
digikam.general: Testing  "mysqld" ...
digikam.general: Found  "mysqld"
Empty filename passed to function
digikam.general: Root album is :  "/media/gessel/datas/pictures/David/Sorted"
digikam.general: AlbumWatch is disabled
digikam.database: Testing DB connection ( "ConnectionTest" ) with these settings:
digikam.database: Database Parameters:
   Type:                     "QMYSQL"
   DB Core Name:             "digikam"
   DB Thumbs Name:           "digikam"
   DB Face Name:             "digikam"
   DB Similarity Name:       "digikam"
   Connect Options:          "UNIX_SOCKET=/var/run/mysqld/mysqld.sock"
   Host Name:                "localhost"
   Host port:                3306
   Internal Server:          false
   Internal Server Path:     ""
   Internal Server Serv Cmd: ""
   Internal Server Init Cmd: ""
   Username:                 "gessel"
   Password:                 "XXXXXXXX"

digikam.database: Testing DB connection ( "ConnectionTest" ) with these settings:
digikam.database: Database Parameters:
   Type:                     "QMYSQL"
   DB Core Name:             "digikam"
   DB Thumbs Name:           "digikam"
   DB Face Name:             "digikam"
   DB Similarity Name:       "digikam"
   Connect Options:          "UNIX_SOCKET=/var/run/mysqld/mysqld.sock"
   Host Name:                "localhost"
   Host port:                3306
   Internal Server:          false
   Internal Server Path:     ""
   Internal Server Serv Cmd: ""
   Internal Server Init Cmd: ""
   Username:                 "gessel"
   Password:                 "XXXXXXXX"

digikam.general: Database Parameters:
   Type:                     "QMYSQL"
   DB Core Name:             "digikam"
   DB Thumbs Name:           "digikam"
   DB Face Name:             "digikam"
   DB Similarity Name:       "digikam"
   Connect Options:          "UNIX_SOCKET=/var/run/mysqld/mysqld.sock"
   Host Name:                "localhost"
   Host port:                3306
   Internal Server:          false
   Internal Server Path:     ""
   Internal Server Serv Cmd: ""
   Internal Server Init Cmd: ""
   Username:                 "gessel"
   Password:                 "XXXXXXXX"

digikam.dbengine: Loading SQL code from config file "/usr/share/digikam/database/dbconfig.xml"
digikam.dbengine: Checking XML version ID => expected:  3  found:  3
digikam.coredb: Core database: running schema update
digikam.coredb: Core database: no database file available
digikam.general: KMemoryInfo: Platform identified :  "LINUX"
digikam.general: KMemoryInfo: TotalRam:  33417322496
digikam.general: Allowing a cache size of 200 MB
digikam.general: No locale found in database
digikam.general: No locale found in config file
digikam.database: addLocation QUrl("file:///media/gessel/datas/pictures/David/Sorted")
digikam.database: Creating new Location  "/pictures/David/Sorted"  uuid  "volumeid:?uuid=0d772d10-716f-43e4-b5d6-a974df395a0e"
digikam.database: location for  "/media/gessel/datas/pictures/David/Sorted"  is available  true
digikam.thumbsdb: Thumbs database: no database file available
digikam.general: Thumbnails database ready for use
digikam.similaritydb: Similarity database: no database file available
digikam.similaritydb: Similarity database ready for use

Brand new database looks like this as we get into parsing the root album:

MariaDB [(none)]> show table status from digikam;
+--------------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+------------+--------------------+----------+----------------+---------+------------------+-----------+
| Name               | Engine | Version | Row_format | Rows | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time         | Update_time         | Check_time | Collation          | Checksum | Create_options | Comment | Max_index_length | Temporary |
+--------------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+------------+--------------------+----------+----------------+---------+------------------+-----------+
| AlbumRoots         | InnoDB |      10 | Dynamic    |    1 |          16384 |       16384 |               0 |        16384 |         0 |              2 | 2021-04-02 22:21:32 | 2021-04-02 22:21:36 | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| Albums             | InnoDB |      10 | Dynamic    | 4645 |             63 |      294912 |               0 |       278528 |         0 |           4646 | 2021-04-02 22:21:32 | 2021-04-02 22:23:29 | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| CustomIdentifiers  | InnoDB |      10 | Dynamic    |    0 |              0 |       16384 |               0 |        49152 |         0 |           NULL | 2021-04-02 22:21:37 | NULL                | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| DownloadHistory    | InnoDB |      10 | Dynamic    |    0 |              0 |       16384 |               0 |        16384 |         0 |              1 | 2021-04-02 22:21:33 | NULL                | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| FaceMatrices       | InnoDB |      10 | Dynamic    |    0 |              0 |       16384 |               0 |        16384 |         0 |              1 | 2021-04-02 22:23:21 | NULL                | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| FaceSettings       | InnoDB |      10 | Dynamic    |    2 |           8192 |       16384 |               0 |        16384 |         0 |           NULL | 2021-04-02 22:23:20 | 2021-04-02 22:23:21 | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| FilePaths          | InnoDB |      10 | Dynamic    |   22 |            744 |       16384 |               0 |        32768 |         0 |           NULL | 2021-04-02 22:21:37 | 2021-04-02 22:23:33 | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| Identities         | InnoDB |      10 | Dynamic    |    0 |              0 |       16384 |               0 |            0 |         0 |              1 | 2021-04-02 22:23:20 | NULL                | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| IdentityAttributes | InnoDB |      10 | Dynamic    |    0 |              0 |       16384 |               0 |        32768 |         0 |           NULL | 2021-04-02 22:23:21 | NULL                | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| ImageComments      | InnoDB |      10 | Dynamic    |    2 |           8192 |       16384 |               0 |        32768 |         0 |              3 | 2021-04-02 22:21:35 | 2021-04-02 22:23:29 | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| ImageCopyright     | InnoDB |      10 | Dynamic    |   70 |            234 |       16384 |               0 |        32768 |         0 |             71 | 2021-04-02 22:21:35 | 2021-04-02 22:23:29 | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| ImageHaarMatrix    | InnoDB |      10 | Dynamic    |    0 |              0 |       16384 |               0 |            0 |         0 |           NULL | 2021-04-02 22:21:37 | NULL                | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| ImageHistory       | InnoDB |      10 | Dynamic    |    5 |           3276 |       16384 |               0 |        16384 |         0 |           NULL | 2021-04-02 22:21:35 | 2021-04-02 22:23:29 | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| ImageInformation   | InnoDB |      10 | Dynamic    |   49 |            334 |       16384 |               0 |        16384 |         0 |           NULL | 2021-04-02 22:21:34 | 2021-04-02 22:23:33 | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| ImageMetadata      | InnoDB |      10 | Dynamic    |   44 |            372 |       16384 |               0 |            0 |         0 |           NULL | 2021-04-02 22:21:32 | 2021-04-02 22:23:33 | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| ImagePositions     | InnoDB |      10 | Dynamic    |    5 |           3276 |       16384 |               0 |            0 |         0 |           NULL | 2021-04-02 22:21:33 | 2021-04-02 22:23:29 | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| ImageProperties    | InnoDB |      10 | Dynamic    |    0 |              0 |       16384 |               0 |        16384 |         0 |           NULL | 2021-04-02 22:21:33 | NULL                | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| ImageRelations     | InnoDB |      10 | Dynamic    |    0 |              0 |       16384 |               0 |        65536 |         0 |           NULL | 2021-04-02 22:21:35 | NULL                | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| ImageSimilarity    | InnoDB |      10 | Dynamic    |    0 |              0 |       16384 |               0 |        16384 |         0 |           NULL | 2021-04-02 22:21:37 | NULL                | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| ImageTagProperties | InnoDB |      10 | Dynamic    |    4 |           4096 |       16384 |               0 |        81920 |         0 |           NULL | 2021-04-02 22:21:36 | 2021-04-02 22:23:33 | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| ImageTags          | InnoDB |      10 | Dynamic    |   24 |            682 |       16384 |               0 |        32768 |         0 |           NULL | 2021-04-02 22:21:34 | 2021-04-02 22:23:33 | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| Images             | InnoDB |      10 | Dynamic    |   49 |            334 |       16384 |               0 |        65536 |         0 |             50 | 2021-04-02 22:21:34 | 2021-04-02 22:23:33 | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| KDTree             | InnoDB |      10 | Dynamic    |    0 |              0 |       16384 |               0 |        65536 |         0 |              1 | 2021-04-02 22:23:21 | NULL                | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| Searches           | InnoDB |      10 | Dynamic    |    0 |              0 |       16384 |               0 |            0 |         0 |              1 | 2021-04-02 22:21:33 | NULL                | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| Settings           | InnoDB |      10 | Dynamic    |   16 |           1024 |       16384 |               0 |        16384 |         0 |           NULL | 2021-04-02 22:21:34 | 2021-04-02 22:21:36 | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| SimilaritySettings | InnoDB |      10 | Dynamic    |    2 |           8192 |       16384 |               0 |        16384 |         0 |           NULL | 2021-04-02 22:21:37 | 2021-04-02 22:21:37 | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| TagProperties      | InnoDB |      10 | Dynamic    |   23 |            712 |       16384 |               0 |        16384 |         0 |           NULL | 2021-04-02 22:21:35 | 2021-04-02 22:23:33 | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| Tags               | InnoDB |      10 | Dynamic    |   24 |            682 |       16384 |               0 |        32768 |         0 |             24 | 2021-04-02 22:21:33 | 2021-04-02 22:23:32 | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| TagsTree           | InnoDB |      10 | Dynamic    |   41 |            399 |       16384 |               0 |            0 |         0 |           NULL | 2021-04-02 22:21:33 | 2021-04-02 22:23:32 | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| ThumbSettings      | InnoDB |      10 | Dynamic    |    2 |           8192 |       16384 |               0 |        16384 |         0 |           NULL | 2021-04-02 22:21:37 | 2021-04-02 22:21:37 | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| Thumbnails         | InnoDB |      10 | Dynamic    |   22 |           4468 |       98304 |               0 |            0 |         0 |             23 | 2021-04-02 22:21:36 | 2021-04-02 22:23:33 | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| UniqueHashes       | InnoDB |      10 | Dynamic    |   22 |            744 |       16384 |               0 |        32768 |         0 |           NULL | 2021-04-02 22:21:37 | 2021-04-02 22:23:33 | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
| VideoMetadata      | InnoDB |      10 | Dynamic    |    0 |              0 |       16384 |               0 |            0 |         0 |           NULL | 2021-04-02 22:21:33 | NULL                | NULL       | utf8mb4_general_ci |     NULL |                |         |                0 | N         |
+--------------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+------------+--------------------+----------+----------------+---------+------------------+-----------+
33 rows in set (0.010 sec)
Comment 24 gessel 2021-04-03 10:52:54 UTC
Problem resolved by following instructions in order described. 

Faces are correctly being written to the database as the digikam user rather than as ''@'%'. 

It seems like a weird quirk to me, but it works as expected if set up as instructed.

Thanks for all the excellent support.
Comment 25 Maik Qualmann 2021-04-03 18:39:24 UTC
Thanks for the feedback.
Perhaps you are thinking about not only creating good instructions for compiling under Ubuntu, but also providing ready-made packages. Unfortunately the Ubuntu digiKam packages are never very up to date.

Maik
Comment 26 gessel 2021-04-03 21:48:47 UTC
I noticed Ubuntu is pretty far back. I also infer that some emphasis on current PPAs has slipped as people find snap-like solutions a shortcut to resolving issues.   I'm a fan of integrated software myself, so I like installing and enjoy working through problems, whether caused by my own mistakes or working toward resolving a bug.  On my desktop I don't go full Gentoo, but on my servers I do the full build from source FreeBSD thing. I feel like it is an integral part of the FOSS model to interact and resolve issues between applications and libraries and the OS as much as getting a working solution packaged.