ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregate

tags: Mysql  Ubantu


ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'test1.p.type_id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

mysql> show variables like 'sql_mode';

+---------------+-------------------------------------------------------------------------------------------------------------------------------------------+
| Variable_name | Value                                                                                                                                     |
+---------------+-------------------------------------------------------------------------------------------------------------------------------------------+
| sql_mode      | 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 |
+---------------+-------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set

The blogger's server is Ubantu, modify the /etc/mysql/mysql.conf.d file.

Add sql_mode under [mysqld]

[mysqld]

user            = mysql
pid-file        = /var/run/mysqld/mysqld.pid
socket          = /var/run/mysqld/mysqld.sock
port            = 3306
basedir         = /usr
datadir         = /var/lib/mysql
tmpdir          = /tmp
lc-messages-dir = /usr/share/mysql
skip-external-locking
character-set-server=utf8
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

Because the newspaper isSql_mode=only_full_group_by error, remove it from sql_mode.

Save the configuration file.

/etc/init.d/mysql restart

Restart mysql and you're done.

Intelligent Recommendation

MySQL error> 1055 - expression # 1 of success list is not in group by clause and contacts nonaggregate

Database query 1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘dkia_quality_db.b.id’ which is not functionally dependent on columns in GROU...

Error 1055-Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated

mysql version 5.7 Problems: Explanation: First of all, this problem appeared in the mysql5.7 version! And it's unique! Why does it appear? is because only_full_group is configured in sql_mode in the d...

Error 1055 - Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated

I am a SQL practitioner in practice and measurement, and the problem is sql_mode problem Three steps to solve the problem: 1. Find my computer and find the configuration file my_ini file; 2. Copy the ...

1055-Expression #1 of SELECT list is not in GROUP BY clause and contains

During the development process today, because the previous project has been developed and the database migration has been completed, during the operation today, an error occurred when summing up by gr...

mysql5.7 error 1055: Expression # 1 of SELECT list is not in GROUP BY clause and contains non

Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'userinfo. Reproduced label: mysql / group-by / sql-mode 1469 Installed mysql5.7, as an exception thr...

More Recommendation

Error Code: 1055. Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated

Perform the following SQL error: Report error message: Error Code: 1055. Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘tp_music.singer.name’ whi...

1055 -Expression #1 of Select list is not in group by Clause and Contains Nonaggregated Column to report an error

Report in mysql grammar groupby Times wrong My MySQL version is: mysql-8.0.27 solution: Execute first The result is: Execute the following statement again Then,Restart navicat !!!Only will it take eff...

ERROR 1055 (42000): Expression #1 of SELECT list is not in

Error: The literal meaning is that sql_model=only_full_group_by is restricted, and the SQL that can be queried normally in the previous MYSQL version cannot be used in 5.7. Reference documents: http:/...

ERROR 1055 (42000): Expressionof SELECT list is not in GROUP BY clause sql_mode=only_full_group_by

ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘mome.a.type’ which is not functionally dependent on columns in GROUP BY clause...

> 1055 - Expression #2 of SELECT list is not in GROUP BY clause and contains

Use query: result: Modify under centos: /etc/my.cnf file Remove ONLY_FULL_GROUP_BY, reset the value Add at the end Restart MySQL service  ...

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

Top