How to enable mysql strict mode in virtualmin

How do I enable mysql strict mode in virtualmin on centos 7 ?

Status: 
Active

Comments

Howdy -- hmm, I'm not too familiar with that setting, but doing some research, I see information on it here:

https://dev.mysql.com/doc/refman/5.5/en/sql-mode.html#sql-mode-strict

How to enable it depends on your needs and the needs of your application, but based on the above documentation it sounds like it's a matter of setting the sql_mode parameter to either " STRICT_ALL_TABLES" or "STRICT_TRANS_TABLES".

That can be done by editing the my.cnf file in /etc/, and adding a line something like this:

sql_mode = STRICT_ALL_TABLES

And then restart MySQL.