Skip to main content

Turn off Mysql Strict Mode

Comments

2 comments

  • SysSachin
    Hello, Please try with the following steps. 1) Edit /etc/my.cnf and add
    [mysqld] sql_mode="TRADITIONAL,NO_AUTO_CREATE_USER"
    2)verified that the mode was previously set
    root@000 [~]# mysql -e 'select @@GLOBAL.sql_mode;' +-------------------+ | @@GLOBAL.sql_mode | +-------------------+ | | +-------------------+
    3) Restart MySQL
    root@000[~]# /scripts/restartsrv mysql Waiting for mysql to restart...............finished.
    4) Check MySQL
    root@000 [~]# mysql -e 'select @@GLOBAL.sql_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 | +-------------------------------------------------------------------------------------------------------------------------------+ root@000 [~]#
    0
  • cPanelMichael
    Hello, You may also want to verify that /usr/my.cnf does not exist on the system, as it will overwrite your /etc/my.cnf file settings. If it does exist, try disabling this file and restarting MySQL:
    mv /usr/my.cnf /usr/my.cnf.backup1 /scripts/restartsrv_mysql
    Thank you.
    0

Please sign in to leave a comment.