openmolar1
openmolar1 copied to clipboard
Group by queries are not allowed by some mysql/mariadb server configurations.
After a successful install/configuration of openmolar, some users are getting an error when they search for a patient.
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.