Monday, November 14, 2016

SQLSTATE[HY000]: General error: 1364 Field doesn't have a default value

Solution :

Go on mysql prompt and run following command.


mysql> SET GLOBAL sql_mode=''

Make sure no value has been set for attribute sql_mode in the file my.cnf.

Monday, October 10, 2016

mysql default current_timestamp error

The DEFAULT CURRENT_TIMESTAMP support for a DATETIME (datatype) was added in MySQL 5.6.

It is now possible to achieve this with DATETIME fields since MySQL 5.6.5

Previous versions can't do that with DATETIME.But you can do it with TIMESTAMP.


Upgrade your mysql with this version and you will not get this error again.

Ubuntu : apt-get upgrade : ubuntu The following packages have been kept back

Solution :

To solve this issue, Run command :

sudo apt-get dist-upgrade