Upload problem to mysql database
jralls at ceridwen.us
Fri Jan 21 14:33:20 EST 2011
On Jan 21, 2011, at 11:02 AM, Erwin Winkel wrote:
> Hello list,
> I use GC 2.4.0 and would like to use a mysql database to store the data. I
> have uploaded the existing data succesfuly once. However, when I try to
> upload a new version of this data, the upload fails with an error message.
> First there is a question if the existing data should be overwritten and
> this is confirmed the error message pops up stating that there is bad or
> unreadable data.
> This is hardly to believe because in the xml-structure everything works
> I tried this both with compressed and uncompressed xml settings.
> Has someone experienced this as well? What is going wrong here?
It sounds like you're trying to use an XML file as your primary storage and to periodically run File>Save As to save it to a MySql database. That's unlikely to work unless you have set up your user account in MySql to have DROP TABLE permissions. The same would be true of Postgres. SQLite doesn't have such security features, and it's writing a local file anyway, so it should work.
In any case, it's not the intended use of the sql backend, which is that you will convert your XML file to a SQL database and then use the database with Gnucash. Saving to XML periodically will work, because the XML file is always rewritten anyway and because you have write authority in your local directory. You won't have the automatic backups (you'll have to rename your old XML files yourself outside of Gnucash... or use a different file name every time). It's probably better, though, to use MySql's backup facilities.
More information about the gnucash-user