1

I've been using gnucash for years and it's awesome. But the reports are a bit rough. I'm planning to load the data into Mysql so I can write my reports easily.

I started using the xml but when I try to "Save as..." to Mysql, gnucash doesn't create data into the database, only tables.

Is there a way I can get the data across to Mysql or I need to start all over again?

Desorder
  • 1,549
  • 12
  • 16

2 Answers2

1

Albeit this question being old, I wanted to share my experience in the case someone needs a solution for it, as the answer is very easy but probably not the most natural or intuitive for everyone's perception.

Technically, gnucash supports mysql (at least on linux) natively. So to migrate, one can just use the "File -> Save as" dialog, select mysql with the proper database and credentials and then gnucash will migrate everything from the file to the mysql target. I have no experience with Mac or Windows on this topic however...

This is how it looks on my machine: enter image description here

I use the sqlite3 variant regularly and encountered no problems so far.

el.nicko
  • 473
  • 6
  • 12
  • The question is old, but the problem persists. The issue is not how to do a Save As MySQL, but the fact that the empty tables are created, i.e. *no data* is brought forward. –  Feb 21 '19 at 21:50
  • It is extra work, but you should be able to export your accounts and transactions from your current solution, then select the mysql backend, then import accounts, transactions. [Exporting transactions](https://lists.gnucash.org/docs/C/gnucash-help/trans-export.html) [Importing Transactions](https://lists.gnucash.org/docs/C/gnucash-help/trans-import.html) Another solution that may work is to save in sqlite3 format, then perform a dump of sqlite3 and restore in mysql. [example](https://medium.com/dbconvert/how-to-convert-sqlite-to-mysql-44a0845124c6) Although there maybe compatibility issues. – steve51516 Jun 03 '21 at 13:56
0

Have you tried this export script ? It was written to export gnucash to mysql using perl. The script can also be found at github https://github.com/xaprb/gnucash2mysql

cgull
  • 47
  • 4
  • 2
    It is better to provide details of your solution so that the answer is contained as far as possible within this question. If the link you provided is no longer valid, the answer becomes useless. – crafter Mar 04 '15 at 07:15