Score:0

Set MySQL default-time-zone to Europe/Berlin results to MySQL crash

pt flag

I'm running a VPS with Ubuntu 18.04.6 LTS (GNU/Linux 4.15.0 x86_64) and MySQL 5.7.40.

Until now I always took the following steps to setup the right time zone for MySQL on a new server:

First: sudo apt-get install --reinstall tzdata

Then I selected Europe and Berlin at: sudo dpkg-reconfigure tzdata

Console then prints: Current default time zone: 'Europe/Berlin'

Then I opened /etc/mysql/mysql.conf.d/mysqld.cnf and changed default-time-zone to:

default-time-zone = "Europe/Berlin"

Then I rebooted MySQL with: sudo service mysql restart

Now the new time zone Europe/Berlin used to be set up properly.

But when I try this today I doesn't work any more. The MySQL server doesn't even start.

sudo service mysql restart gives me:

Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xe" for details.

Why doesn't it work any more? How can I set the time zone for MySQL to Europe/Berlin?

EDIT: Is it possible that I simply have to fully remove default-time-zone from mysqld.cnf to make MySQL to automatically take the system time I did set up with sudo dpkg-reconfigure tzdata?

EDIT: sudo systemctl status mysql.service shows:

● mysql.service - MySQL Community Server
   Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
   Active: deactivating (stop-sigterm) (Result: exit-code) since Thu 2022-12-15 16:42:36 CET; 52s ago
  Process: 3294 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/run/mysqld/mysqld.pid (code=exited, status=1/FAILURE)
  Process: 3285 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
 Main PID: 698 (code=exited, status=0/SUCCESS)
    Tasks: 12 (limit: 4915)
   CGroup: /system.slice/mysql.service
           └─3297 /usr/sbin/mysqld --daemonize --pid-file=/run/mysqld/mysqld.pid

Dec 15 16:43:27 user123.example.com systemd[1]: Starting MySQL Community Server...
Dec 15 16:43:28 user123.example.com mysqld[3294]: Initialization of mysqld failed: 0
Dec 15 16:43:28 user123.example.com systemd[1]: mysql.service: Control process exited, code=exited status=1

journalctl -xe shows:

-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- Unit mysql.service has finished shutting down.
Dec 15 16:45:50 user123.example.com systemd[1]: Starting MySQL Community Server...
-- Subject: Unit mysql.service has begun start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- Unit mysql.service has begun starting up.
Dec 15 16:45:50 user123.example.com mysqld[5588]: Initialization of mysqld failed: 0
Dec 15 16:45:50 user123.example.com systemd[1]: mysql.service: Control process exited, code=exited status=1
Dec 15 16:45:52 user123.example.com systemd[1]: mysql.service: Failed with result 'exit-code'.
Dec 15 16:45:52 user123.example.com systemd[1]: Failed to start MySQL Community Server.
-- Subject: Unit mysql.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- Unit mysql.service has failed.
-- 
-- The result is RESULT.
Dec 15 16:45:52 user123.example.com systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
Dec 15 16:45:52 user123.example.com systemd[1]: mysql.service: Scheduled restart job, restart counter is at 61.
-- Subject: Automatic restarting of a unit has been scheduled
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- Automatic restarting of the unit mysql.service has been scheduled, as the result for
-- the configured Restart= setting for the unit.
Dec 15 16:45:52 user123.example.com systemd[1]: Stopped MySQL Community Server.
-- Subject: Unit mysql.service has finished shutting down
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- Unit mysql.service has finished shutting down.
Dec 15 16:45:52 user123.example.com systemd[1]: Starting MySQL Community Server...
-- Subject: Unit mysql.service has begun start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- Unit mysql.service has begun starting up.
Dec 15 16:45:53 user123.example.com mysqld[5628]: Initialization of mysqld failed: 0
Dec 15 16:45:53 user123.example.com systemd[1]: mysql.service: Control process exited, code=exited status=1
lines 2885-2927/2927 (END)

EDIT:

This is what /var/log/mysql/error.log shows when I run sudo service mysql restart after I added default-time-zone = "Europe/Berlin" to /etc/mysql/mysql.conf.d/mysqld.cnf:

