I need to restore backup from one MariaDB server (version 10.1.23) to another MariaDB server (version 10.1.37). But this version has a much stricter mode by default and does not allow NULL values in timestamp fields and throws the below error when I restore the backup.
1067 - Invalid default value for 'dt'
I try to add this values to *.cnf file in /etc/mysql/conf.d/
[mysqld]
sql_mode=ALLOW_INVALID_DATES,IGNORE_SPACE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
explicit_defaults_for_timestamp=OFF
Queries:
show variables like 'sql_mode';
show variables like 'explicit_defaults_for_timestamp';
show changed values of variables but it does not work. Why?
dtcolumn allowed to be null in the DDL?CREATE TABLEthat hasdt. Also, what version of MariaDB/MySQL was the dump taken on? And loaded onto?CREATE TABLEcheck_login` (idint(11) NOT NULL AUTO_INCREMENT,uidint(11) DEFAULT NULL,dttimestamp DEFAULT NULL,bookmakervarchar(255) DEFAULT NULL, PRIMARY KEY (id), UNIQUE KEYuid_bk(uid,bookmaker) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8;`