环境要求:
1.
环境:
mysql版本5.7.18-log
查询:
group by
报错信息:
ERROR 1055 (42000): Expression #3 of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘s.type_name’ which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
解决方案:
打开/etc/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’;
重启mysql服务,再次执行sql语句,完美解决了!
问题2:
php常见错误Call to undefined function dom_import_simplexml()答:配置环境的时候未安装上php的dom扩展