在执行sql语句的时候,报错:
1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column ‘information_schema.PROFILING.SEQ‘ which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
网上找了下处理的方法,大体有两种:一种是直接改配置文件(永久性的),另一种是使用sql语句来设置(临时性)
这里是引用
修改配置文件:在配置文件里加一句就可以了:
vim /etc/my.cnf 编辑,加入以下文件保存,重启mysql服务
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,
NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,
NO_ENGINE_SUBSTITUTION