2022-12-16T05:48:08.550155Z 0 [Note] Giving 1 client threads a chance to die gracefully
2022-12-16T05:48:08.550190Z 0 [Note] Shutting down slave threads
2022-12-16T05:48:10.550263Z 0 [Note] Forcefully disconnecting 1 remaining clients
2022-12-16T05:48:10.550289Z 0 [Note] Event Scheduler: Killing the scheduler thread, thread id 1
2022-12-16T05:48:10.550296Z 0 [Note] Event Scheduler: Waiting for the scheduler thread to reply
2022-12-16T05:48:10.550348Z 0 [Note] Event Scheduler: Stopped
2022-12-16T05:48:10.550356Z 0 [Note] Event Scheduler: Purging the queue. 4 events
2022-12-16T05:48:10.550394Z 0 [Note] Binlog end
2022-12-16T05:48:10.550745Z 0 [Note] Shutting down plugin 'auth_socket'
2022-12-16T05:48:10.550758Z 0 [Note] Shutting down plugin 'ngram'
2022-12-16T05:48:10.550764Z 0 [Note] Shutting down plugin 'partition'
2022-12-16T05:48:10.550770Z 0 [Note] Shutting down plugin 'BLACKHOLE'
2022-12-16T05:48:10.550776Z 0 [Note] Shutting down plugin 'ARCHIVE'
2022-12-16T05:48:10.550782Z 0 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2022-12-16T05:48:10.550810Z 0 [Note] Shutting down plugin 'MRG_MYISAM'
2022-12-16T05:48:10.550816Z 0 [Note] Shutting down plugin 'MyISAM'
2022-12-16T05:48:10.550822Z 0 [Note] Shutting down plugin 'INNODB_SYS_VIRTUAL'
2022-12-16T05:48:10.550826Z 0 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2022-12-16T05:48:10.550829Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2022-12-16T05:48:10.550832Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2022-12-16T05:48:10.550835Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2022-12-16T05:48:10.550838Z 0 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2022-12-16T05:48:10.550841Z 0 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2022-12-16T05:48:10.550843Z 0 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2022-12-16T05:48:10.550846Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2022-12-16T05:48:10.550849Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2022-12-16T05:48:10.550852Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2022-12-16T05:48:10.550855Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2022-12-16T05:48:10.550858Z 0 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2022-12-16T05:48:10.550861Z 0 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2022-12-16T05:48:10.550863Z 0 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2022-12-16T05:48:10.550866Z 0 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2022-12-16T05:48:10.550869Z 0 [Note] Shutting down plugin 'INNODB_METRICS'
2022-12-16T05:48:10.550872Z 0 [Note] Shutting down plugin 'INNODB_TEMP_TABLE_INFO'
2022-12-16T05:48:10.550875Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2022-12-16T05:48:10.550878Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2022-12-16T05:48:10.550881Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2022-12-16T05:48:10.550883Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2022-12-16T05:48:10.550886Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2022-12-16T05:48:10.550889Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2022-12-16T05:48:10.550892Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM'
2022-12-16T05:48:10.550895Z 0 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2022-12-16T05:48:10.550898Z 0 [Note] Shutting down plugin 'INNODB_CMP'
2022-12-16T05:48:10.550901Z 0 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2022-12-16T05:48:10.550904Z 0 [Note] Shutting down plugin 'INNODB_LOCKS'
2022-12-16T05:48:10.550907Z 0 [Note] Shutting down plugin 'INNODB_TRX'
2022-12-16T05:48:10.550910Z 0 [Note] Shutting down plugin 'InnoDB'
2022-12-16T05:48:10.551105Z 0 [Note] InnoDB: FTS optimize thread exiting.
2022-12-16T05:48:10.551145Z 0 [Note] InnoDB: Starting shutdown...
2022-12-16T05:48:10.651252Z 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
2022-12-16T05:48:10.651428Z 0 [Note] InnoDB: Buffer pool(s) dump completed at 221216  6:48:10
2022-12-16T05:48:12.259412Z 0 [Note] InnoDB: Shutdown completed; log sequence number 1392488917
2022-12-16T05:48:12.261602Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2022-12-16T05:48:12.261629Z 0 [Note] Shutting down plugin 'MEMORY'
2022-12-16T05:48:12.261633Z 0 [Note] Shutting down plugin 'CSV'
2022-12-16T05:48:12.261638Z 0 [Note] Shutting down plugin 'sha256_password'
2022-12-16T05:48:12.261640Z 0 [Note] Shutting down plugin 'mysql_native_password'
2022-12-16T05:48:12.261773Z 0 [Note] Shutting down plugin 'binlog'
2022-12-16T05:48:12.262193Z 0 [Note] /usr/sbin/mysqld: Shutdown complete

