Bug #105955 MySQL Year 2038 Y2K38
Submitted: 22 Dec 2021 6:28 Modified: 22 Dec 2021 8:51
Reporter: ABV Actbrain Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version: OS:Any
Assigned to: CPU Architecture:Any

[22 Dec 2021 6:28] ABV Actbrain
Description:
I am using MySQL 8.0.17. For some reason, I need to change the date of my system to after 2038. Unfortunately, the MySQL service won't start after the year 2038:

If i change the system date to any of the dates after year 2038. I get the following  error message.

2038-01-19T17:55:45.076894Z 24 [Warning] Current time has got past year 2038. Validating current time with 5 iterations before initiating the normal server shutdown process.
2038-01-19T17:55:45.076914Z 24 [Warning] Iteration 1: Current time obtained from system is greater than 2038
2038-01-19T17:55:45.076919Z 24 [Warning] Iteration 2: Current time obtained from system is greater than 2038
2038-01-19T17:55:45.076922Z 24 [Warning] Iteration 3: Current time obtained from system is greater than 2038
2038-01-19T17:55:45.076926Z 24 [Warning] Iteration 4: Current time obtained from system is greater than 2038
2038-01-19T17:55:45.076930Z 24 [Warning] Iteration 5: Current time obtained from system is greater than 2038
2038-01-19T17:55:45.076934Z 24 [ERROR] This MySQL server doesn't support dates later then 2038
2038-01-19T17:55:47.004710Z 0 [System] /usr/libexec/mysqld: Shutdown complete (mysqld 8.0.17)  Source distribution.

I am using 64 bit MySQL. 

Please help.

How to repeat:
To repeat please do the following restart method : 
1/ Set up server date with command: 

date -s "2038-12-22 $(date +%H:%M:%S)"

2/ Start service with command

service mysql restart
[22 Dec 2021 8:51] MySQL Verification Team
Thank you for the bug report. Duplicate of https://bugs.mysql.com/bug.php?id=12654.
[14 Aug 9:20] MySQL Verification Team
Windows current trunk fails to start if I set my date to 2040

2040-08-14T09:15:33.116398Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2040-08-14T09:15:33.120086Z 1 [Note] [MY-011088] [Server] Data dictionary initializing version '90000'.
2040-08-14T09:15:33.192060Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2040-08-14T09:15:33.192244Z 0 [ERROR] [MY-013455] [Server] The newly created data directory D:\my\release\mysql-9.1.0-winx64\data\ by --initialize is unusable. You can remove it.
2040-08-14T09:15:33.192345Z 0 [ERROR] [MY-010119] [Server] Aborting
2040-08-14T09:15:33.193157Z 0 [Note] [MY-010120] [Server] Binlog end
2