MYSQL: how to fix error #1364 – Field ‘name’ doesn’t have a default value

Field name doesnt have a default value

Step 1: check sql_mode

select @@GLOBAL.sql_mode

mysql sql mode

You see STRICT_TRANS_TABLES in that value.

Step 2: use as root account then use this command:

set GLOBAL sql_mode = REPLACE( @@GLOBAL.sql_mode , 'STRICT_TRANS_TABLES,','')


Recent search terms:

  • email@ mysel com

Leave a Reply