[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column
'information_schema.PROFILING.SEQ' which is not functionally dependent on columns in GROUP BY clause;
this is incompatible with sql_mode=only_full_group_by
----------------------------------
执行: select @@sql_mode;
查看sqlMode: ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
把 ONLY_FULL_GROUP_BY 去掉即可。
修改配置文件: D:\Program Files\mysql-8.0.12-winx64\my.ini
如果没有该文件则新建, 在[mysqld] 下添加 sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION ,即去掉 ONLY_FULL_GROUP_BY ,然后重启mysql
1 [mysqld]2 # 设置3306端口3 port=33064 # 设置mysql的安装目录5 basedir=D:\Program Files\mysql-8.0.12-winx646 # 设置mysql数据库的数据的存放目录7 datadir=D:\Program Files\mysql-8.0.12-winx64\data8 # 允许最大连接数9 max_connections=20010 # 允许连接失败的次数。这是为了防止有人从该主机试图攻击数据库系统11 max_connect_errors=1012 # 服务端使用的字符集默认为UTF813 character-set-server=utf814 # 创建新表时将使用的默认存储引擎15 default-storage-engine=INNODB16 # 默认使用“mysql_native_password”插件认证17 default_authentication_plugin=mysql_native_password18 sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION19 [mysql]20 # 设置mysql客户端默认字符集21 default-character-set=utf822 [client]23 # 设置mysql客户端连接服务端时默认使用的端口24 port=330625 default-character-set=utf8