Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

this is incompatible with sql_mode=only_full_group_by

Tags:

sql

php

mysql

My SQL query is not working showing this error:

this is incompatible with sql_mode=only_full_group_by

I am running this query in other mysql pannel there have working fine. In new server is not working....

If i run this then error is not working and also group by is not working

mysql > SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));

New server version

Client API library version : mysqlnd 5.0.12-dev - 20150407 - $Id: b5c5906d452ec590732a93b051f3827e02749b83 $ PHP Version 7.0.15-0ubuntu0.16.04.4

like image 425
Rajkaran Sahu Avatar asked Oct 20 '25 01:10

Rajkaran Sahu


1 Answers

You can try SET sql_mode = ''; before your query;

My guess is that your mysql version is 5.7 where it's not working, which has changed the setting.

like image 182
Simos Fasouliotis Avatar answered Oct 21 '25 16:10

Simos Fasouliotis