DBI backend now supports mysql and postgresql

Phil Longstaff plongstaff at rogers.com
Sun Jul 13 16:12:19 EDT 2008

As of rev 17323, the gda-dev2 backend supports mysql and postgresql databases again.  Despite the name, it uses the DBI library (http://libdbi.sourceforge.net).

In the file menu, the 'Database Connection' menu entry allows you to save to or load from one of these databases.  This entry brings up a dialog box with:

1) Radio buttons to select mysql or postgresql (default = mysql)
2) 4 text boxes to enter host name (default 'localhost'), database name (default 'gnucash'), username and password
3) Load and Save buttons.

The format of the URLs is:  mysql://<host>:<dbname>:<username>:<password> or postgres://<host>:<dbname>:<username>:<password>

where: <host>, <dbname>, <username> and <password> represent the corresponding info.  <username> and <password> may be blank.  Note that the title bar will not show 'mysql://' or 'postgres://' because they follow the gnome 2 HIG rule that only file name info, not path info should be shown, and the routine interprets the '//' as path info.

I'm looking for people who can test the code for any of the 3 db engines (sqlite3, mysql or postgresql).  I've loaded in my normal data, which uses some business features, but not all, so someone who can test the business features would be great.

To build, you need to get the dbi library and drivers.  'configure' supports '--disable-dbi' and '--with-dbi-dbd-dir', which specifies where the dbi drivers are (default = /usr/lib/dbd).


More information about the gnucash-devel mailing list