[err]1055

Mr_邓 Mr_邓     2022-09-20     148

关键词:

本人mysql安装在ubuntu16.04上,mysql版本是5.7.19;在创建表和插入数据时报了

[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

 在网上查到的解决方案是修改/etc/mysql/my.cnf文件,在其中添加如下内容,然后重启mysql(重启命令:service mysql restart)

[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‘

 我尝试了之后,发现重启出现问题。

后来,我发现该版本的mysql配置引用了/etc/mysql/conf.d文件夹以及/etc/mysql/mysql.conf.d文件夹,且配置都放在了mysql.conf.d文件夹下的mysqld.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

,并重启mysql。

完美解决。。。。

[err]1055-expression#1oforderbyclauseisnotingroupbyclauseandcontainsnonaggregated(代码片段)

报告内容:[Err]1055-Expression#1ofORDERBYclauseisnotinGROUPBYclauseandcontainsnonaggregatedcolumn‘information_schema.PROFILING.SEQ’whichisnotfunctionallydependentoncolumnsinGROUPBYclause;thisisincom 查看详情

mysql5.7.9[err]1055插入时候会报错

问题:1055-Expression#1ofORDERBYclauseisnotinGROUPBYclauseandcontainsnonaggregatedcolumn'information_schema.PROFILING.SEQ'whichisnotfunctionallydependentoncolumnsinGROUPBYclause;thisisincompatibl 查看详情

mysql5.7:[err]1055-expression#1oforderbyclauseisnotingroupbyclauseandcontains(代码片段)

使用Navicat连接到MySQL(5.7版)执行插入操作时报了一个错误,如下:[Err]1055-Expression#1ofORDERBYclauseisnotinGROUPBYclauseandcontainsnonaggregatedcolumn‘information_schema.PROFILING.SEQ’whichisnotf 查看详情

mysql5.7:[err]1055-expression#1oforderbyclauseisnotingroupbyclauseandcontains(代码片段)

使用Navicat连接到MySQL(5.7版)执行插入操作时报了一个错误,如下:[Err]1055-Expression#1ofORDERBYclauseisnotinGROUPBYclauseandcontainsnonaggregatedcolumn‘information_schema.PROFILING.SEQ’whichisnotf 查看详情

mysql[err]1055-expression#1oforderbyclauseisnotingroupbyclause(代码片段)

方案1:修改sql_mode的值setsql_mode=‘‘;setsql_mode=‘NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES‘;再次执行刚才的语句,就不会报错了。方案2:在my.cnf添加如下:[mysqld]sql_mode=‘NO_AUTO_VALUE_ON_ZERO,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ 查看详情

mysql5.7.9[err]1055插入时候会报错

问题:1055-Expression#1ofORDERBYclauseisnotinGROUPBYclauseandcontainsnonaggregatedcolumn'information_schema.PROFILING.SEQ'whichisnotfunctionallydependentoncolumnsinGROUPBYclause;thisisincompatiblewithsql_mode=only_full_group_by解决方案:1.暂时解决SETsql_mode=(SELECTREPLACE(&#... 查看详情

mysql5.7:[err]1055-expression#1oforderbyclauseisnotingroupbyclauseandcontains(代码片段)

...)执行插入操作时报了一个错误,如下:[Err]1055-Expression#1ofORDERBYclauseisnotinGROUPBYclauseandcontainsnonaggregatedcolumn‘information_schema.PROFILING.SEQ’whichisnotfunctionallydependentoncolumnsinGROUPBYclause;thisisincompatiblewithsql_mode=only_full_group... 查看详情

mysql-1055错误

今天遇到了1055错误,在本机上程序是可以用的,可是在服务器上就出错了,错误入下:[Err]1055-Expression#1ofORDERBYclauseisnotinGROUPBYclauseandcontainsnonaggregatedcolumn'XXXXXX'whichisnotfunctionallydepend 查看详情

mysql-1055错误

今天遇到了1055错误,在本机上程序是可以用的,可是在服务器上就出错了,错误入下:[Err]1055-Expression#1ofORDERBYclauseisnotinGROUPBYclauseandcontainsnonaggregatedcolumn'XXXXXX'whichisnotfunctionallydependentoncolumnsinGROUPBYclause;thisis... 查看详情

发生数据库错误错误号:1055 [重复]

】发生数据库错误错误号:1055[重复]【英文标题】:ADatabaseErrorOccurredErrorNumber:1055[duplicate]【发布时间】:2018-02-2020:15:14【问题描述】:将数据库从MySQL更改为MySQLI并收到错误-发生数据库错误错误号:1055SELECT列表的表达式#23不在G... 查看详情

洛谷p1055isbn号码

参考技术A注意对X的处理 查看详情

与 CORBA 有啥区别 -port 1050 -ORBInitialPort 1055 选项?

】与CORBA有啥区别-port1050-ORBInitialPort1055选项?【英文标题】:WithCORBAwhatisthedifferencebetweenthe-port1050-ORBInitialPort1055options?与CORBA有什么区别-port1050-ORBInitialPort1055选项?【发布时间】:2014-05-0413:44:09【问题描述】:执行orbd时,似乎有... 查看详情

Laravel:语法错误或访问冲突:1055 错误

】Laravel:语法错误或访问冲突:1055错误【英文标题】:Laravel:Syntaxerrororaccessviolation:1055Error【发布时间】:2017-04-1611:27:52【问题描述】:我想在同一个查询中使用WhereIn和Groupby来获取Result。我试过了:$loadids=explode("#@*",$reciptdet->... 查看详情

1055.theworld'srichest(25)

Forbesmagazinepublisheseveryyearitslistofbillionairesbasedontheannualrankingoftheworld‘swealthiestpeople.Nowyouaresupposedtosimulatethisjob,butconcentrateonlyonthepeopleinacertainrangeofages.Thatis,gi 查看详情

1055最长等差数列

1055 最长等差数列基准时间限制:2 秒空间限制:262144 KB N个不同的正整数,找出由这些数组成的最长的等差数列。例如:13568910121314等差子数列包括(仅包括两项的不列举)13515913369123813591368101214 其中68101214最长... 查看详情

bzoj-1055玩具取名区间dp

1055:[HAOI2008]玩具取名TimeLimit: 10Sec  MemoryLimit: 162MBSubmit: 1560  Solved: 907[Submit][Status][Discuss]Description  某人有一套玩具,并想法给玩具命名。首先他选择WING四个字母中的任意一个字母作为玩具 查看详情

1055.theworld'srichest(25)(代码片段)

Forbesmagazinepublisheseveryyearitslistofbillionairesbasedontheannualrankingoftheworld‘swealthiestpeople.Nowyouaresupposedtosimulatethisjob,butconcentrateonlyonthepeopleinacertainrangeofages.Thatis,gi 查看详情

1055心得

对于1055,我简直就崩溃了,我刚看到这道题时就蒙了,我无法准确理解题意,我把题读了两三遍时才弄懂题意,但却无从下手。当我开始编译时,我本来要用一个程序进行,但老师给出了提示,这道题适合用函数,函数的特点... 查看详情