Error Connecting with MySql

Maf. King maf at chilwell.net
Sat Nov 11 08:45:21 EST 2017


On Friday, 10 November 2017 10:26:10 GMT Mubasher Usman wrote:
> Hi,
> 
> Gnucash ver 2.6.18 windows.
> MySQL 5.7.20 latest one just downloaded today.
> 
> i am trying to save my accounts (by save as) into mysql database with root
> user having full permissions. But I always get the eror and upon searching
> the error in tace files I found the following.
> 
> * 14:57:36  CRIT <GLib> g_utf8_to_utf16: assertion 'str != NULL' failed
> * 14:57:45  CRIT <gnc.backend.dbi> [mysql_error_fn()] DBI error: 1292:
> Incorrect datetime value: '19700101000000' for column 'timespec_val' at row
> 1

Hi,

somehow, one of your transactions has a bogus date in it of 1st Jan 1970.  
Seems that MySQL doesn't like this date!

guess you'll have to manually modify the XML data file by searching for that 
date and changing the year to something more likely.

Turn compression off (if it is enabled) save as a new XML data file. Shut GC 
down.  Take good backups of the new file, (then take another backup!) then open 
the file with some simple text editor and search for the string "1970010100"   
Modify all the found strings and save back out.  Then test in GC and finally 
try the save as SQL

HTH,
Maf.




More information about the gnucash-user mailing list