dragotin / kraft

Kraft helps to handle your daily quotes and invoices in your small business.
http://volle-kraft-voraus.de
GNU General Public License v2.0
60 stars 19 forks source link

Cannot connect to MySQL on other than default port #134

Closed CreateWebNZ closed 2 years ago

CreateWebNZ commented 2 years ago

I tried to enter the host in the form hostname:3307 in order to connect to the database server which runs on that port. Am I missing something or is that not possible?

dragotin commented 2 years ago

Oh yes, that got missed. With the fix above, the port is read from the database config file. Make sure to have a config file in $HOME/.config/kraftdatabaserc that contains something like:

[database selection]
DbDriver=QMYSQL

[mysql settings]
DbDatabaseName=kraft2
DbServerPort=4711

It needs to be added manually to the config file for now.

Other valid keys are DbServerName (default localhost), DbUser (default root) and DbPassword (default empty).

CreateWebNZ commented 2 years ago

Great, thx! I already have DbServerPort in my config file, because I thought that might be the way to do it. :-)