在使用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
在网上查看了过多解决方案后得出:
首先第一步找到my.cnf文件,linux中:whereis my.cnf(我的路径是/etc/my.cnf)
第二步,则是修改my.cnf文件,linux中:vim /etc/my.cnf
第三步,在文本最后面(G快速移动到末尾)添加如下:
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服务即可,linux中,service mysqld restart
之后便不会再报错了