Re: How do I permanently disable ONLY_FULL_GROUP_BY
Posted by: Bad Programmer
Date: March 31, 2022 11:47AM

Thanks Peter:
As I posted, I did what you suggest and got it from the same stackoverflow thread you referenced.

"I run: /usr/sbin/mysqld --verbose --help | grep -A 1 "Default options"
I get: Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf ~/.my.cnf
The file /etc/my.cnf does not exist and ~(aka root)/.my.cnf does not exist.
That leaves me with /etc/mysql/my.cnf
I run: sudo nano /etc/mysql/my.cnf to open it."

/etc/mysql/my.cnf:
--------------
socket = /run/mysqld/mysqld.sock
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mariadb.conf.d/
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
------------

/etc/mysql/conf.d/mysqld.cnf:
---------------
[mysqld]
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
datadir = /var/lib/mysql
log-error = /var/log/mysql/error.log
bind-address = 0.0.0.0
-----------------

/etc/mysql/mariadb.conf.d/:
empty - no files

If there's another config file I can't find it.


Still, every time I reboot and run: mysql> SELECT @@sql_mode;
I get:
+-----------------------------------------------------------------------------------------------------------------------+
| @@sql_mode |
+-----------------------------------------------------------------------------------------------------------------------+
| ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION |
+-----------------------------------------------------------------------------------------------------------------------+

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.