ÇáÓí ÈÇäÇá WHM/CPanel ÛáÞ disable ONLY_FULL_GROUP_BY in MySQL
Remove ONLY_FULL_GROUP_BY in WHM/cPanel
Incompatible with sql_mode=only_full_group_by [Fix]
If your domain is on a cPanel (Shared Hosting), then you need to contact your hosting provider to update the same.Shared Hosting If you are on a shared hosting, you will not be able to change the sql_mode at the environment level.
If you have access to WHM, then access PHPMyAdmin under SQL Services from WHM as shown below:
Click on Variables from the menu and search for SQL_MODE
Click on edit button and change remove ONLY_FULL_GROUP_BY. Once edited, click on save.
That’s it!
ãáÍæÙÉ åÇãÉ :
Ýì ÇáÛÇáÈ åÊÌÏ áÏíß
æáä ÊÌÏ ONLY_FULL_GROUP_BY æÈÇáÊÇáì áÇ íæÌÏ ÔìÁ ÊÑíÏ Úãáå áÊÚØíáå Ýåæ ãÚØá Ýì ÇáÇÕá.ßæÏ:STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
------------------------------------------------------------------
ØÑíÞÉ ÇÎÑí
Remove ONLY_FULL_GROUP_BY in my.cnf file
If you have access to MySQL configuration file my.cnf, open the file:
and add the below line to the end of the file:ßæÏ:# vim /etc/mysql/my.cnf
[mysqld]
sql_mode = "STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE, ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ ENGINE_SUBSTITUTION"
Restart the MySQL service:
---------------------------------------------------------------------------------------------------
Question
How do I disable ONLY_FULL_GROUP_BY in MySQL?
Answer
To disable ONLY_FULL_GROUP_BY in MySQL, you will need to remove ONLY_FULL_GROUP_BY from the sql-mode setting by using the MySQL configuration file /etc/my.cnf. This file can only be modified via SSH as the root user or WHM >> Terminal. ONLY_FULL_GROUP_BY can not be disabled for a single account or database.
You may follow these steps to disable ONLY_FULL_GROUP_BY:
1. Log into your server via SSH as the root user or navigate to WHM >> Terminal.
2. Run the following command to determine which sql_mode options are enabled and copy the output:
Example output (Do not copy the output shown below as it may contain options that are incompatible with your version of MySQL):ßæÏ:mysql -sse "SELECT @@GLOBAL.sql_mode;"
3. Open the /etc/my.cnf file using any command-line text editor you prefer (ex: vi, vim, nano, or other).ßæÏ:ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
Examples: (Also see: How to edit a file on command-line)
4. Add sql-mode= to the bottom of the [mysqld] section, followed by the output you copied in step 2, and remove ONLY_FULL_GROUP_BY.ßæÏ:vi /etc/my.cnf vim /etc/my.cnf nano /etc/my.cnf
Example (Do not copy the sql-mode line shown below as it may contain options that are incompatible with your version of MySQL):
5. Save and close the file.ßæÏ:sql-mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
6. Restart MySQL to load the change by running the following script:
7. Run the following command to confirm ONLY_FULL_GROUP_BY was removed from the enabled sql_mode options:ßæÏ:/scripts/restartsrv_mysql
You may also find our article on How to change the SQL mode in MySQL or MariaDB helpful for more information.ßæÏ:mysql -sse "SELECT @@GLOBAL.sql_mode;
ÇáãÑÌÚ:
https://techglimpse.com/ncompatible-...full_group_by/
https://support.cpanel.net/hc/en-us/...s/360050089274







ÑÏ ãÚ ÇÞÊÈÇÓ
ÇáãÝÖáÇÊ