D
D
DenPolosin2017-01-28 13:06:20
MySQL
DenPolosin, 2017-01-28 13:06:20

Incorrect datetime value: '0000-00-00 00:00:00'. How to fix?

I am deploying a backup of the 1C-Bitrix site and when I start restoring the database, I get an error.

MySQL query error!
Incorrect datetime value: '0000-00-00 00:00:00' for column 'TIMESTAMP_X' at row 1

What could be the problem? Can it be fixed?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
DenPolosin, 2017-01-28
@DenPolosin

Found the reason. Solution: run query:
SET GLOBAL sql_mode='';

V
Vitalionus, 2020-03-04
@Vitalionus

SET SQL_MODE='ALLOW_INVALID_DATES'

D
desmos, 2019-02-07
@desmos

mysqldump -u root -p --default-character-set=utf8 --result-file=backup.sql newdatabase

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question