参考:https://www.cnblogs.com/liangbenstudy/p/10246895.html
MySQL 5.7.22查询时候报错
argument out of range 报错代码1055
原因sql_mode模式导致
参考sql_mode默认配置
how variables like ‘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
把参数ONLY_FULL_GROUP_BY去掉,修改MySQL配置文件my.cnf
[mysqld] #去掉sql_mode的ONLY_FULL_GROUP_BY设置防止查询出现1055错误 sql_mode=‘STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION‘
重启MySQL
原文地址:https://www.cnblogs.com/minseo/p/11251965.html
时间: 2024-10-07 01:12:14