Version: 4.5 (using KDE 4.5.0) OS: Linux I setup a new KMyMoney and using MSQL as database. When restarting, it shows me the connection window and asks for a password. All fields look correct, such as database, username and of course I enter the password.I get an error that connection failed.(and the program crashes. Yes the database section crashes a lot) I restart the program and cancel every window that comes up, I get the connection error as expected, I cancel and after everything looks clear, I go to file -> open database. then the same window opens as initially with the same info in it. I enter the same password as initially and I get the connection and the data show up. Reproducible: Always Steps to Reproduce: I restart the program and cancel every window that comes up, I get the connection error as expected, I cancel and after everything looks clear, I go to file -> open database. then the same window opens as initially with the same info in it. I enter the same password as initially and I get the connection and the data show up.
How did you create the database? If you allowed KMM to create it for you, you should not need to enter a password. This is covered in the Help pages (I think!). Otherwise, could you start KMM from within a konsole session, and let us know what error message you see?
It looks like it's not using the database $ kmymoney kmymoney(18788)/kdecore (KPluginInfo) KPluginInfo::kcmServices: found 0 offers for "KBanking" kmymoney(18788)/kdecore (KPluginInfo) KPluginInfo::kcmServices: found 0 offers for "Reconciliation report" kmymoney(18788)/kdecore (KPluginInfo) KPluginInfo::kcmServices: found 1 offers for "Print check" kmymoney(18788)/kdecore (KPluginInfo) KPluginInfo::kcmServices: found 0 offers for "KMyMoney OFX" kmymoney(18788)/kdecore (KPluginInfo) KPluginInfo::kcmServices: found 1 offers for "iCalendar" kmymoney(18788)/kdecore (KLibrary) kde4Factory: The library "/usr/lib64/kde4/kmm_kbanking.so" does not offer a qt_plugin_instance function. 7:2010/09/06 08-06-40:aqbanking(18788):started 3:2010/09/06 08-06-40:aqbanking(18788):qbanking.cpp: 422: No Qt translation found for your language en KMyMoney kbanking plugin loaded kmymoney(18788)/kdecore (KLibrary) kde4Factory: The library "/usr/lib64/kde4/kmm_reconciliationreport.so" does not offer a qt_plugin_instance function. KMyMoney reconciliation report plugin loaded Calling appendChild() on a null node does nothing. kmymoney(18788)/kdecore (KLibrary) kde4Factory: The library "/usr/lib64/kde4/kmm_printcheck.so" does not offer a qt_plugin_instance function. KMyMoney printcheck plugin loaded kmymoney(18788)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig: QFSFileEngine::open: No file name specified kmymoney(18788)/kdecore (KLibrary) kde4Factory: The library "/usr/lib64/kde4/kmm_ofximport.so" does not offer a qt_plugin_instance function. KMyMoney ofximport plugin loaded kmymoney(18788)/kdecore (KLibrary) kde4Factory: The library "/usr/lib64/kde4/kmm_icalendarexport.so" does not offer a qt_plugin_instance function. KMyMoney iCalendar plugin loaded QPainter::end: Painter ended with 2 saved states QPainter::end: Painter ended with 2 saved states QPainter::end: Painter ended with 2 saved states QPainter::end: Painter ended with 2 saved states QPainter::end: Painter ended with 2 saved states Error in function int MyMoneyStorageSql::upgradeDb() : Error retrieving file info(version) Driver = QMYSQL, Host = localhost, User = thomas, Database = Driver Error: Database Error No -1: Text: Error type 0 Executed: SELECT version FROM kmmFileInfo; Query error No 1046: No database selected QMYSQL: Unable to execute query Error type 2 KCrash: Application 'kmymoney' crashing... sock_file=/home/thomas/.kde4/socket-xxxxxx.btspuhler.com/kdeinit4__0 [1]+ Stopped kmymoney
Created attachment 51366 [details] connection window
Somehow the database name is not getting set, even though it is there in the screenshot. I also updated the bug title, since MSQL is the driver for Microsoft SQL Server, and you appear to be using MySQL.
Thomas. Can you try starting KMM with the following line and see what happens? sql://thomas@localhost/KMyMoney?driver=QMYSQL Technical bit. The database name is taken from the url passed to mmstoragesql. If that's blank, I would expect it to fail to open the database. Instead it's failing later, in trying to upgrade. Something strange here.
Something must be wrong in this command: $ sql://thomas@localhost/KMyMoney?driver=QMYSQL bash: sql://thomas@localhost/KMyMoney?driver=QMYSQL: No such file or directory
The command should be $ kmymoney sql://thomas@localhost/KMyMoney?driver=QMYSQL
Created attachment 51446 [details] See result in the attachement
One of two things, either you didn't give user thomas permissions on the database, or mysql requires a password for user thomas. Try the following: 1. in Konsole: mysql -u root (you may need to supply a mysql root password if you set one up) grant all on KMyMoney.* to thomas@localhost; flush privileges; quit; See if that helps. Or 2. Start kmymoney with kmymoney sql://thomas@localhost/KMyMoney?driver=QMYSQL&secure=yes You will then need to supply your mysql password in the resulting dialog. Note you should not confuse the mysql password for thomas with your Linux login password; it may be the same, it may not, depending on how you set it up.
This command is missing something. I am not being asked for a password. already have granted ALL to the database. I can connect from KmyMoney if I open if from within. Access denied for user 'thomas'@'localhost' (using password: NO)
Part of the problem here lies in the pseudo-URL we use. Where you have a passworded database, the URL contains an ampersand (&) character. This is now being interpreted, correctly I suspect, as the end of the command, hence the following 'secure=yes', which indicates a password is needed, is getting dropped. Try enclosing the URL in single quotes as follows: kmymoney 'sql://thomas@localhost/KMyMoney?driver=QMYSQL&secure=yes' I need to look at how we handle the matter of the recent files list.
I am now asked for a password, but from the error message, it looks as if teh database name is now being dropped: Error in function int MyMoneyStorageSql::upgradeDb() : Error retrieving file info(version) Driver = QMYSQL, Host = localhost, User = thomas, Database = Driver Error: Database Error No -1: Text: Error type 0 Executed: SELECT version FROM kmmFileInfo; Query error No 1046: No database selected QMYSQL: Unable to execute query Error type 2
This is the same error as when I start KMyMoney from the menu. I looks as if the database name gets lost. BTW I am currently on IRC freenode mandriva
SVN commit 1175070 by fvilas: BUG: 250300 Commit Tony Bloomfield's patch to fix database name being dropped when a password is used for database logins. M +1 -0 kselectdatabasedlg.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1175070
seems to work. I applied it in Mandriva, 2010.1 updates and cooker
*** Bug 249762 has been marked as a duplicate of this bug. ***
Created attachment 71536 [details] New crash information added by DrKonqi Error in function const QMap MyMoneyStorageSql::fetchBalance(const QStringList&, const QDate&) const : fetching balance Driver = QMYSQL, Host = localhost, User = kmymoney, Database = KMyMoney Driver Error: Database Error No -1: Text: Error type 0 Executed: SELECT action, shares, accountId, postDate FROM kmmSplits WHERE txType = 'N' AND accountId in) ORDER BY accountId, postDate; Query error No 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ORDER BY accountId, postDate' at line 1 QMYSQL: Nelze vykonat dotaz Error type 2 in file /tmp/buildd/kmymoney-3.98.1/kmymoney/mymoney/storage/mymoneystoragesql.cpp line 2954
Git commit dfe65b2d1fc8d4ae196b7f5a6973024208f15f37 by Fernando Vilas. Committed on 03/06/2012 at 16:02. Pushed by fvilas into branch 'master'. Ensure correct SQL syntax when the balance idList is empty. M +8 -4 kmymoney/mymoney/storage/mymoneystoragesql.cpp http://commits.kde.org/kmymoney/dfe65b2d1fc8d4ae196b7f5a6973024208f15f37
Git commit 0d1d96938162f25d77f7ffae19773dbf807d7b7b by Fernando Vilas. Committed on 03/06/2012 at 16:02. Pushed by fvilas into branch '4.6'. Ensure correct SQL syntax when the balance idList is empty. M +8 -4 kmymoney/mymoney/storage/mymoneystoragesql.cpp http://commits.kde.org/kmymoney/0d1d96938162f25d77f7ffae19773dbf807d7b7b