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 in xammp


Disable ONLY_FULL_GROUP_BY in XAMPP (macOS)

🔧 1. Find your MySQL config file in XAMPP

Open this file:

/Applications/XAMPP/xamppfiles/etc/my.cnf

Edit with a text editor:

sudo nano /Applications/XAMPP/xamppfiles/etc/my.cnf

🔍 2. Add or modify the following under [mysqld]:

Add this line (or edit it if it exists):

sql_mode=NO_ENGINE_SUBSTITUTION

πŸ” This removes ONLY_FULL_GROUP_BY and uses a more permissive SQL mode.

βœ… Full example:

[mysqld]
sql_mode=NO_ENGINE_SUBSTITUTION

If sql_mode is already set and includes ONLY_FULL_GROUP_BY, just remove it.


🔄 3. Restart MySQL

Use the XAMPP control panel to stop and start MySQL, or use the terminal:

sudo /Applications/XAMPP/xamppfiles/bin/mysql.server restart

✅ 4. Verify it’s Off in phpMyAdmin

  1. Go to phpMyAdmin.
  2. Click on the SQL tab and run: SELECT @@sql_mode;
  3. Make sure ONLY_FULL_GROUP_BY is not in the result.

⚠️ Optional (Session-based temporary method)

If you don’t want to change config files, run this SQL per session:

SET GLOBAL sql_mode = 'NO_ENGINE_SUBSTITUTION';

Note: This change resets when MySQL restarts.


Would you like a script to toggle this setting automatically?


Leave a Reply

Your email address will not be published. Required fields are marked *