Syntax error or access violation: 1055 Expression #8 of SELECT list is not in GROUP BY clause and contains nonaggregated column

前端 未结 5 842
时光说笑
时光说笑 2021-02-13 15:28

i tried the CakePHP 3.x \"Bookmaker Tutorial\" and i followed the instruction step by step. Unfortunately, at the end of the first chapter i get the attached error:



        
5条回答
  •  面向向阳花
    2021-02-13 16:10

    This may be the issue related to newer version of MySQL as you said you are using MySQL 5.7.11 So to solve this issue for all your sites see this

    https://craftcms.stackexchange.com/questions/12084/getting-this-sql-error-group-by-incompatible-with-sql-mode-only-full-group-by/13662#13662

    the answer by community to add the line below

    sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION 
    

    in /etc/mysql/my.cnf file & saving it; and after restarting the server

    sudo service mysql restart
    

    Would do the work

提交回复
热议问题