How to use mysql.

David dgpickett at aol.com
Thu Sep 13 11:12:52 EDT 2012


I also just wrestled with windows 7, the latest MySQL 5.5.27 and GnuCash 2.4.7, and found I had to edit the %systemroot%\system32\drivers\etc\hosts file to restore localhost there: http://helpdeskgeek.com/windows-7/windows-7-hosts-file/  I had to save-as and then rename the old and new files, which, even without permission, open file and lock challenges, is a good practice.

It looks like the gethostbyname libraries in use by GNUCash are missing the boat, as nslookup localhost, and SQuirreL JDBC and the included mysql clients have no problem discovering the IP address of localhost, worked fine with localhost on the same MySQL server.  However, I uncommented the hosts line for 127.0.0.1 just under the comment that says it is commented because DNS does localhost, and localhost started to work for GNUCash.  

Since it is the default in GNUCash and mysql, GNUCash should be using correct DNS and not have this problem.

The error dialog should say that the name localhost did not resolve, not just "something bad happened, could be anything".  It might even direct you to the right trace file.

The trace file seems to be using a buffered FILE* or such that writes belatedly (I guess I am lucky I did not have to wait for end of job), also not a good practice, causing notepad++ to ask "File has changed, would you like to refresh".  The C/C++ stderr is entirely unbuffered for a reason.  Sometimes, after a crash, the last line, even if not complete, is still very informative.  Carriage returns before line feeds would be nice, too, since I believe Windows defaults to using notepad on *.log.

The Google product for this problem was weak, so while it remains broken, I hope this helps.



More information about the gnucash-user mailing list