Summary: | SQL database creation crash when trying to connect to a remote Mysql (Percona) server | ||
---|---|---|---|
Product: | [Applications] kmymoney | Reporter: | lp.allard.1 |
Component: | general | Assignee: | KMyMoney Devel Mailing List <kmymoney-devel> |
Status: | RESOLVED FIXED | ||
Severity: | grave | CC: | fvilas, lp.allard.1 |
Priority: | NOR | ||
Version: | 4.6.4 | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kmymoney/88b8f16696f7ba5fb97f351e03877de573799491 | Version Fixed In: | |
Sentry Crash Report: |
Description
lp.allard.1
2013-11-12 12:33:43 UTC
It probably needs to be clarified in the documentation... In the interest of supporting multiple database backends, KMM is unable to actually create the database through the connection. Can you try creating a database called "kmymoney" on your MySQL server? From there, then repeat the steps and it should succeed. If this is the case, we can update the docs and UI strings quickly. If something else is still the problem, then we can work on fixing that. Hello Fernando, I had already created the database lolcalyy on the Mysql server with the following statements: CREATE DATABASE kmymoney; GRANT ALL ON kmymoney.* TO lp.allard.1@remoteIP; FLUSH PRIVILEGES; I have confirmed with phpmyadmin that I (as user) have full access to the kmymoney database remotely from the machine I intend to use.. Funny thing, when I try to connect to the remote DB, the MySQL server throws the following line in the server's logs: 131113 7:17:08 [Warning] Aborted connection 643 to db: 'kmymoney' user: 'lp,allard.1' host: 'remoteIP' (Got an error reading communication packets) I believe the "error reading communication packets" is due to KMM crashing thus abruptly closing the connection to the SQL server.. Actually the syntax I used on the SQL server was: CREATE DATABASE kmymoney; CREATE USER 'lp.allard.1'@'remoteIP' IDENTIFIED BY 'some_pass'; GRANT ALL PRIVILEGES ON kmymoney.* TO 'lp.allard.1'@'remoteIP' FLUSH PRIVILEGES; Forgot to add, I just looked in phpmyadmin to confirm once again the privileges and user settings were right, and I was surprised to see that the database kmymoney is populated with tables such as: kmmAccounts kmmBudgetConfig kmmCurrencies kmmFileInfo kmmInstitutions kmmKeyValuePairs kmmPayees kmmPrices kmmReportConfig kmmSchedulePaymentHistory kmmSchedules kmmSecurities kmmSplits kmmTransactions So I believe something is working but not everything.. Hmm... I think there is a way to keep it from crashing if someone else hits this. In the meantime, can you try something else? You list a series of steps to reproduce the error. Instead of closing the .kmy file, can you try a "Save as database"? That should populate the database so that it can proceed in the future. I have saved the file as database, KM populated the DB on the remote SQL server and from now on it uses the DB instead of the kmy file on the local machine. As far as I know, its now working fine. In between, I have restarted the MySQL server and this seemed to help. I am not ruling out an issue on the server's end or a network error due to the "error reading communication packets".. I will monitor if this is stable and if so I will propose to close this report unless you want me to do more testing? In the end, KMM shouldnt just "quit" with a seg fault if something is not set properly... Agreed... I will work on fixing this crash over the weekend. The user needs more information about what is going on and how to fix it instead of a crash. Other than that, I have been extensively pounding on the SQL connection with KMM and so far its rock solid! Sometimes it needs a few seconds to display a page in KMM for ledgers with several thousands of transactions but its overall really fluid experience. Good job guys with the SQL connection!! Git commit 88b8f16696f7ba5fb97f351e03877de573799491 by Fernando Vilas. Committed on 06/12/2013 at 04:29. Pushed by fvilas into branch 'master'. Fix crashes from uncaught exceptions opening files/databases. Related: bug 327718 M +15 -10 kmymoney/kmymoney.cpp M +24 -0 kmymoney/mymoney/storage/mymoneydatabasemgrtest.cpp M +1 -0 kmymoney/mymoney/storage/mymoneydatabasemgrtest.h http://commits.kde.org/kmymoney/88b8f16696f7ba5fb97f351e03877de573799491 |