How to fix MySql database restore error using WordPress UpdraftPlus: Error Code:
-
When running my WordPress UpdraftPlus database restore script I get the error Error Code: 1067. Invalid default value for ‘user_registered’
I tried prefixing the script with
SET GLOBAL sql_mode = 'NO_ENGINE_SUBSTITUTION'; drop database wordpress; create database wordpress; use wordpress;
as suggested here: https://wordpress.org/support/topic/invalid-default-value-database-install-fail/ but it doesn’t make a difference.
The part of the script giving the error is
CREATE TABLEwp_users(IDbigint(20) unsigned NOT NULL AUTO_INCREMENT,user_loginvarchar(60) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',user_passvarchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',user_nicenamevarchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',user_emailvarchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',user_urlvarchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',user_registereddatetime NOT NULL DEFAULT '0000-00-00 00:00:00',user_activation_keyvarchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',user_statusint(11) NOT NULL DEFAULT '0',display_namevarchar(250) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', PRIMARY KEY (ID), KEYuser_login_key(user_login), KEYuser_nicename(user_nicename), KEYuser_email(user_email) ) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
- The topic ‘How to fix MySql database restore error using WordPress UpdraftPlus: Error Code:’ is closed to new replies.