注意:

采用navicat新建数据库时,需要将编码方式设置为,字符集:utf8 -- UTF-8 Unicode ,排序规则:utf8_general_ci

在运行sql语句时,出现以下问题:

[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated c

原因:

MySQL 5.7.5及以上功能依赖检测功能。如果启用了ONLY_FULL_GROUP_BY SQL模式(默认情况下),MySQL将拒绝选择列表,HAVING条件或ORDER BY列表的查询引用在GROUP BY子句中既未命名的非集合列,也不在功能上依赖于它们。(5.7.5之前,MySQL没有检测到功能依赖关系,默认情况下不启用ONLY_FULL_GROUP_BY。有关5.7.5之前的行为的说明,请参见“MySQL 5.6参考手册”)。

解决办法:

打开: /etc/my.cnf

滚动到文件底部复制并粘贴

[mysqld] 
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

到文件的底部

保存并退出输入模式

systemctl  restart mysqld.service

重启MySQL。

执行SQL时出现: ORDER BY clause is not in GROUP BY clause and contains nonaggregated c的更多相关文章

  1. MYSQL---Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column '

    --数据库中插入数据或执行sql语句时一直报下面这个错误: Expression # of ORDER BY clause is not in GROUP BY clause and contains ...

  2. mysql 5.7 Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column ...报错

    使用mysql在执行一条插入语句时 , ', "hhh"); 报错:Expression #1 of ORDER BY clause is not in GROUP BY clau ...

  3. 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contai

    之前一直使用的mysql5,突然换成8之后,有许多地方不一样,今天就碰到一个. 在使用sql语句创建表时,报错:  1055 - Expression #1 of ORDER BY clause is ...

  4. MySQL [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause

    MySQL[Err]1055 上次MySQL5.7.19主从建立完成之后,所有的测试都是在MySQL命令行下进行的,最近用Navicat Premium进行MySQL的连接,然后在插入数据的时候MyS ...

  5. 解决MySQL报错:1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'informat

    解决MySQL报错:1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'informat ...

  6. mysql [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 GRO

    [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated c ...

  7. mysql错误:[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated

    今天迁移django数据库的时候,跑程序的时候出现这样的错误: [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY cla ...

  8. Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'infor

    今天在Navicat上执行SQL增删改查数据操作的时候出现了下面这个问题 Expression #1 of ORDER BY clause is not in GROUP BY clause and ...

  9. navicat:[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and ...

    mysql5.7,xshell下执行sql不会报下面的错,但是navicat会报错,可能是navicat版本问题,换其他客户端不会出现问题. [Err] 1055 - Expression #1 of ...

随机推荐

  1. centOs安装出现No package git available的解决办法

    来源地址 [http://chinacheng.iteye.com/blog/1825538 ] centos安装git 下载源代码安装后,git clone出现“fatal unable to fi ...

  2. 批处理设置IP

    @echo off title 静态IP设置 set netName=本地连接 set address=192.168.1.202 netsh netsh interface ipv4 set dns ...

  3. 吴裕雄 python 神经网络——TensorFlow 循环神经网络处理MNIST手写数字数据集

    #加载TF并导入数据集 import tensorflow as tf from tensorflow.contrib import rnn from tensorflow.examples.tuto ...

  4. Java电子书高清PDF集合免费下载

    这份资源是我经过多年积累才整理归类出来,有很多电子书我觉质量还是非常高的,由于电子书太多我也是用业余时间挑着看的,这么多资源自己保存着也是浪费,就想着现在把资源分享出来,希望能真正帮到大家: 资源我都 ...

  5. 2_2 3n+1问题

    猜想:对于任意大于1的自然数n,若n为奇数,则将n变为3n+1,否则变为n的一半.经过若干次这样的变换,一定会使n变为1.例如:3→10→5→16→8→4→2→1. 输入n,输出变换的次数.n< ...

  6. JavaSE复习~基本语法规则

    java程序的基本结构 java程序的文件后缀为 .java 一个java文件中可以写许多内容,但有且只能有一个 public 修饰的 class 类(class)是Java程序中所有源代码的基本组成 ...

  7. Jmeter调度器小记

    jmeter的调度器中[持续时间(秒)]的优先级是高于[结束时间]和[启动时间]的 举例子: 前提:[循环次数]勾选[永远] 场景1:[持续时间(秒)]设置为120S,[启动时间]设置T+1min,[ ...

  8. 在Ubuntu_meta 16.04中设置默认Python3.5的命令

    ubuntu_meta 默认是安装了python2.7 和python3.5两个版本 查看ubuntu的python版本,默认版本是python2.7 输入:python 直接执行这两个命令即可: s ...

  9. Java学习资源 - 测试

    JUnit注解解释 1. @Test : 测试方法,测试程序会运行的方法,后边可以跟参数代表不同的测试,如(expected=XXException.class) 异常测试,(timeout=xxx) ...

  10. A10131013 Battle Over Cities (25分)

    一.技术总结 这一题是考查图的知识,题目的意思要理解清楚,就是考查统计图中连通块的数量,也就是没有一个结点后. 怎么删除该结点,并且统计连通块的数量成为问题解决的关键,这里可以当访问到结点时,直接返回 ...