Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/63.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 如何在osx 10.11上重置sql_模式_Php_Mysql_Macos_Apache_Sql Mode - Fatal编程技术网

Php 如何在osx 10.11上重置sql_模式

Php 如何在osx 10.11上重置sql_模式,php,mysql,macos,apache,sql-mode,Php,Mysql,Macos,Apache,Sql Mode,我对这种sql\u模式有问题 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

我对这种sql\u模式有问题

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
我尝试了这个教程,但没有结果。

我有一个干净的osX 10.11A安装,我是手动安装apache, 像本教程中的php和mysql。。。

我的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';
我试着在每个路径中设置我的.cnf文件,就像你在下面看到的那样,重启后仍然是相同的问题

$ mysql --help | grep /my
/etc/my.cnf /etc/mysql/my.cnf /usr/local/mysql/etc/my.cnf ~/.my.cnf
请帮忙。 谢谢