MySQL default values must be overriden
We have observed a serious issue that can occur when using the default MySQL configuration (Linux and Windows).
Note: There are also some additional MySQL issues that may require fixes. See Introduction To The Database for more.
Before creating the schema you must override the MySQL defaults.
In MySQL Workbench run the query below to check if the problem exists in your system:
show variables like 'sql_mode';
Then check the output. If the sql-mode variable contains either or both of the two entries NO_ZERO_IN_DATE,NO_ZERO_DATE then perform the steps below. (If neither of these two entries is present in the variable then carry on with creating the schema.)
Example of problem code:
On Linux: To fix the problem open the my.cnf file in /etc/mysql for editing and cut the two entries:
Also ensure that the command [mysqld] which runs the MySQL server daemon is present. The picture below is an example of what the line might look like after editing.
On Windows: To fix the problem open the
my-default.ini file in C:\Program Files\MySQL\MySQL Server (version#) then cut the entries NO_ZERO_IN_DATE,NO_ZERO_DATE and save the file.