1

In Laragon I want to permanaently disable ONLY_FULL_GROUP_BY for MySQL 8. I can do this in PHPMyAdmin, but each time I start Laragon.

UPDATE

my.ini only has:

[client]
#password=your_password
port=3306
socket=/tmp/mysql.sock

[mysqld]
port=3306
socket=/tmp/mysql.sock
key_buffer_size=256M
max_allowed_packet=512M
table_open_cache=256
sort_buffer_size=1M
read_buffer_size=1M
read_rnd_buffer_size=4M
myisam_sort_buffer_size=64M
thread_cache_size=8

secure-file-priv=""
explicit_defaults_for_timestamp=1
datadir= "E:/Projects/PHP_Migration_Laragon/laragon/data/mysql-8"
default_authentication_plugin=mysql_native_password


[mysqldump]
quick
max_allowed_packet=512M
IlludiumPu36
  • 4,196
  • 10
  • 61
  • 100

1 Answers1

1

I solved this by creating a my.cnf file (which didn't exist) in the laragon/bin/mysql directory, and entering the following (which omits ONLY_FULL_GROUP_BY ):

sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION

Restarting Laragon Apache and MySQL and done.

IlludiumPu36
  • 4,196
  • 10
  • 61
  • 100
  • 1
    You dont need a new file, you only needed to add that line to your existing `my.ini` in the `[mysqld]` section. Sorry, got called away – RiggsFolly Jul 12 '22 at 09:21
  • But be aware, if you move your site to a hosted server you may not get access to the config file of MySQL. SO you may need to try another option from the DUP – RiggsFolly Jul 12 '22 at 09:22