SQL Error: Field 'CountryCodeId' doesn't have a default value

You can post here questions about usage of an already compiled release of gestinux, downloaded on SourceForge.
Give the version of gestinux and of you operating system.

Please use the development forum if you have compiled yourself.
Post Reply
Site Admin
Posts: 169
Joined: 21 Jun 2012, 19:07
Location: Blois (France)

SQL Error: Field 'CountryCodeId' doesn't have a default value

Post by tintinux »


This error is not a Gestinux bug, but a consequence of a change in recent versions of MySql and MariaDb.

It looks like that, with a default configuration, it is no more allowed to INSERT in a Table without listing all the fields, whenever the missing fields have a default value or can be NULL.

This is done in several places in Gestinux, and I'm not sure that this can be changed in next versions. IMHO this is a bug regarding to SQL standards.

It is possible to avoid this error with adding in the configuration file of the server :

Code: Select all

The configuration files for Linux are in : /etc/mysql/mysql.cnf or mariadb.cnf
For Windows they are in : c:\windows\system
You must have admin rights to edit them, and restart the server after the changes.

Any suggestions or informations about this annoying problem are welcome !

Post Reply