How to set MySQL as GNUCash backend

For a while I planned on keeping stats of my income and spending, as what you can’t define, you can’t control so I checked to see what would be the best option for this.

After some digging around, still the best option seems to be GNUCash.

The default setup does not fit my needs, as it uses local xml files to save the data. This is not portable, nor convenient for me, as I’d have to either carry around the laptop with me, or at least an encrypted drive to store the database. So I checked to see if there’s no way to use a remote database with GNUCash. And it is! It seems that the support for MySQL is a great feature, but by default, in some distributions it’s not listed. When you select to save your data, you only get the option to save it as a file – which got me wondering around looking for options.

So in order to enable the MySQL backend support for GNUCash you need to the following:

On Fedora (RPM based distributions):

dnf install libdbi-drivers-dbd-mysql perl-DBD-MySQL

On Ubuntu (DEB based distributions):

apt install libdbd-mysql


Now, you will have the option to save your accounting information on a remote database, that can be accessed from anywhere using a VPN, or an SSH tunnel.

NOTE: When you see the Save button grayed out and you are using the MySQL back end, don’t freak out, this is normal, as all the transactions are recorded automatically in the database.

If you know a good open source based web application that can be self hosted, please let me know using the comments or the contact page.


3 thoughts on “How to set MySQL as GNUCash backend”

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.