错误信息:
ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘database_tl.emp.id’ which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
原因分析:我也不晓得啥原因,但是我找到解决办法了。
解决办法:
Windows:修改配置文件my.ini
Linux:修改配置文件/etc/my.cnf
不管是啥平台,都在配置文件[mysqld]节点下添加:
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
然后重启mysqld服务即可。