Public bug reported:

In Ubuntu 16.04, attempts to save the gnucash accounts file in mysql
mode gives an error indicating the mysql server experienced an error or
encountered bad or corrupt data.

The problem is caused by the fact that in mysql-server 5.7.12 the
default sql_mode includes NO_ZERO_DATE which conflicts with gnucash
code.

Workaround: add to the [mysqld] section of /etc/mysql/mysql.conf.d/mysqld.cnf 
the line
sql_mode = 
ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

and restart the server
sudo systemctl restart mysql

Upstream bug https://bugzilla.gnome.org/show_bug.cgi?id=765872

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: gnucash 1:2.6.12-1
ProcVersionSignature: Ubuntu 4.4.0-21.37-generic 4.4.6
Uname: Linux 4.4.0-21-generic x86_64
ApportVersion: 2.20.1-0ubuntu2
Architecture: amd64
CurrentDesktop: Unity
Date: Mon May  2 09:07:30 2016
InstallationDate: Installed on 2014-10-21 (558 days ago)
InstallationMedia: Ubuntu 14.10 "Utopic Unicorn" - Alpha amd64 (20141017)
SourcePackage: gnucash
UpgradeStatus: Upgraded to xenial on 2016-03-06 (56 days ago)

** Affects: gnucash (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug xenial

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1577323

Title:
  Server error saving accounts file in mysql mode

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gnucash/+bug/1577323/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to