Mysql strict Mode centos 7

By default (Cpanel centos 7) enable Mysql strict mode

You can check from SSH by this command :

 

mysql -e 'select @@GLOBAL.sql_mode;'

 

The result :

+--------------------------------------------+
| @@GLOBAL.sql_mode |
+--------------------------------------------+
| STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION |
+--------------------------------------------+

 

If you familiar with Cpanel Mysql configuration location is /etc/my.cnf

BUT in centos 7, the configuration for strict mode is from this location = /usr/my.cnf

NOW you have to edit /usr/my.cnf to

sql_mode=""

After that :

systemctl restart mysql.service

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.