Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

princeoo7's avatar

Group Columns is illegal issue on live server but not on local server

Facing below Issue on Live server but not on local server.

SQLSTATE[42000]: Syntax error or access violation: 1140 Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause  on shared hosting

If I turn off strict mode in config/database.php it works on live server. My question is why this behavior when strict = true on both side.

0 likes
2 replies
shez1983's avatar

do you have diff mysql version on local vs live? that can be the only situation imo?

Please or to participate in this conversation.