安装了mysql5.7.19后,执行语句中只要含有group by 就会报这个错

[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

网上百度了解决方案大致两种方案,但是没有解决这个问题。

第一种方案是修改my.cnf文件,但是我的数据库安装目录里根本没有这个文件;第二种方案是修改sql_mode,但这不能根本上解决这个问题,重启mysql服务后这个问题又会重复出现。

我的系统是mac,参照第一种方案,修改安装目录里my.ini文件,在[mysqld]后面追加下面这句配置后重启服务解决问题。

#sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column的更多相关文章

  1. [mysql] Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'loser.tank_admin.login_ip' which is not functionally dependent on columns in GROUP BY clause; this is

    执行SQL: SELECT login_name,login_ip,sex FROM tank_admin GROUP BY login_name ; 时抛出异常. Expression #2 of ...

  2. 【mybatis】【mysql】mybatis查询mysql,group by分组查询报错:Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column

    mybatis查询mysql,group by分组查询报错:Expression #1 of SELECT list is not in GROUP BY clause and contains no ...

  3. Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'blog.t_blog.addTime' which is not functi

    sql报错: Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Expression #1 of SELECT ...

  4. 记录一次mysql由5.6升级到5.7出现的异常---Expression #23 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'c.commentCount' which is not functionally dependent on columns in GROUP BY clause;

    ### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Expre ...

  5. MYSQL报错:1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column

    1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'rpa ...

  6. mysql升级后出现Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'userinfo.

    安装了mysql5.7,用group by 查询时抛出如下异常: Expression #3 of SELECT list is not in GROUP BY clause and contains ...

  7. Error Code: 1055.Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'userinfo.

    环境:mysql-8.0.15-winx64 问题描述: Error querying database. Cause: java.sql.SQLSyntaxErrorException: Expre ...

  8. Expression #4 of SELECT list is not in GROUP BY clause and contains nonaggregated column

    Error: javax.servlet.ServletException: java.sql.SQLSyntaxErrorException: Expression #4 of SELECT lis ...

  9. Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'userinfo.

    安装了mysql5.7,用group by 查询时抛出如下异常: Expression # of SELECT list is not in GROUP BY clause and contains ...

随机推荐

  1. 日版iphone5 SB 配合REBELiOS卡贴破解电信3G步骤

    1.插入贴膜卡和sim卡:进入“设置—电话—sim卡应用程序”选择CDMA电信解锁: 2.越狱设备,添加cydia.gpplte.com源,安装“6S/6/5S/5C/5电信新补丁”: 3.打卡gpp ...

  2. 模型加速[tensorflow&tensorrt]

    在tensorflow1.8之后的版本中,tensorflow.contrib部分都有tensorrt的组件,该组件存在的意义在于,你可以读取pb文件,并调用tensorrt的方法进行subgraph ...

  3. ABP大型项目实战(2) - 调试与排错 - 日志 - 查看审计日志

    这是<ABP大型项目实战>系列文章的一篇.   项目发布到生产环境后难免会有错误. 那么如何进行调试和排错呢?   我看到俱乐部里有人是直接登陆生产服务器把数据库下载到开发机器进行调试排错 ...

  4. 一个方法教你认识ref(简单易懂)

    参数分为值类型和引用类型,当我们将一个值类型的参数进行传递到另一个方法的时候相当于,将这个变量进行复制到该方法进行操作,但是不会对该变量原始的值有影响. 但是有时候我们需要他有“影响”于是ref就出现 ...

  5. day4(分支结构,循环结构,for循环,九九乘法表)

    一:复习 ''' 1.变量名命名规范 -- 1.只能由数字.字母 及 _ 组成 -- 2.不能以数字开头 -- 3.不能与系统关键字重名 -- 4._开头有特殊含义 -- 5.__开头__结尾的变量, ...

  6. PS教您与粗壮的胳膊拜拜

    Step 01在Photoshop 中打开素材图片,图中圈出的地方是需要调整的. Step 02用[套索工具]圈出胳膊及周围的环境. Step 03单击右键,选择[羽化],设置[羽化半径]为20 像素 ...

  7. JQuery 选择某个td中第二个a标签 控制特殊样式

    a标签没有disabled属性,那么当我们想禁用a标签的点击事件的时候按照下面方法设置. 下面是html代码: <a id="entry” class="entry" ...

  8. [转帖]ORA-03113解决方法

    ORA-03113解决方法 https://www.cnblogs.com/xwdreamer/p/3910264.html 同事遇到过很多次 之前懒的处理 这次看到这个blog 下次遇到了 处理一下 ...

  9. RecyclerView的点击、滑动、拖动事件

    效果图: 在gradle里导包   implementation 'com.android.support:recyclerview-v7:28.0.0' activity_main <?xml ...

  10. Python中的 一些常用技巧函数[.join()]

    1.str.join(item)字符串操作函数,参数item可以是字符串.元组.字典,示例 ','.join('abc') [','.join('abc')] 输出: 'a,b,c'['a', 'b' ...