Bug 394384 - MySQL connection error with dbname "KMyMoney"
Summary: MySQL connection error with dbname "KMyMoney"
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: database (show other bugs)
Version: 5.0.1
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-17 16:46 UTC by Heiko Fischer
Modified: 2018-09-10 19:47 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.0.2


Attachments
Patch (675 bytes, patch)
2018-05-17 16:46 UTC, Heiko Fischer
Details

Note You need to log in before you can comment on or make changes to this bug.
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 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