0

I have the latest mysql version, also i'm using HeidiSQL.

I've edited my.ini

[mysqld]
sql_mode = ''

I've restarted the mysql server and when I query SELECT @@GLOBAL.sql_mode; I get again this:

ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION

Also i've tried to set the sql_mode from the query, but it doesn't work...

SET @@GLOBAL.sql_mode= '';

I restart the server and the value is still unchanged, same as before ONLY_FULL_GROUP_BY, ...etc...

Is there a way I can fix this?

Galbert
  • 177
  • 1
  • 8
  • If you have edited my.ini and do not see the changes than ensure that you have edited the file which is used/loaded. `SET @@GLOBAL.sql_mode= '';` sets current runtime setting and does not effect permanent settings, so this setting is lost during the server restart, use `SET @@PERSIST.sql_mode= '';` instead. Study [System Variable Assignment](https://dev.mysql.com/doc/refman/8.0/en/set-variable.html#set-variable-system-variables) – Akina Jul 05 '23 at 13:18

1 Answers1

0

I fixed this by going to MySQL Workbench > Local Instance > Server > Options File > sql-mode and remove all that is inside (or whatever you want from there) > Apply > Restart MySQL Server.

It seems editing the my.ini didn't work, so using MySQL Workbench it did work.

Galbert
  • 177
  • 1
  • 8