2022-12-16T05:48:12.858254Z 0 [Warning] option 'binlog_cache_size': unsigned value 0 adjusted to 4096
2022-12-16T05:48:12.858399Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2022-12-16T05:48:12.858412Z 0 [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
2022-12-16T05:48:12.859900Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.40-0ubuntu0.18.04.1) starting as process 24903 ...
2022-12-16T05:48:12.864068Z 0 [Note] InnoDB: PUNCH HOLE support available
2022-12-16T05:48:12.864101Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2022-12-16T05:48:12.864106Z 0 [Note] InnoDB: Uses event mutexes
2022-12-16T05:48:12.864109Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2022-12-16T05:48:12.864113Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.12
2022-12-16T05:48:12.864120Z 0 [Note] InnoDB: Using Linux native AIO
2022-12-16T05:48:12.864994Z 0 [Note] InnoDB: Number of pools: 1
2022-12-16T05:48:12.868218Z 0 [Note] InnoDB: Using CPU crc32 instructions
2022-12-16T05:48:12.869546Z 0 [Note] InnoDB: Initializing buffer pool, total size = 8M, instances = 1, chunk size = 8M
2022-12-16T05:48:12.871238Z 0 [Note] InnoDB: Completed initialization of buffer pool
2022-12-16T05:48:12.872592Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2022-12-16T05:48:12.927953Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2022-12-16T05:48:12.971117Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2022-12-16T05:48:12.971174Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2022-12-16T05:48:13.343700Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2022-12-16T05:48:13.344553Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2022-12-16T05:48:13.344568Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2022-12-16T05:48:13.344895Z 0 [Note] InnoDB: Waiting for purge to start
2022-12-16T05:48:13.395214Z 0 [Note] InnoDB: 5.7.40 started; log sequence number 1392488917
2022-12-16T05:48:13.395598Z 0 [Note] Plugin 'FEDERATED' is disabled.
2022-12-16T05:48:13.395745Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2022-12-16T05:48:13.405365Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
2022-12-16T05:48:13.405387Z 0 [Note] Skipping generation of SSL certificates as certificate files are present in data directory.
2022-12-16T05:48:13.405395Z 0 [Warning] A deprecated TLS version TLSv1 is enabled. Please use TLSv1.2 or higher.
2022-12-16T05:48:13.405403Z 0 [Warning] A deprecated TLS version TLSv1.1 is enabled. Please use TLSv1.2 or higher.
2022-12-16T05:48:13.406162Z 0 [Note] InnoDB: Buffer pool(s) load completed at 221216  6:48:13
2022-12-16T05:48:13.406497Z 0 [Warning] CA certificate ca.pem is self signed.
2022-12-16T05:48:13.406530Z 0 [Note] Skipping generation of RSA key pair as key files are present in data directory.
2022-12-16T05:48:13.406919Z 0 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
2022-12-16T05:48:13.406934Z 0 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
2022-12-16T05:48:13.407087Z 0 [Note] Server socket created on IP: '0.0.0.0'.
2022-12-16T05:48:13.414045Z 0 [ERROR] Fatal error: Illegal or unknown default time zone 'Europe/Berlin'
2022-12-16T05:48:13.414088Z 0 [ERROR] Fatal error: Failed to initialize ACL/grant/time zones structures or failed to remove temporary table files.
2022-12-16T05:48:13.414128Z 0 [ERROR] Aborting

