https://bugs.kde.org/show_bug.cgi?id=435179

--- Comment #22 from gessel <ges...@blackrosetech.com> ---
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.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to