错误内容
SQL 错误 [1055] [42000]: Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'xx.xx.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
修改
@ubuntu-server:/$ sudo vim /etc/mysql/conf.d/mysql.cnf
@ubuntu-server:/$ sudo systemctl stop mysql
@ubuntu-server:/$ sudo systemctl start mysql
@ubuntu-server:/$
# The MySQL Client configuration file.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
[mysql]
[mysqld]
sql-mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION"
weijianwei@ubuntu-server:/$