I have a mysql server on my Ubuntu 20.04 server on a local network as the backend for my GnuCash installation. I can connect with no trouble using an SSH tunnel from my Ubuntu 20.04 desktop. However, I have recently acquired a Windows 10 laptop, and I cannot connect. I have been able to verify that the tunnel is operational, as I can pull up the database in MySQL Workbench on my Windows machine. However, GnuCash always reports 'The server at URL mysql://[db_user]@[local_port]/[database_name] experienced an error or encountered bad or corrupt data.' I have tried using 'localhost' instead of with the same result. I also made sure I am using the same version on both machines. Is there some way to troubleshoot?

  • After talking with someone on the IRC channel for GnuCash, I can now verify the fault is with the way GnuCash implements mysql. It conflicts with my mysql server setup. On Ubuntu, the user installs the mysql client the software will use, but on Windows, the mysql client is included, and it is mariadb, I am told, so it is not playing well with my mysql server. I will probably go ahead and ask on like Stack Overflow at this point, since getting the mysql server and client to communicate is definitely not a finance issue. It is related to authentication protocols between server and client.
    – pokyCoder
    Oct 2, 2020 at 2:10
  • I am going to leave this question up, and if anybody knows more about this specific issue, please feel free to answer. If I am able to solve the problem with help from another source, I will provide an answer myself at that point.
    – pokyCoder
    Oct 2, 2020 at 2:11

1 Answer 1


Your question has more of a tech support vibe to it (so it might be better suited for another stackexchange forum), but I'm going to give it a crack anyways.

I have a similar setup to what you describe, linux server running mysql on my home network, which is accessed by connecting the gnucash application to that DB from Windows and linux pc's / laptops.

In my considered opinion, "this is the way" to run gnucash. Not only are saves / updates automatic and instantaneous, but it has allowed me to create multiple homebrew tools to display / graph data (local network webpages using php, JavaScript, etc). While I realize what I've done is beyond the average consumer, I don't think it's out of reach of a comfortable linux user who can navigate sql and bash. Also, the more of us there are, the more ideas that can be shared and cool stuff that gets created.

Getting to your specific question, you've verified the db is running and created (users, grants, etc). You've verified your ports (3306 on db, tunneled to local ie 5555) and connected a gnucash client to (not localhost) port 5555 on a linux box successfully? Then I'd suggest you review your putty config on Windows.. Check the web for tutorials (for example) and make sure you're not missing a step. Another idea would be to skip the tunnel, try connecting the Windows client to the db ip (192.168.0.X) port 3306 directly. If that works, then your putty config is the problem. Another thing to consider is making sure you're using the same version of the client on each computer, different versions are often backwards but not forwards compatible. Good luck!

  • Well, this is the forum recommended under the GnuCash docs, but the problem is not with the tunnel as I said in my question. I can access the database using MySQL Workbench on the same machine, so the computer has access, it is GnuCash that does not. Also, I will note that PuTTY is no longer necessary, since Windows now has native OpenSSH support and WSL2 allows ssh tunnels to feed through to the computer, so there are alternatives. Even so, I have tried OpenSSH, I have tried WSL2, and I have tried PuTTY, all to the same end. Ultimately, the problem must lie with GnuCash somewhere.
    – pokyCoder
    Oct 1, 2020 at 19:41
  • I can also now verify that I tried opening port 3306 on firewalls and connecting directly using the local ip of the server, and that also did not fix the problem. GnuCash still will not connect.
    – pokyCoder
    Oct 1, 2020 at 21:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .