Reputation: 5107
I have just created a new MySQL in an AWS Ubuntu instance.
Then I have copied a table from another MySQL server to the new created database.
This is the structure from some fields from one of the tables:
My issue is that every time I try to enter a new record on the table, there is an error at field fecha_recepcion_disp:
I have checked if the original table from where I have copied the table has the same issue, but no, I am able to enter a new record without issues.
What should I check in the new database or table in order to avoid the issue?
EDIT:
The only difference between both servers is that the first one is located in the USA and the second one is located in France.
Upvotes: 1
Views: 507
Reputation: 5107
Issue solved:
The new server had value NO_ZERO_DATE in sql mode variable.
Upvotes: 3
Reputation: 10922
You're surely using different versions. MySQL 5.7+ stopped supporting zero values in the datetime field.
You can either use as default the current timestamp, or put null.
Upvotes: 2