最新公告
  • 欢迎您光临仿站吧 帝国CMS模板一站式建站供应平台 . 欢迎加入VIP
  • 报错:[Err] 1055 - Expression #1 of ORDE

    正文概述 仿站吧   2023-08-18 22:02:10  
    在Navicat中执行SQL语句时,报以下错:

    [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

    解决方法一:
    在MySQL中执行:

    select version(),
    @@sql_mode;SET sql_mode=(SELECT REPLACE(@@sql_mode,‘ONLY_FULL_GROUP_BY’,’’));

    这个方法只能解决当前的,最佳答案还是用解决方法二。

    解决方法二:
    修改MySQL的配置文件 my.ini,在[mysqld] 下面增加代码:

    sql_mode=‘STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION’

     

    修改完my.ini文件后需要重启一下MySQL服务,如果是windows系统,则执行:
    net stop mysql
    net start mysql
    -----------------------------------
    ©著作权归作者所有:来自51CTO博客作者邵奈一shaonaiyi888的原创作品,请联系作者获取转载授权,否则将追究法律责任
    报错:[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregat
    https://blog.51cto.com/u_12564104/2896732
    仿站吧,一个优质的源码资源平台!
    仿站吧 » 报错:[Err] 1055 - Expression #1 of ORDE