解决navicate终端操作mysql ONLY_FULL_GROUP_BY错误
 
  问题描述:
[Err] 1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'xxx.xxx.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
    产生原因:
    解决方法:
        1 会话级别 修改环境变量
        2 全局级别 修改环境变量
        3 修改Mysql配置文件 需要重启Mysql服务生效
mysql>SELECT @@GLOBAL.sql_mode;
+----------------------------------------------------------------------------+
| @@GLOBAL.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 (0.00 sec)
mysql>set global sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'

https://www.xue163.com/588880/39193/391931881.html

相关文章:

  • 2021-12-03
  • 2021-12-07
  • 2021-09-24
  • 2022-12-23
  • 2021-08-09
  • 2021-09-29
猜你喜欢
  • 2022-12-23
  • 2021-06-25
  • 2022-12-23
  • 2022-01-06
  • 2022-12-23
相关资源
相似解决方案