当前位置:网站首页>MySQL encounters the problem of expression 1 of select list is not in group by claim and contains nonaggre
MySQL encounters the problem of expression 1 of select list is not in group by claim and contains nonaggre
2022-06-30 07:10:00 【All eyes are on it】
1. Here is my error report

Error reason :
MySQL 5.7.5 And the above functions depend on the detection function . If enabled ONLY_FULL_GROUP_BY
SQL Pattern ( By default ),MySQL Selection list will be rejected ,HAVING Condition or ORDER BY The query reference of the list is in GROUP BY Unnamed non set column in clause , It doesn't depend on them in function .(5.7.5 Before ,MySQL No functional dependency detected , Not enabled by default ONLY_FULL_GROUP_BY. of 5.7.5 A description of the previous behavior , Please see the “MySQL5.6 Reference manual ”.)Solution 1 :
1: Inquire about mysql relevant mode
1:select @@global.sql_mode;You can see that the pattern contains ONLY_FULL_GROUP_BY, As long as there is no such configuration .
my Mysql The version is 5.7.23, The default is to bring ONLY_FULL_GROUP_BY Pattern .
ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
2: Reset mode value
set @@global.sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
3: Restart mysql service
Solution 2
1: Open in Notepad my.cnf file ;

2: stay [mysqld] Add the following sentence to solve the problem by restarting the service after configuration ;
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO, NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
3: restart mysql service
边栏推荐
- [Hot100]10. Regular Expression Matching
- Mysql5.7 compressed version installation tutorial
- QT wmic command obtains some hardware information
- 【已解决】Failed! Error: Unknown error 1130
- Write about your feelings about love and express your emotions
- Egret engine P2 physics engine (2) - Funny physical phenomenon of small balls hitting the ground
- 社招两年半10个公司28轮面试面经
- Google Earth engine (GEE) - Murray global tidal wetland change V1 (1999-2019) data set
- Qdebug small details
- [semidrive source code analysis] [x9 chip startup process] 34 - RTOS side display module SDM_ display_ Init display initialization source code analysis
猜你喜欢

Linux服务器安装Redis

SOC project AHB_ SD_ Host controller design

app quits unexpectedly

The first up Master of station B paid to watch the video still came! Price "Persuading" netizens

Go常用命令

SQL Server2005中SUM函数内嵌套IF语句

app闪退

Performance comparison of random network, scale-free network, small world network and NS small world matlab simulation

Go common commands

JS widget wave JS implementation of wave progress bar animation style
随机推荐
[resolved] MySQL exception: error 1045 (28000): unknown error 1045, forgetting the initial password
[hot100] palindrome substring and longest palindrome substring
[Hot100]10. Regular Expression Matching
Skillfully use 5 keys to improve office efficiency
[Hot100]10. 正则表达式匹配
Write and run the first go language program
【SemiDrive源码分析】【X9芯片启动流程】34 - RTOS侧 Display模块 sdm_display_init 显示初始化源码分析
Finished product upgrade procedure
[semidrive source code analysis] [x9 chip startup process] 33 - Analysis of related concepts of display module
我开户后把账号忘记了咋办?股票在网上开户安全吗?
ROS service communication programming
Google Earth engine (GEE) - Murray global tidal wetland change V1 (1999-2019) data set
2022年6月29日--使用C#迈出第一步--使用 C# 中的“if”、“else”和“else if”语句向代码添加决策逻辑
Grep command usage
15 minutes learn to use JWT
Win10 step pit - power on 0xc0000225
1285_ Expand macros defined by AUTOSAR functions and variables with scripts to improve readability
Egret engine P2 physics engine (2) - Funny physical phenomenon of small balls hitting the ground
Go common commands
踩坑记录:supervisor 日志返回信息:redis扩展未安装