Home >Database >Mysql Tutorial >How Do I Disable 'ONLY_FULL_GROUP_BY' Mode in MySQL?
Undoing the Effects of "ONLY_FULL_GROUP_BY" Mode
In a moment of inadvertence, you activated "ONLY_FULL_GROUP_BY" mode using the command "SET sql_mode = 'ONLY_FULL_GROUP_BY';." To restore functionality, you'll need to disable this setting.
Solution 1: Deactivate via MySQL Console
From the MySQL console, run the following command:
mysql > SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
This removes "ONLY_FULL_GROUP_BY" from the global sql_mode setting. However, the change is not persistent across restarts. To make it permanent, use:
mysql > SET PERSIST sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
Solution 2: Deactivate via phpMyAdmin
The above is the detailed content of How Do I Disable 'ONLY_FULL_GROUP_BY' Mode in MySQL?. For more information, please follow other related articles on the PHP Chinese website!