GNOME Bugzilla – Bug 624465
SQL backend won't save to MySql in 64-bit Windows
Last modified: 2018-06-29 22:41:59 UTC
I'm using gnucash nightly build. My env is Windows 7 Ulimate 64bit Korean version Problem is "save as" to mysql backend I saw the error meesage, not connected the mysql server. gnucash-2.3.14-svn-r19233-setup.exe - mysql back end is not saved gnucash data. I can connect the mysql gnucash database using Mysql Workbench, but I can't connect to Mysql database using gnucash. At another XP PC, I can using Mysql database using Gnucash. relation trace file is mysql tracer file. trace file content: * WARN <qof.engine> [guid_init()] only got 2086 bytes. The identifiers might not be very random. * WARN <gnc.app-utils> Could not spawn perl: 하위 프로세스 실행 실패 (No such file or directory) * INFO <gnc.backend.dbi> [gnc_dbi_check_sqlite3_file] exists, does not have SQLite format string -> not DBI * DEBUG <gnc.backend.dbi> [enter ../../../../repos/src/backend/dbi/gnc-backend-dbi.c:gnc_dbi_mysql_session_begin()] * CRIT <gnc.backend.dbi> [mysql_error_fn()] DBI error: 2003: Can't connect to MySQL server on 'localhost' (10061) * CRIT <gnc.backend.dbi> gnc_dbi_set_error: assertion `dbi_conn != NULL' failed * CRIT <gnc.backend.dbi> [gnc_dbi_mysql_session_begin()] Unable to connect to database 'gnucash' * DEBUG <gnc.backend.dbi> [leave gnc_dbi_mysql_session_begin()] * DEBUG <gnc.backend.dbi> [enter ../../../../repos/src/backend/dbi/gnc-backend-dbi.c:gnc_dbi_session_end()] * DEBUG <gnc.backend.dbi> [leave gnc_dbi_session_end()] * DEBUG <gnc.backend.dbi> [enter ../../../../repos/src/backend/dbi/gnc-backend-dbi.c:gnc_dbi_mysql_session_begin()] * CRIT <gnc.backend.dbi> [mysql_error_fn()] DBI error: 2003: Can't connect to MySQL server on 'localhost' (10061) * CRIT <gnc.backend.dbi> gnc_dbi_set_error: assertion `dbi_conn != NULL' failed * CRIT <gnc.backend.dbi> [gnc_dbi_mysql_session_begin()] Unable to connect to database 'gnucash' * DEBUG <gnc.backend.dbi> [leave gnc_dbi_mysql_session_begin()] * DEBUG <gnc.backend.dbi> [enter ../../../../repos/src/backend/dbi/gnc-backend-dbi.c:gnc_dbi_session_end()] * DEBUG <gnc.backend.dbi> [leave gnc_dbi_session_end()] * WARN <gnc.scm> 스타일 시트를 저장할 수 없음
Some questions to eliminate some possibilities: * Is your Windows XP 32 or 64 bit ? * On which PC is the mysql server running ? On the Windows 7 system ? * Do you run Mysql Workbench on the Windows 7 system as well ? * Do you use the same hostname specification in GnuCash and Mysql Workbench ?
My env: Gnucash is running on Windows 7 64bit Korean, MySql 64bit version is running on same machine, Mysql Workbench is running on same machine, Workbench and Gnucash connection setting is hostname: localhost username: gnucash passwd: gnucash
How about your Windows XP installation, is it 32bit or 64bit ?
My OS is Windows 7 64bit. Not XP.
From your original report: > At another XP PC, I can using Mysql database using Gnucash. I am asking about that PC because I am looking for differences other than the OS in order to eliminate possible problem areas. In this case I am not sure if 32-bit gnucash can communicate with a 64-bit mysql just like that. I would also like to know where mysql was installed when you ran the XP test. Was mysql still on the Windows 7 64bit machine or did you install mysql on the XP machine when running the test ?
Case 1. Success MySQL 32bit running on Windows XP 32bit (A Machine) GnuCash running on Windows XP 32bit (A Machine) Case 2. Fail MySQL 64bit running on Windows 7 64bit (B Machine) GnuCash running on Windows 7 64bit (B Machine) Case 3. Success VMWare Environment MySQL 64bit running on Windows 7 64bit (Host OS, A Machine) Gnucash running on Windows XP 32bit (Guest OS, A Machine) In case 1/2/3, MySQL Workbench works fine.
Thanks you for this additional information. I see two potential problems: * GnuCash with mysql has issues on Windows 7 * GnuCash with mysql has issues with any 64-bit edition of windows Your tests don't give enough information to determine which problem we have to look at, but it clearly doesn't matter which MySQL server version is being used. The problem is somewhere in our client. From the trace file, I can see libdbi fails to connect to your MySQL server. Libdbi is an external code library used by GnuCash to connect to different databases. In the gnucash code, this call is a very simple and straightforward command, so it looks like there is an incompatibility between libdbi and your system (32-bit libdbi on 64-bit windows or libdbi not compatible with Windows 7,...) I'm afraid I don't know enough about libdbi and I don't have the proper test systems available to help you further debug this.
I recently had the opportunity to debug a 32-bit Windows 7 issue with GnuCash and MySQL. From that experience I can conclude that GnuCash with MySQL works fine on 32-bit Windows 7. [1] Apart from a crash that has been solved in r19901, the issue preventing the use of MySQL was a firewall issue. From the trace logs you provide, it could very well be the same problem. It would be great if you could run a test on your 64bit Windows 7 installation to confirm or deny this. Can you try to download and install the latest nightly build from http://code.gnucash.org/builds/win32/trunk/ (scroll all the way to the bottom to see the most recent installer). Then use this GnuCash build to save to MySQL, but instead of using 'localhost', try using '127.0.0.1' as hostname. These two are not equivalent on Windows. Let us know what happens. [1] See bug 635911
test with r19901 1. try "localhost" not working 2. try "127.0.0.1" works fine Thank you
That's good news! This not only means we found the cause of this bug, but also it shows that GnuCash 32bit works fine on Windows 64bit. Pfew, I was worried about that part. Thank you for running the tests. *** This bug has been marked as a duplicate of bug 635911 ***
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=624465. Please update any external references or bookmarks.