openmolar1 icon indicating copy to clipboard operation
openmolar1 copied to clipboard

Group by queries are not allowed by some mysql/mariadb server configurations.

Open rowinggolfer opened this issue 7 years ago • 1 comments

After a successful install/configuration of openmolar, some users are getting an error when they search for a patient.

group_by_error

rowinggolfer avatar Jan 04 '18 10:01 rowinggolfer

This is down to a change in recent mysql server versions in the handling of "group by" queries.

More information (and some workarounds) are noted here.... https://dev.mysql.com/doc/refman/5.7/en/group-by-handling.html

A global fix is to modify the mysql configuration by adding such as this to /etc/mysql/my.cnf ` [mysqld]
sql_mode = "STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

`

After restarting mysql, all should work.

Note - I would prefer to use a specific database fix, rather than changing global parameters in this way. I will look into it.

rowinggolfer avatar Jan 04 '18 10:01 rowinggolfer