2022-12-16T05:48:13.414160Z 0 [Note] Binlog end
2022-12-16T05:48:13.414347Z 0 [Note] Shutting down plugin 'auth_socket'
2022-12-16T05:48:13.414358Z 0 [Note] Shutting down plugin 'ngram'
2022-12-16T05:48:13.414364Z 0 [Note] Shutting down plugin 'partition'
2022-12-16T05:48:13.414369Z 0 [Note] Shutting down plugin 'BLACKHOLE'
2022-12-16T05:48:13.414374Z 0 [Note] Shutting down plugin 'ARCHIVE'
2022-12-16T05:48:13.414379Z 0 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2022-12-16T05:48:13.414471Z 0 [Note] Shutting down plugin 'MRG_MYISAM'
2022-12-16T05:48:13.414478Z 0 [Note] Shutting down plugin 'MyISAM'
2022-12-16T05:48:13.414485Z 0 [Note] Shutting down plugin 'INNODB_SYS_VIRTUAL'
2022-12-16T05:48:13.414490Z 0 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2022-12-16T05:48:13.414495Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2022-12-16T05:48:13.414499Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2022-12-16T05:48:13.414504Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2022-12-16T05:48:13.414509Z 0 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2022-12-16T05:48:13.414513Z 0 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2022-12-16T05:48:13.414518Z 0 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2022-12-16T05:48:13.414523Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2022-12-16T05:48:13.414527Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2022-12-16T05:48:13.414531Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2022-12-16T05:48:13.414534Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2022-12-16T05:48:13.414538Z 0 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2022-12-16T05:48:13.414542Z 0 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2022-12-16T05:48:13.414546Z 0 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2022-12-16T05:48:13.414550Z 0 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2022-12-16T05:48:13.414555Z 0 [Note] Shutting down plugin 'INNODB_METRICS'
2022-12-16T05:48:13.414558Z 0 [Note] Shutting down plugin 'INNODB_TEMP_TABLE_INFO'
2022-12-16T05:48:13.414563Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2022-12-16T05:48:13.414566Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2022-12-16T05:48:13.414570Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2022-12-16T05:48:13.414574Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2022-12-16T05:48:13.414578Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2022-12-16T05:48:13.414582Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2022-12-16T05:48:13.414586Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM'
2022-12-16T05:48:13.414591Z 0 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2022-12-16T05:48:13.414595Z 0 [Note] Shutting down plugin 'INNODB_CMP'
2022-12-16T05:48:13.414599Z 0 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2022-12-16T05:48:13.414604Z 0 [Note] Shutting down plugin 'INNODB_LOCKS'
2022-12-16T05:48:13.414609Z 0 [Note] Shutting down plugin 'INNODB_TRX'
2022-12-16T05:48:13.414613Z 0 [Note] Shutting down plugin 'InnoDB'
2022-12-16T05:48:13.415886Z 0 [Note] InnoDB: FTS optimize thread exiting.
2022-12-16T05:48:13.416009Z 0 [Note] InnoDB: Starting shutdown...
2022-12-16T05:48:13.516295Z 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
2022-12-16T05:48:13.516442Z 0 [Note] InnoDB: Buffer pool(s) dump completed at 221216  6:48:13
2022-12-16T05:48:15.029165Z 0 [Note] InnoDB: Shutdown completed; log sequence number 1392488936
2022-12-16T05:48:15.031232Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2022-12-16T05:48:15.031245Z 0 [Note] Shutting down plugin 'MEMORY'
2022-12-16T05:48:15.031250Z 0 [Note] Shutting down plugin 'CSV'
2022-12-16T05:48:15.031254Z 0 [Note] Shutting down plugin 'sha256_password'
2022-12-16T05:48:15.031257Z 0 [Note] Shutting down plugin 'mysql_native_password'
2022-12-16T05:48:15.031417Z 0 [Note] Shutting down plugin 'binlog'
2022-12-16T05:48:15.031776Z 0 [Note] /usr/sbin/mysqld: Shutdown complete

