Error Connecting to MySQL DB 4.8.1.1

Thomas Baumgart thb at net-bembel.de
Sun Feb 25 16:53:13 UTC 2018


On Sonntag, 25. Februar 2018 04:51:18 CET El Cas wrote:

> On Sun, Feb 25, 2018 at 2:31 AM, Thomas Baumgart <thb at net-bembel.de> wrote:
> > Having the DB on a separate server should not make a difference. All
> > communication (incl. structure updates etc) between KMyMoney and the SQL
> > DB is
> > via a communication link.
> > 
> > I am not sure, if bringing in 5.0 at this point is a good alternative. You
> > might have a trouble to go back to 4.8 unless you want to stick with 5.0.
> > Since you're building from source also, use the 5.0 branch, not master. It
> > already contains a couple of bug-fixes over the released 5.0 version.
> 
> The reason I was using Kubuntu  18.04/KMM 5.0 was because 18.04 is
> scheduled to be released in April and if this fixed my problem I would just
> going to completely upgrade my system to 18.04/5.0 ahead of scheduled.
> 
> So while using Kubuntu 18.04/KMM 5.0 I was getting a database user error so
> I just temporarily granted the username I am using for KMM all privileges.
> I created an empty test account and proceeded to save as DB. I put in the
> required information and when I clicked on Ok. Got the error below.
> 
> *Error in function int MyMoneyStorageSql::open(const QUrl&, int, bool) :
> opening new database*
> 
> *Driver = QMYSQL, Host = X.X.X.X, User = kmymoney, Database = /newkmymoney*
> 
> *Driver Error: QMYSQL: Unable to connect*
> 
> *Database Error No 1049: Unknown database '/newkmymoney'*
> 
> *Text: Unknown database '/newkmymoney' QMYSQL: Unable to connect*
> 
> *Error type 1*
> 
> *Executed: *
> 
> *Query error No -1: *
> 
> *Error type 0*
> 
> I checked the DB server and the Database was created but it was empty.
> 
> So I went back to Kubuntu 17.10/KMM 4.8.1.1 (from source) and repeated the
> same process. This time the test database was created and the tables were
> created. I decided to attempt to open my original database and got the same
> error I reported in my first email.
> 
> As for difference between 4.8.1.1 vs 4.6.6 I found the following
> 
> 4.6 has 24 tables vs 23 tables on 4.8:  *kmmtmpfileinfo*

That's not a problem. This seems to be some leftover from a previous run 
(probably the creation of the new columns in kmmfileinfo). You should be able 
to drop that table.

> And the following tables have extra columns
> Version    tablename   field name
> type                          Null?        Default Value
> 4.8    *kmmfileinfo*      hiOnlineJobId            bigint(20) unsigned
> YES         NULL
> 4.8    *kmmfileinfo*      hiPayeeIdentifierId     bigint(20) unsigned
> YES         NULL
> 4.8    *kmmschedules*    lastDayInMonth          char(1)
>                        NO         NULL
> 4.8    *kmmsplits*        costCenterId               varchar(32)
>     YES         NULL

Those are the new columns that were added in 4.8. So that looks about right 
and 4.8 cannot start w/o them.

> I made a back up of my current DB and added the missing fields to the
> corresponding tables and I was able to open the Database. It proceeded load
> and when it reached 97% it began to do *testing fileFixVersion*. During the
> 0 < 4 run it  performed several *Fixed interest action in XXXX* actions. It
> then ran *testing fileFixVersion* *1 < 4 and 2 <4 *has been running for a
> long time (almost 2hr as of this email). I don't know how long the testing
> normally takes but I will let it continue running and see how long it takes
> to finish.
> 
> I am going to check on it when I wake up. I will report any progress, or
> lack there off.

filefix 2 < 4 is doing the following according to the source code:

  // scan the transactions and modify transactions with two splits
  // which reference an account and a category to have the memo text
  // of the account.

filefix 3 < 4 is doing the following:

  // make sure each storage object contains a (unique) id

That is just a single operation and should not take long.


I can't tell you anything about the speed. Usually I use KMyMoney with a GPG 
encrypted XML file and not a database backend.


-- 

Regards

Thomas Baumgart

https://www.telegram.org/       Telegram, the better WhatsApp
-------------------------------------------------------------
You cannot strengthen the weak by weakening the strong.
-------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 846 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kmymoney-devel/attachments/20180225/870a8e48/attachment.sig>


More information about the KMyMoney-devel mailing list