Bug 394384

Summary: MySQL connection error with dbname "KMyMoney"
Product: [Applications] kmymoney Reporter: Heiko Fischer <heiko.fischer>
Component: databaseAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED FIXED    
Severity: normal CC: lukasz.wojnilowicz
Priority: NOR    
Version: 5.0.1   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=398409
Latest Commit: Version Fixed In: 5.0.2
Sentry Crash Report:
Attachments: Patch

Description Heiko Fischer 2018-05-17 16:46:06 UTC
Created attachment 112713 [details]
Patch

Driver = QMYSQL, Host = localhost, User = ******, Database = /KMyMoney
Driver Error: QMYSQL: Unable to connect
Database Error No 1049: Unbekannte Datenbank '/KMyMoney'
Text: Unbekannte Datenbank '/KMyMoney' QMYSQL: Unable to connect
Comment 1 Jack 2018-05-17 16:57:23 UTC
Where does the extra leading slash come from?  If it was actually added by KMM, then I would question the code that adds it, rather than just removing it blindly.  Simply dropping the first character of the URL path would not work if there wasn't a leading slash.
Comment 2 Heiko Fischer 2018-05-17 18:11:19 UTC
(In reply to Jack from comment #1)
> Where does the extra leading slash come from?  If it was actually added by
> KMM, then I would question the code that adds it, rather than just removing
> it blindly.  Simply dropping the first character of the URL path would not
> work if there wasn't a leading slash.

ACK, the Patch is quick and dirty.
Comment 3 wojnilowicz 2018-05-18 12:44:34 UTC
I believe, that it's fixed by https://cgit.kde.org/kmymoney.git/commit/?id=32a8fd984b17f0eefe660082f8484930d1b155d9
Comment 4 Heiko Fischer 2018-05-21 11:07:09 UTC
Slash is gone, but there is no password dialog.


Error in function int MyMoneyStorageSql::open(const QUrl&, int, bool) : opening database
Driver = QMYSQL, Host = localhost, User = ********, Database = KMyMoney
Driver Error: QMYSQL: Unable to connect
Database Error No 1045: Benutzer '********'@'localhost' hat keine Zugriffsberechtigung (verwendetes Passwort: Nein)
Text: Benutzer '********'@'localhost' hat keine Zugriffsberechtigung (verwendetes Passwort: Nein) QMYSQL: Unable to connect
Error type 1
Comment 5 Thomas Baumgart 2018-09-10 19:47:32 UTC
Git commit ac602ffdb0297706f1f39602856bbe20225e906c by Thomas Baumgart.
Committed on 10/09/2018 at 19:47.
Pushed by tbaumgart into branch '5.0'.

Ask for password when connecting to database
Related: bug 398409
FIXED-IN: 5.0.2

M  +46   -20   kmymoney/plugins/sql/sqlstorage.cpp
M  +3    -0    kmymoney/plugins/sql/sqlstorage.h

https://commits.kde.org/kmymoney/ac602ffdb0297706f1f39602856bbe20225e906c