windows server 2008 安装MySQL 8.0 遇到报错 1055 - Expression #1 of ORDER BY clause is not in GROUP BY(示例代

Posted 编程人生改变命运

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了windows server 2008 安装MySQL 8.0 遇到报错 1055 - Expression #1 of ORDER BY clause is not in GROUP BY(示例代相关的知识,希望对你有一定的参考价值。

mysql安装参考教程:https://blog.csdn.net/qq_37350706/article/details/81707862

安装完毕后

执行sql语句 SELECT * FROM court_info GROUP BY second_court_name HAVING COUNT(second_court_name) > 1 

报错

[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

网上有好多教程,都试了一遍,结果发现大部分没有用。

依次执行这三个 sql语句,执行完毕切记   不要重启MySQL服务。不要重启MySQL服务。不要重启MySQL服务。

set session sql_mode=‘STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION‘;

set global sql_mode=‘STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION‘;

SELECT version(),@@SESSION.sql_mode,@@GLOBAL.sql_mode;
 

以上是关于windows server 2008 安装MySQL 8.0 遇到报错 1055 - Expression #1 of ORDER BY clause is not in GROUP BY(示例代的主要内容,如果未能解决你的问题,请参考以下文章

Windows Server 2008安装SQL Server 2008

虚拟机windows server2008r2怎么激活

SQL Server2012在 windows server2008上安装需要啥样的.net环境?

如何硬盘安装windows server 2008 r2

win server 2008安装过程

windows server2012 r2能安装sqlserver2008 R2吗