2022-12-16T05:48:15.663103Z 0 [Warning] option 'binlog_cache_size': unsigned value 0 adjusted to 4096
2022-12-16T05:48:15.663243Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2022-12-16T05:48:15.663263Z 0 [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
2022-12-16T05:48:15.664921Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.40-0ubuntu0.18.04.1) starting as process 24942 ...
2022-12-16T05:48:15.669278Z 0 [Note] InnoDB: PUNCH HOLE support available
2022-12-16T05:48:15.669318Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2022-12-16T05:48:15.669326Z 0 [Note] InnoDB: Uses event mutexes
2022-12-16T05:48:15.669333Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2022-12-16T05:48:15.669340Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.12
2022-12-16T05:48:15.669351Z 0 [Note] InnoDB: Using Linux native AIO
2022-12-16T05:48:15.669721Z 0 [Note] InnoDB: Number of pools: 1
2022-12-16T05:48:15.670082Z 0 [Note] InnoDB: Using CPU crc32 instructions
2022-12-16T05:48:15.671500Z 0 [Note] InnoDB: Initializing buffer pool, total size = 8M, instances = 1, chunk size = 8M
2022-12-16T05:48:15.672083Z 0 [Note] InnoDB: Completed initialization of buffer pool
2022-12-16T05:48:15.672550Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2022-12-16T05:48:15.685096Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2022-12-16T05:48:15.699358Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2022-12-16T05:48:15.749507Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2022-12-16T05:48:15.999356Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2022-12-16T05:48:15.999881Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2022-12-16T05:48:15.999893Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2022-12-16T05:48:16.000342Z 0 [Note] InnoDB: Waiting for purge to start
2022-12-16T05:48:16.050473Z 0 [Note] InnoDB: 5.7.40 started; log sequence number 1392488936
2022-12-16T05:48:16.050633Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2022-12-16T05:48:16.050751Z 0 [Note] Plugin 'FEDERATED' is disabled.
2022-12-16T05:48:16.052749Z 0 [Note] InnoDB: Buffer pool(s) load completed at 221216  6:48:16
2022-12-16T05:48:16.056473Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
2022-12-16T05:48:16.056492Z 0 [Note] Skipping generation of SSL certificates as certificate files are present in data directory.
2022-12-16T05:48:16.056497Z 0 [Warning] A deprecated TLS version TLSv1 is enabled. Please use TLSv1.2 or higher.
2022-12-16T05:48:16.056500Z 0 [Warning] A deprecated TLS version TLSv1.1 is enabled. Please use TLSv1.2 or higher.
2022-12-16T05:48:16.056934Z 0 [Warning] CA certificate ca.pem is self signed.
2022-12-16T05:48:16.056959Z 0 [Note] Skipping generation of RSA key pair as key files are present in data directory.
2022-12-16T05:48:16.057014Z 0 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
2022-12-16T05:48:16.057023Z 0 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
2022-12-16T05:48:16.057142Z 0 [Note] Server socket created on IP: '0.0.0.0'.
2022-12-16T05:48:16.058316Z 0 [ERROR] Fatal error: Illegal or unknown default time zone 'Europe/Berlin'
2022-12-16T05:48:16.058341Z 0 [ERROR] Fatal error: Failed to initialize ACL/grant/time zones structures or failed to remove temporary table files.
2022-12-16T05:48:16.058369Z 0 [ERROR] Aborting

