Mysql5.7 version ERROR 1055 issue

Sql Sql optimization process encountered execution error:

ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘advanced.dept.deptno’ which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

Cause of the problem:

Version 5.7 or higher to achieve the functional dependence of detection, MySql only_full_group_by SQL mode is enabled by default,

For GROUP BY aggregate operations, if a column in the SELECT, does not appear in a GROUP BY, then the SQL is not legitimate, unless the field is present in an aggregate function inside.

However, there is no need personal use aggregate functions, so did cancel testing.

 

There are many online ways to deal with, but the operation is complicated, and quickly resolve issues listed below:

Today the first cloud server, the cloud database more and more, when you use the cloud server, but too much to mysql configuration parameters, and then reported a permissions problem, we have to find the password, manually restart mysql. The figure below a trick Watch crucial

 

Guess you like

Origin www.cnblogs.com/pcxx/p/11085616.html