Bug 435065 - After upgrade from digikam 7.1 to 7.2, digikam won't start
Summary: After upgrade from digikam 7.1 to 7.2, digikam won't start
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Database-Schema (show other bugs)
Version: 7.2.0
Platform: Microsoft Windows Microsoft Windows
: NOR grave
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-28 14:27 UTC by spam-receiver
Modified: 2021-05-14 05:44 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 7.3.0


Attachments
Error message on startup of digikam (6.86 KB, image/png)
2021-03-28 14:27 UTC, spam-receiver
Details
Window in the background of the error message (9.31 KB, image/png)
2021-03-28 14:28 UTC, spam-receiver
Details

Note You need to log in before you can comment on or make changes to this bug.
Description spam-receiver 2021-03-28 14:27:24 UTC
Created attachment 137133 [details]
Error message on startup of digikam

SUMMARY
I updated digikam from 7.1.? to 7.2.0.
After this update, digikam will no longer start but displays the follwoing two windows.

STEPS TO REPRODUCE
1. Double-click the digikam icon

OBSERVED RESULT
The attached error window appears


EXPECTED RESULT
Digikam starts

SOFTWARE/OS VERSIONS
Windows: Win10 (latest patch level)

ADDITIONAL INFORMATION
The database is located on a remote host:
    Server: Localhost via UNIX socket
    Server-Typ: MariaDB
    Server-Verbindung: SSL wird nicht verwendet Dokumentation
    Server-Version: 10.3.25-MariaDB-0ubuntu0.20.04.1-log - Ubuntu 20.04
    Protokoll-Version: 10
    Server-Zeichensatz: UTF-8 Unicode (utf8mb4)
Comment 1 spam-receiver 2021-03-28 14:28:16 UTC
Created attachment 137134 [details]
Window in the background of the error message
Comment 2 Maik Qualmann 2021-03-28 14:35:12 UTC
We need the DebugView Log at startup as described here:

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

Don't forget to set the debug variable.

