Today, the Chinese blog Alliance has bo friends feedback, zgboke.com can not submit blog, I was just ready to go to the Holiday Plaza Party, on the rush to submit a trial, found that the blog submitted when the following error is reported:
 
 
Tip Web_pic cannot be a null value. I am very puzzled, can be successfully submitted before, why suddenly die? Looked at the case on the Internet, said it is necessary to modify the configuration of MySQL, but the current blog Federation is hung in Beijing East Cloud engine, the database can not modify the configuration, logically said before the normal submission, the back should also be able to ah!
 
As the time for the party was coming, it was put aside first. Back home, compared to the next online case, the original is web_pic this key value is not empty caused, that is, when the table was created, using the NOT NULL property. So into the mywebsql, log into the Beijing East Cloud Engine database, carried out the following operations:
 
 
 
After submitting, the discovery can be successfully submitted! The desire to appear this wrong, should be I recently imported export database too frequently, create tables statement error caused.
 
Below, sorting out the same problem on the Internet other solutions to facilitate the problem of students to refer to:
 
1, open My.ini, find
 
Sql-mode= "Strict_trans_tables,no_auto_create_user,no_engine_substitution"
 
Amended to
 
Sql-mode= "No_auto_create_user,no_engine_substitution"
 
and restart MySQL.
 
2, MySQL 5 uses a strict mode which needs to be disabled.
 
In Windows, Goto start-->programs-->mysql->mysql Instance Config Wizard. Follow through the reconfigure Instance option-->detailed configuration-->continue Next a few. At the bottom under Enable TCP/IP option there is ' Enable Strict Mode '. Deslect This option (no tick). Save changes and MySQL'll restart.
 
3, look at your database definition is not the primary key generated by the way set to int, but not set to the self-increase!! Or you can set a default value when the data is defined.