MySQL sql_mode Turning strict mode forever Linux for WHMCS
I am not very experienced with this, but I am trying to set the mySQL option strict_mode
to force-enforcing so that I can install and configure the database to install WHMCS.
The problem is that I have seen many different posts and people saying that you should change the my.cnf file and set the following sql_mode setting:
[mysqld]
sql_mode="TRADITIONAL,NO_AUTO_CREATE_USER"
I've also tried just the following:
sql_mode= "TRADITIONAL"
It seems that nothing comes of them. When I restart mySQL and then check the mode using this:
mysql> SELECT @@GLOBAL.sql_mode;
I am getting the following, which apparently means that I am still in strict mode:
+ ---------------------------------------------- --- ----------------------------------------------- --- ----------------------------------------------- --- - + | @@ GLOBAL.sql_mode | + ------------------------------------------------- -------------------------------------------------- -------------------------------------------------- - + | STRICT_TRANS_TABLES, STRICT_ALL_TABLES, NO_ZERO_IN_DATE, NO_ZERO_DATE, ERROR_FOR_DIVISION_BY_ZERO, TRADITIONAL, NO_AUTO_CREATE_USER, NO_ENGINE_SUBSTITUTION | + ------------------------------------------------- -------------------------------------------------- -------------------------------------------------- - +
However, I can set strict mode for the session using this:
mysql> SET GLOBAL sql_mode ="";
The problem is that the installation will fail when the machine reboots and then goes back to strict mode.
Does anyone else have any definitive suggestions on how I can permanently disable strict mode in MySQL on ubuntu to allow me to use WHMCS?
I can't find any other config files that might override this strict mode, but I might be missing something that is.
source to share