Disable strict mode on MariaDB

Dr.Mezo picture Dr.Mezo · Aug 6, 2019 · Viewed 7.7k times · Source

When i run this sql in phpmyadmin

SELECT @@SQL_MODE, @@GLOBAL.SQL_MODE; 

it shows

@@SQL_MODE STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION 

@@GLOBAL.SQL_MODE STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION 

How to Disable strict mode on MariaDB using phpmydmin?

Answer

Dr.Mezo picture Dr.Mezo · Sep 7, 2019

Edit via SSH

/etc/my.cnf file

Add

sql_mode=NO_ENGINE_SUBSTITUTION

restart MariaDB

and it will fix the issue

*edit - if You have error while restarting msyql service try to add "[mysqld]" above in my.cnf