Migration of KMM 4.8 DB to 5 DB

El Cas eaglexboy at gmail.com
Sun Aug 26 21:41:16 BST 2018


Only have one database (See screenshot below)

[image: image.png]

I changed the password to my user for that DB and I got bad username

*Error in function int MyMoneyStorageSql::open(const QUrl&, int, bool) :
opening database*

*Driver = QMYSQL, Host = 192.168.0.4, User = kmymoney, Database = kmymoney*

*Driver Error: QMYSQL: Unable to connect*

*Database Error No 1045: Access denied for user
'kmymoney'@'MobileThingy.hsd1.co.comcast.net
<http://MobileThingy.hsd1.co.comcast.net>' (using password: YES)*

*Text: Access denied for user 'kmymoney'@'XXXXXXXXX' (using password: YES)
QMYSQL: Unable to connect*

*Error type 1*

*Executed: *

*Query error No -1: *

*Error type 0*


On Sun, Aug 26, 2018 at 2:08 PM Jack <ostroffjh at users.sourceforge.net>
wrote:

> Is there any chance you actually have two different databases?  I know it
> doesn't seem likely, but so is not finding a column you know is present.
> Perhaps you can change the password on the database you see, and then see
> if you get the same error, or one about bad password?
> On 8/26/18 3:39 PM, El Cas wrote:
>
> I pulled the latest code and rebuild KMM with Build Type "*Debugfull*"
> and I enableld Debug trace. When I tried to load my DB I still got the same
> error and I did not see any extra information in the stdout. I copied the
> entire message just in case it helps narrow down why I may be getting this
> error and what I can do to help find the cause and fix for it.
>
> *QXcbConnection: XCB error: 3 (BadWindow), sequence: 2179, resource id:
> 35920248, major code: 40 (TranslateCoords), minor code: 0 **Error in
> function QMap<QString, MyMoneySecurity>
> MyMoneyStorageSql::fetchCurrencies(const QStringList&, bool) const :
> reading Currencies*
>
> *Driver = QMYSQL, Host = 192.168.x.x, User = kmymoney, Database = kmymoney*
>
> *Driver Error: *
>
> *Database Error No -1: *
>
> *Text: *
>
> *Error type 0*
>
> *Executed: SELECT ISOcode, name, type, typeString, symbol1, symbol2,
> symbol3, symbolString, smallestCashFraction, smallestAccountFraction,
> pricePrecision FROM kmmCurrencies ORDER BY ISOcode;*
>
> *Query error No 1054: Unknown column 'pricePrecision' in 'field list'
> QMYSQL: Unable to execute query*
>
> *Error type 2 ...**/kmymoney/plugins/sql/mymoneystoragesql.cpp:2491*
>
>
> On Sun, Aug 26, 2018 at 12:31 PM Thomas Baumgart <thb at net-bembel.de>
> wrote:
>
>> Some update from my end as well: I added some logic which allows me to
>> create e.g. a Version 8 set of tables. Once I open it, all updates are
>> applied and the final state is a Version 12 database. Very strange that it
>> does not work for you.
>>
>> Regards
>>
>> Thomas
>>
>> p.s. at some point I might add that to the repo.
>>
>> On Sonntag, 26. August 2018 20:25:03 CEST El Cas wrote:
>>
>> > Just an update. I looked at the kmmsecurities and the table already had
>> > the pricePrecision column ( pricePrecision smallint(5) UNSIGNED  Null:
>> No
>> > Default: None ).
>> >
>> > I am build KMM again with debug enabled and I will see if I can get more
>> > info on my it's saying the column is missing when it is not.
>> >
>> > On Sun, Aug 26, 2018 at 8:27 AM Thomas Baumgart <thb at net-bembel.de>
>> wrote:
>> >
>> > > Hi,
>> > >
>> > > I am by far not a DB expert and can't really tell you what was
>> happening.
>> > > Since you mention you are at DB version 12, the missing column
>> > > pricePrecision was introduced with DB version 11.
>> > >
>> > > The MYSQL DDL statement for the securities table is as follows:
>> > >
>> > > CREATE TABLE kmmSecurities (id varchar(32) NOT NULL, name text NOT
>> NULL,
>> > > symbol mediumtext, type smallint unsigned NOT NULL, typeString
>> mediumtext,
>> > > smallestAccountFraction varchar(24), pricePrecision smallint unsigned
>> NOT
>> > > NULL, tradingMarket mediumtext, tradingCurrency char(3),
>> roundingMethod
>> > > smallint unsigned NOT NULL DEFAULT 7, PRIMARY KEY (id)) ENGINE =
>> InnoDB;
>> > >
>> > >
>> > > I am not sure, how you can add a column on the fly. Make sure to
>> assign a
>> > > value of 4 for existing entries but don't supply a default for new
>> values.
>> > >
>> > > Tony is right in what he mentioned. I am just not sure if that part my
>> > > have been hit and is broken. As I don't use the DB backend I can't
>> tell.
>> > > Anyone else has ideas?
>> > >
>> > > Regards
>> > >
>> > > Thomas
>> > >
>> > >
>> > > On Freitag, 24. August 2018 23:25:03 CEST El Cas wrote:
>> > >
>> > > > I just installed KMM from source (pull from *master* branch on
>> > > *8/24/2018 @
>> > > > 11:06 MDT*) and when I tried to log on to my DB I am get
>> > > >
>> > > >
>> > > >
>> > > > *Executed: SELECT ISOcode, name, type, typeString, symbol1, symbol2,
>> > > > symbol3, symbolString, smallestCashFraction,
>> smallestAccountFraction,
>> > > > pricePrecision FROM kmmCurrencies ORDER BY ISOcode; Query error No
>> 1054:
>> > > > Unknown column 'pricePrecision' in 'field list' QMYSQL: Unable to
>> execute
>> > > > query*
>> > > > In a previous email thread, Tony Bloomfield had mentioned that when
>> KMM
>> > > > opened a Database the Database Manager should detect the change in
>> > > version
>> > > > and create/delete/alter any table/columns as required, but as you
>> can see
>> > > > from the error above it's not doing it. Is there an update SQL
>> script I
>> > > can
>> > > > run to update the schema for my 4.8 DB to work with 5.0?
>> > > >
>> > > > According to the the kmmfileinfo table it says I am using DB version
>> > > *12* if
>> > > > that helps determine what script(s) I need to run.
>> > > >
>> > >
>> > > --
>> > >
>> > > Regards
>> > >
>> > > Thomas Baumgart
>> > >
>> > > https://www.signal.org/       Signal, the better WhatsApp
>> > > -------------------------------------------------------------
>> > > Mankind makes a lot of things wrong, but if you really want to
>> > > screw up, you need to use a computer! (Juergen von der Lippe)
>> > > -------------------------------------------------------------
>> > >
>> >
>>
>> --
>>
>> Regards
>>
>> Thomas Baumgart
>>
>> https://www.signal.org/       Signal, the better WhatsApp
>> -------------------------------------------------------------
>> Programming is like sex: One mistake and you have to
>> support it for the rest of your life. (Michael Sinz)
>> -------------------------------------------------------------
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kmymoney-devel/attachments/20180826/3a9a319c/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 9013 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kmymoney-devel/attachments/20180826/3a9a319c/attachment-0001.png>


More information about the KMyMoney-devel mailing list