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
// 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

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 ...
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...
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 ...
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...
problem: the reason: solve:...
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. ...
Solution: modify the mysql configuration file The local server can modify this Add under [mysqld] Then restart service mysql restart ...
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,...
, 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 ...
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...