MySQL5.7 Error This Is Incompatible with SQL_MODE = Only_Full_Group_by problem solving

tags: Mysql  centos7  centos  

CentOS7 environment mysql5.7 execution GROUP statement

select tb1.name,sum(1) as num
from table_1 tb1 
GROUP BY tb1.name 

Error: SELECT list is not in GROUP BY clause and contains nonaggregated column '***' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode = only_full_group_by

Solution

// Edit my.cnf file
vim /etc/my.cnf

// Add a line below [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

Intelligent Recommendation

Perfectly solve mysql5.7 or later version this is incompatible with sql_mode=only_full_group_by error

ONLY_FULL_GROUP_BY is a sql_mode provided by MySQL. This sql_mode is used to provide the validity check of the SQL statement GROUP BY. When MySQL sql_mode is non-ONLY_FULL_GROUP_BY semantic. A select ...

Mysql5.7 error when building a table is not in GROUP BY..this is incompatible with sql_mode=only_full_group_by

Today, I popped up a prompt when I created the table with my own mysql: At that time, I gave me a whole face. I thought that my SQL was wrong. I repeatedly checked the SQL I wrote and found that there...

The problem of sql_mode=only_full_group_by in mysql5.7

Most people who have come from mysql 5.7 and below are not used to this group by only_full_group_by of 5.7, that is, the displayed columns need group by. Today, an error was reported when running the ...

Solution MySQL 5.8.x version sql_mode = only_full_group_by problem, this is incompatible with sql_mode = only_full_group_by error error error error error

Project scene: Run this SQL script error with DBeaver today script: Problem description: sql_mode = only_full_group_by Reason analysis: MySQL8.x version defaults to open onLY_FULL_GROUP_BY The officia...

More Recommendation

mysql error this is incompatible with sql_mode = only_full_group_by

mysql5.7 + version is turned on by defaultonly_full_group_byMode,When you turn on this mode, the column must query conditions are grouped. The original group by statement will be reported this error. ...

mysql error: this is incompatible with sql_mode=only_full_group_by

Solution: modify the mysql configuration file The local server can modify this Add under [mysqld] Then restart service mysql restart  ...

MySQL error: this is incompatible with sql_mode = only_full_group_by

Error scenario Today, I have a project that I just came down on my computer. When I log in to enter the home page, I reported a string of this is incompatible with sql_mode = only_full_group_by error,...

Mysql5.7.9 error this is incompatible with sql_mode = only_full_group_by

, I have been using a 5.6 version of MySQL. Recently, it is quite normal before 5.7.9. It is running very normal project error: Which is not functionally dependent on columns in group by clause; this ...

this is incompatible with sql_mode = only_full_group_by error resolution

I found it when I was running code on the host. this is incompatible with sql_mode=only_full_group_by Such a mistake, after an investigation, the final discovery is that the database on the host is ne...

Copyright  DMCA © 2018-2026 - All Rights Reserved - www.programmersought.com  User Notice

Top