When setting


in /etc/mysql/my.cnf server leaves this variable in it default value:

mysql> show variables like 'sql_mode';

| Variable_name | Value                                                                                 |

However, if i set it manually in mysql shell:

set global sql_mode="";

server sets it as desired - to empty value. Till next server restart, when server sets this variable to default value again.

Tried in single and double quotes - no matter. No errors in error log. No other default configuration files of mysql loaded What's wrong?


  • In which section of the /etc/mysql/my.cnf file are you placing the sql_mode variable? Which Linux distro is this? Are you definitely 100% certain no other config files are being loaded? Are there no other .cnf files in /etc/mysql/? – dbdemon Nov 4 '18 at 15:01

Found: another MySQL config is /usr/my.cnf and it contains:


so, setting sql_mode="" did the thing I need.

Debian stretch. Percona server was installed after removing installed MySQL-5.6 community.

Intrecting thing: log doesn't mention this config for reading during server's startup...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.