我对此sql_mode
有疑问SQLSTATE[42000]: Syntax error or access violation:
1055 Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated
column 'my_database_name.my_table.id' which is not functionally dependent on columns
in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
我尝试了本教程,但没有结果。 How to get rid of STRICT SQL mode in MySQL
我有一个干净的osX 10.11安装程序,我手动安装了apache, 像本教程中的php和mysql ... https://coolestguidesontheplanet.com/get-apache-mysql-php-and-phpmyadmin-working-on-osx-10-11-el-capitan/
我的版本apache:
$ httpd -v
Server version: Apache/2.4.18 (Unix)
Server built: Feb 20 2016 20:03:19
Mysql版本:
Server version: 5.7.11 MySQL Community Server (GPL)
如果我首先将此sql代码插入我的phpmyadmin,那么一切都能完美地运行到下一次重启os或mysql
SET GLOBAL sql_mode = 'NO_ENGINE_SUBSTITUTION';
我尝试在每条路径中设置my.cnf文件,就像你可以看到的那样,重启后仍然是同样的问题。
$ mysql --help | grep /my
/etc/my.cnf /etc/mysql/my.cnf /usr/local/mysql/etc/my.cnf ~/.my.cnf
请帮忙。 感谢