programing

재시작 시 mariadb가 시간대를 재설정하지 않도록 하려면 어떻게 해야 합니까?

coolbiz 2023. 9. 7. 22:18
반응형

재시작 시 mariadb가 시간대를 재설정하지 않도록 하려면 어떻게 해야 합니까?

restart mariadb에서 매번 시간대를 재설정합니다.

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

MariaDB [(none)]> \q;

시간대는 유럽/암스테르담입니다.그런데 막상 다시 시작해보면 왠지 SYSTEM으로 바뀌게 됩니다.

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';

언급URL : https://stackoverflow.com/questions/56088807/how-do-i-prevent-mariadb-to-reset-timezone-on-restart

반응형