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
- Go to phpMyAdmin.
 - Click on the SQL tab and run: 
SELECT @@sql_mode; - Make sure 
ONLY_FULL_GROUP_BYis 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