Maik
Comment 3 spam-receiver 2021-03-28 16:38:34 UTC
(In reply to Maik Qualmann from comment #2)
> We need the DebugView Log at startup as described here:
> 
> https://www.digikam.org/contribute/
> 
> Don't forget to set the debug variable.
> 
> Maik

The relevant line from th estartup log is this one:
[10352] Error messages: "QMYSQL: Unable to execute query" "You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)" "1419" 2
Comment 4 spam-receiver 2021-03-28 16:42:52 UTC
(In reply to spam-receiver from comment #3)
> (In reply to Maik Qualmann from comment #2)
> > We need the DebugView Log at startup as described here:
> > 
> > https://www.digikam.org/contribute/
> > 
> > Don't forget to set the debug variable.
> > 
> > Maik
> 
> The relevant line from th estartup log is this one:
> [10352] Error messages: "QMYSQL: Unable to execute query" "You do not have
> the SUPER privilege and binary logging is enabled (you *might* want to use
> the less safe log_bin_trust_function_creators variable)" "1419" 2

The database user "digikam" has all privileges on the "digikam" database (except GRANT, of course), but globally only usage rights.
Comment 5 Maik Qualmann 2021-03-28 16:50:41 UTC
A little more log file would not be bad. The problem is on the MySQL server side and has to be fixed there. You don't have rights, probably to CREATE and DROP TABLE VIEW. You don't always have these rights automatically.

Maik
Comment 7 spam-receiver 2021-03-28 17:14:49 UTC
(In reply to Maik Qualmann from comment #5)
> A little more log file would not be bad. The problem is on the MySQL server
> side and has to be fixed there. You don't have rights, probably to CREATE
> and DROP TABLE VIEW. You don't always have these rights automatically.
> 
> Maik

I hope this helps:

[10352] digikam.general: Loading DrMinGw run-time...
[10352] digikam.general: DrMinGw run-time loaded.
[10352] digikam.general: DrMinGw crash-file will be located at:  "C:\\Users\\XXX\\AppData\\Local\\digikam_crash.log"
[10352] digikam.widgets: Breeze icons resource file found
[10352] digikam.widgets: Breeze-dark icons resource file found
[10352] QCommandLineParser: already having an option named "?"
[10352] QCommandLineParser: already having an option named "help-all"
[10352] QCommandLineParser: already having an option named "v"
[10352] digikam.general: Switch to widget style:  "Fusion"
[10352] digikam.general: AlbumWatch is disabled
[10352] digikam.general: Database Parameters:
[10352]    Type:                     "QMYSQL"
[10352]    DB Core Name:             "digikam"
[10352]    DB Thumbs Name:           "digikam"
[10352]    DB Face Name:             "digikam"
[10352]    DB Similarity Name:       "digikam"
[10352]    Connect Options:          ""
[10352]    Host Name:                "XXX"
[10352]    Host port:                3306
[10352]    Internal Server:          false
[10352]    Internal Server Path:     ""
[10352]    Internal Server Serv Cmd: ""
[10352]    Internal Server Init Cmd: ""
[10352]    Username:                 "digikam"
[10352]    Password:                 "XXXXXXX"
[10352] 
[10352] digikam.dbengine: Loading SQL code from config file "C:/Program Files/digiKam/data/digikam/database/dbconfig.xml"
[10352] digikam.dbengine: Checking XML version ID => expected:  3  found:  3
[10352] digikam.coredb: Core database: running schema update
[10352] digikam.coredb: Core database: have a structure version  10
[10352] digikam.coredb: Core database: makeUpdates  10  to  12
[10352] digikam.dbengine: Failure executing query:
[10352]  "" 
[10352] Error messages: "QMYSQL: Unable to execute query" "You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)" "1419" 2 
[10352] Bound values:  ()
[10352] digikam.dbengine: Error while executing DBAction [ "UpdateSchemaFromV10ToV11" ] Statement [ "DROP TRIGGER IF EXISTS temp_insert_tagstree;" ]
[10352] digikam.coredb: Core database: schema update to V 11 failed!
[10352] digikam.coredb: Core database: cannot process schema initialization


Do you need even more?
Comment 8 Maik Qualmann 2021-03-28 17:19:32 UTC
On MySQL Server PC:

mysql -u USERNAME -p

set global log_bin_trust_function_creators=1;

Maik
Comment 9 spam-receiver 2021-03-28 17:42:45 UTC
(In reply to Maik Qualmann from comment #8)
> On MySQL Server PC:
> 
> mysql -u USERNAME -p
> 
> set global log_bin_trust_function_creators=1;
> 
> Maik

Hello Maik!
Thank you very much for your immediate response.

I checked this page if there are any security issues when the setting is changed:
https://mariadb.com/docs/reference/mdb/system-variables/log_bin_trust_function_creators/

It says:
Note that if ALL connections to this server ALWAYS use row-based binary logging, the security issues do not exist and the binary logging cannot break, so you can safely set this to TRUE

Hence, I checked the server settings and confirmed that binlog runs in ROW mode.

Now I changed the setting as you recommended and the schema upgrade passed, digikam started and requested the download of the face recognition data.
GREAT!
Comment 10 spam-receiver 2021-03-28 17:45:02 UTC
Not related to this issue, but maybe you can tell me:

Will the new face recognition function train itself from the faces which are already in the photos?

Is there a maintenance funtion to generate training data from the existing faces?
Comment 11 Maik Qualmann 2021-03-28 17:52:38 UTC
No, we do not automatically start the rebuilding of the training database. However, this must be carried out. In the maintenance tool in the section for face recognition, activate the option for rebuilding the training database and start the maintenance tool. All confirmed faces are used automatically, a special album selection is not necessary.

Do not forget to restart digiKam after successfully downloading the face model data.

Maik
Comment 12 spam-receiver 2021-03-28 17:54:38 UTC
Thank you very much again for your immediate help!

From my point of view this issue can be closed.
Comment 13 Maik Qualmann 2021-03-28 17:57:44 UTC
Thanks for the feedback.

Maik