惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
Recent Announcements
Recent Announcements
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Microsoft Azure Blog
Microsoft Azure Blog
S
Security @ Cisco Blogs
P
Proofpoint News Feed
博客园 - 三生石上(FineUI控件)
T
Tailwind CSS Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
The Last Watchdog
The Last Watchdog
AI
AI
Webroot Blog
Webroot Blog
aimingoo的专栏
aimingoo的专栏
Hacker News: Ask HN
Hacker News: Ask HN
B
Blog RSS Feed
小众软件
小众软件
T
The Blog of Author Tim Ferriss
博客园 - 叶小钗
W
WeLiveSecurity
C
CXSECURITY Database RSS Feed - CXSecurity.com
H
Hackread – Cybersecurity News, Data Breaches, AI and More
T
Troy Hunt's Blog
云风的 BLOG
云风的 BLOG
P
Privacy International News Feed
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Vercel News
Vercel News
Y
Y Combinator Blog
P
Proofpoint News Feed
V2EX - 技术
V2EX - 技术
AWS News Blog
AWS News Blog
F
Fortinet All Blogs
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
The GitHub Blog
The GitHub Blog
A
Arctic Wolf
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Hugging Face - Blog
Hugging Face - Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
V
V2EX
MongoDB | Blog
MongoDB | Blog
SecWiki News
SecWiki News
The Register - Security
The Register - Security
博客园_首页
T
Threat Research - Cisco Blogs
Hacker News - Newest:
Hacker News - Newest: "LLM"
Recorded Future
Recorded Future
V
Vulnerabilities – Threatpost
I
InfoQ
雷峰网
雷峰网
C
Check Point Blog

博客园 - 坚强地活着

libxml问题 read函数读取时报错:Resource temporarily unavailable 管脚复用为gpio后不能控制的问题解决 ps制作gif 静态局部变量 问题:232串口发送数据不稳定,有时能发出数据,有时发不出数据 问题:qt按钮有时候点击没有反应 vs2017+qt问题 dtu通讯的一个问题 又是运行不到main的问题 stlink问题 AD7124踩过的坑 stm32上调试AD5410 linux读xml文件问题 stm8问题记录 430 仿真器 问题 虚拟机VMware显示“内部错误”的解决方法 VS2008 如何设置字体大小? ps 处理gif
mysql问题
坚强地活着 · 2021-05-06 · via 博客园 - 坚强地活着

在执行一个.sql文件时,报错:

this is incompatible with sql_mode=only_full_group_by

错误原因:

1、原理层面

这个错误一般发生在mysql 5.7以及 5.7以上的版本中,其原因是mysql的默认配置中,sql_mode="ONLY_FULL_GROUP_BY" 这个配置严格执行了 'SQL92标准',所以很高网站维护人员在升级mysql版本时,都会修改 sql_mode 的配置,使其能兼容。

2、sql层面

从sql层面来说,输出的结果思做target list,就是 select 后面跟着的字段,还有一个地方是 group by column,就是 group 后面跟着的字段,由于开启了 ONLY_FULL_GROUP_BY 的设置,如果没有字段在 target list 以及 group by 字段中同时出现,那么 sql 就认为此条语句是不合法的,就会抛出错误。

修改my.ini加入以下部分解决:

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