Skip to Content

ERROR db user: Incorrect datetime value: ’0000-00-00 00:00:00’ for column ’expiry’ at row 1

Handling incorrect datetime value during ezeelogin upgrade


Overview: This article covers fixing the "Incorrect datetime value" error during upgrade. Run UPDATE db_prefix_users SET expiry=NULL WHERE expiry='0000-00-00 00:00:00'; before upgrading, replacing db_prefix. Alternatively, disable MySQL strict mode.


If you got this error while upgrade "ERROR db user: Incorrect datetime value: '0000-00-00 00:00:00' for column 'expiry' at row 1 ". Follow the below step

Step 1. Execute the following query on mysql server before upgrade. You can find the Database logins from /usr/local/etc/ezlogin/ez.conf file.

root@Remote:~# cat /usr/local/etc/ezlogin/ez.conf
                  OR

root@Remote:~# /usr/local/ezlogin/eztool.php -show_db_credentials

update db_prefix_users set `expiry`=NULL where `expiry`='0000-00-00 00:00:00'; 

 Replace the db_prefix with value of db_prefix from  /usr/local/etc/ezlogin/ez.conf file.

Step 2. You can also upgrade ezeelogin after disabling MySQL strict mode.


Related Artilces

How to retreive db credentials?

How to set MySQL root password

Install Master/Slave Ezeelogin with MySQL SSL