2022-12-16T05:48:16.058463Z 0 [Note] Binlog end
2022-12-16T05:48:16.058585Z 0 [Note] Shutting down plugin 'auth_socket'
2022-12-16T05:48:16.058592Z 0 [Note] Shutting down plugin 'ngram'
2022-12-16T05:48:16.058596Z 0 [Note] Shutting down plugin 'partition'
2022-12-16T05:48:16.058599Z 0 [Note] Shutting down plugin 'BLACKHOLE'
2022-12-16T05:48:16.058603Z 0 [Note] Shutting down plugin 'ARCHIVE'
2022-12-16T05:48:16.058606Z 0 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2022-12-16T05:48:16.058635Z 0 [Note] Shutting down plugin 'MRG_MYISAM'
2022-12-16T05:48:16.058639Z 0 [Note] Shutting down plugin 'MyISAM'
2022-12-16T05:48:16.058643Z 0 [Note] Shutting down plugin 'INNODB_SYS_VIRTUAL'
2022-12-16T05:48:16.058646Z 0 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2022-12-16T05:48:16.058649Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2022-12-16T05:48:16.058652Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2022-12-16T05:48:16.058655Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2022-12-16T05:48:16.058658Z 0 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2022-12-16T05:48:16.058661Z 0 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2022-12-16T05:48:16.058664Z 0 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2022-12-16T05:48:16.058667Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2022-12-16T05:48:16.058670Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2022-12-16T05:48:16.058673Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2022-12-16T05:48:16.058676Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2022-12-16T05:48:16.058679Z 0 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2022-12-16T05:48:16.058682Z 0 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2022-12-16T05:48:16.058685Z 0 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2022-12-16T05:48:16.058688Z 0 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2022-12-16T05:48:16.058691Z 0 [Note] Shutting down plugin 'INNODB_METRICS'
2022-12-16T05:48:16.058694Z 0 [Note] Shutting down plugin 'INNODB_TEMP_TABLE_INFO'
2022-12-16T05:48:16.058697Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2022-12-16T05:48:16.058700Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2022-12-16T05:48:16.058703Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2022-12-16T05:48:16.058705Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2022-12-16T05:48:16.058708Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2022-12-16T05:48:16.058711Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2022-12-16T05:48:16.058714Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM'
2022-12-16T05:48:16.058717Z 0 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2022-12-16T05:48:16.058720Z 0 [Note] Shutting down plugin 'INNODB_CMP'
2022-12-16T05:48:16.058723Z 0 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2022-12-16T05:48:16.058726Z 0 [Note] Shutting down plugin 'INNODB_LOCKS'
2022-12-16T05:48:16.058729Z 0 [Note] Shutting down plugin 'INNODB_TRX'
2022-12-16T05:48:16.058732Z 0 [Note] Shutting down plugin 'InnoDB'
2022-12-16T05:48:16.059098Z 0 [Note] InnoDB: FTS optimize thread exiting.
2022-12-16T05:48:16.059291Z 0 [Note] InnoDB: Starting shutdown...
2022-12-16T05:48:16.159378Z 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
2022-12-16T05:48:16.159553Z 0 [Note] InnoDB: Buffer pool(s) dump completed at 221216  6:48:16
vidarlo avatar
om flag
What does `sudo systemctl status mysql.service` show?
cn flag
to add: it also states "See ,,, "journalctl -xe" for details." Please post those; ... the relevant parts ;). More than likely you did something different.
David avatar
pt flag
@vidarlo I added it to my question.
David avatar
pt flag
@Rinzwind I added it to my question.
in flag
There may be a more specific error reported in `/var/log/mysql/error.log`. That said, MySQL 5.7 usually does use the system time by default, so it may not be necessary to change it unless you have a very specific use case involving data being recorded across multiple time zones
David avatar
pt flag
@matigo I added the content of `/var/log/mysql/error.log` to my question. But I think I'll simply remove `default-time-zone = "Europe/Berlin"`.
Score:0
qa flag

I ran into the same problem. It seems on all my MySQL 5.7 installations the time zone tables were populated out of the box and in MySQL 8.0 or at least on my Ubuntu 22 installation it was empty.

You have to comment out that default time zone so that MySQL starts up again and start it.

Try running:

select * from time_zone_name;

Probably you'll see that it's an empty table and seems MySQL reads from here.

To populate the time zone tables run:

mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql

See also / credits to: https://stackoverflow.com/questions/49518683/the-server-time-zone-value-cest-is-unrecognized

In my case I had errors to STDERR and the pipe didn't work, instead the following worked:

mysql_tzinfo_to_sql /usr/share/zoneinfo 2>/dev/null > tzdata.sql

The tzdata.sql file contained 137'464 lines for me, which I loaded with:

cat tzdata.sql | mysql -u root mysql -p

Afterwards I was able to set (for me)

default_time_zone=Europe/Zurich

Or also:

default_time_zone=Europe/Berlin

(it implements the same actually)

David avatar
cn flag
You say this is Ubuntu 22 you are using so that must be Ubuntu Core as it is the only one to use just a 2 digit number system. Please edit and make this clear.
David Ellenberger avatar
qa flag
Ubuntu 22.04.2 LTS mysql-server:all 8.0.32 - in my case (... my idea was rather to give a more general help with that issue)
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.