how to change mysql sql mode after installation

前端 未结 2 1336
隐瞒了意图╮
隐瞒了意图╮ 2021-01-28 23:52

i have mysql installed and table created. i want to remove strict_trans_tables from sql mode, how to do that? I tried the fonllowing: 1) go to phpmyadmin variable a

相关标签:
2条回答
  • 2021-01-29 00:36

    In your mysql console change your sql_mode (eg for global change)

     SET GLOBAL sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
    

    but before change read carefully https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html

    0 讨论(0)
  • 2021-01-29 00:48

    3) located file /etc/mysql/my.cnf and tried to change setting there, but didn't find any sql mode info

    If you do not have any sql mode set in the file, just add new line:

    sql_mode="NO_BACKSLASH_ESCAPES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
    

    Cheers

    0 讨论(0)
提交回复
热议问题