数据库报错SELECT list is not in GROUP BY clause and contains nonaggregated col
Expression #12 of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘shaogang.role_menu.role_menu_id’ which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
用vim打开mysql.cnf文件
sudo vim /etc/mysql/conf.d/mysql.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
重启mysql服务器
sudo service mysql restart