Home >Database >Mysql Tutorial >How to Disable the ONLY_FULL_GROUP_BY Mode in MySQL?
Disabling ONLY_FULL_GROUP_BY Mode
Enabling ONLY_FULL_GROUP_BY mode can unintentionally restrict SQL queries. This article provides two solutions to disable it.
Solution 1: Using MySQL Console
Run the following command to remove ONLY_FULL_GROUP_BY from the SQL mode:
SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
To make the setting persistent across restarts, use:
SET PERSIST sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
Solution 2: Using phpMyAdmin
The above is the detailed content of How to Disable the ONLY_FULL_GROUP_BY Mode in MySQL?. For more information, please follow other related articles on the PHP Chinese website!