报错信息如下:

[Err] 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_mode:

在sql_mode 中去掉only_full_group_by:

“`
#修改my.cnf中配置:
sql_mode=’STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO

1 对 “mysql5.7 sql_mode问题”的想法;

  1. UPDATE comment c set c.time = DATE_ADD(c.time, INTERVAL 7 DAY) ;
    增加datatime时间

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注

Captcha Code