Debugging hints for sql plugin
Jack Ostroff
ostroffjh at aya.yale.edu
Sun Dec 20 23:10:48 GMT 2020
I decided to test the sql back end, but when I try to save as a mysql
database, I get an exception thrown that opening the database failed.
So, I'm debugging in kmymoney/plugins/sql/mymoneystoragesql_p.h. I've
added some debugging output in createDatabase, and found something that
doesn't make sense to me.
After the maindb.open() fails (around line 2044,) I confirmed that
among other values, that maindb.userName is "jack" as it should be.
However, retrieving maindb.lastError.text(), I get "Access denied for
user ''@'localhost' to database 'mysql' QMYSQL: Unable to connect".
localhost is correct, as is the blank password, but where is the
userName? I'm going to start digging into the code for
QSqlDatabase.open() but thought I'd ask first if anyone can think of
something I might be doing wrong. Just to confirm, I can run mysql at
command line, and the database does open, so I know the db system
(mariadb) is running, and I do have permissions to login.
Jack
More information about the KMyMoney-devel
mailing list