Hi guys,
I login to MariaDB and I do:
MariaDB [(none)]> SHOW GLOBAL VARIABLES LIKE 'time_zone'; +---------------+--------+
| Variable_name | Value-a |
+---------------+--------+
| time_zone-a-a-a-a | SYSTEM |
+---------------+--------+
1 row in set (0,001 sec)
After it I do:
MariaDB [(none)]> SET GLOBAL time_zone = 'Europe/Rome';
Query OK, 0 rows affected (0,004 sec)
And I have:
MariaDB [(none)]> SHOW GLOBAL VARIABLES LIKE 'time_zone'; +---------------+-------------+
| Variable_name | Value-a-a-a-a-a-a |
+---------------+-------------+
| time_zone-a-a-a-a | Europe/Rome |
+---------------+-------------+
1 row in set (0,001 sec)
After a reboot, like what I wrote in the subject, the time zone value
comes back to system.
I inserted the timezone in 50-mysqld_safe.cnf
https://mariadb.com/kb/en/time-zones/
[mariadb]
default_time_zone = 'Europe/Rome'
or if you want the system time to also be the same:
sudo ln -sf /usr/share/zoneinfo/Europe/Rome /etc/localtime
I inserted the timezone in 50-mysqld_safe.cnf
That will apply when running in safe mode.
I do favor UTC as timezone as then you don't have to bother about the
heart attack causing time change twice a year.
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 63 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 492975:35:00 |
| Calls: | 840 |
| Files: | 1,301 |
| D/L today: |
16 files (28,385K bytes) |
| Messages: | 264,959 |