I'm running mysql 5.7.32 on CentOS 7 and I try to configure sql_mode in /etc/my.cnf as follow :
sql_mode=""
But it has no effect after restarting mysqld :
mysql> SELECT @@GLOBAL.sql_mode global, @@SESSION.sql_mode session;
+-------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
| global | session |
+-------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
| 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 | 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 |
+-------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
No effect either if I only set one value :
sql_mode="NO_AUTO_CREATE_USER"
I tried everything, sql-mode, simple quotes, double quotes, no quotes at all, no sql_mode. There is no other conf file like /usr/my.cnf on the system...
Thank you for your help if you know what to do
question from:
https://stackoverflow.com/questions/65923688/sql-mode-has-no-effect-in-my-cnf-centos-7-mysql-5-7-32 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…