skip to Main Content

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?

2

Answers


  1. Chosen as BEST ANSWER

    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


  2. This worked for me:

    root@MaRs:/etc/mysql# cat my.cnf|grep -v #
    
    [client-server]
    
    !includedir /etc/mysql/conf.d/
    !includedir /etc/mysql/mariadb.conf.d/
    
    [mysqld]
    sql_mode=NO_ENGINE_SUBSTITUTION
    root@MaRs:/etc/mysql# 
    
    MariaDB [(none)]> SELECT @@SQL_MODE, @@GLOBAL.SQL_MODE; 
    +------------------------+------------------------+
    | @@SQL_MODE             | @@GLOBAL.SQL_MODE      |
    +------------------------+------------------------+
    | NO_ENGINE_SUBSTITUTION | NO_ENGINE_SUBSTITUTION |
    +------------------------+------------------------+
    1 row in set (0.000 sec)
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search