我如何防止Mariadb重新启动时重置时区



每次重新启动MariadB,它重置时区:

MariaDB [(none)]> SELECT @@global.time_zone;      
+--------------------+
| @@global.time_zone |
+--------------------+
| Europe/Amsterdam   |
+--------------------+
1 row in set (0.000 sec)
MariaDB [(none)]> q;

时区是欧洲/阿姆斯特丹。但是,当我重新启动它时,它以某种方式更改为系统。

me@dbhost:~/ $ sudo systemctl restart mysqld;
me@dbhost:~/ $ mysql -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or g.
Your MariaDB connection id is 9
Server version: 10.3.14-MariaDB-log Source distribution
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
MariaDB [(none)]> SELECT @@global.time_zone;
+--------------------+
| @@global.time_zone |
+--------------------+
| SYSTEM             |
+--------------------+
1 row in set (0.000 sec)

为什么要预防它?

请参阅时区:

[mariadb]
...
default_time_zone = 'Europe/Amsterdam';

相关内容

  • 没有找到相关文章

最新更新