Page 1 of 1

Problem creating users after install

Posted: 06 May 2020, 04:26
by Guy Rosinbaum
Installed 16.04 Ubuntu LTS LAMP 5.6 PHP everything went great and most everything seems to work. However Im getting the following error if I go to Administration> User management

MySQL Query Failed: Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'opencats.user.access_level' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

SELECT
COUNT(user.site_id) AS totalUsers,
user.access_level,
site.user_licenses AS userLicenses
FROM
user
LEFT JOIN site
ON user.site_id = site.site_id
WHERE
user.site_id = 1
AND
user.access_level > 100
GROUP BY
user.site_id

Re: Problem creating users after install

Posted: 06 May 2020, 04:44
by Guy Rosinbaum
Actually I fixed it myself.

Here is the solution I used

sudo nano /etc/mysql/my.cnf

go to bottem of file and add the following

[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

Restart MYSQL
sudo service mysql restart

Fixes this issue
here is some additional info
https://stackoverflow.com/questions/341 ... y-in-mysql