①在navicate for mysql 里面 写SQL语句查看sql_mdel的支持的模式, select @@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
②在navicate for mysql 里面写SQL语句修改
SET sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
发现重启MySQL后没有效果
解决方案:
mac版本,找不到没有my-default.cnf
第一步 在系统偏好设置里面,先关掉mysql服务
sudo cp /usr/local/mysql-5.7.19-macos10.12-x86_64/support-files/my-default.cnf /etc/my.cnf
第二步
sudo vim /etc/my.cnf
第三步 把下面的东东复制到终端弹框中,重新启动MySQL服务
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html
# *** DO NOT EDIT THIS FILE. It's a template which will be copied to the
# *** default location duri