:: È®ÀÎ
MariaDB [(none)]> select count(*) from mysql.time_zone;
+----------+
| count(*) |
+----------+
| 0 |
+----------+
1 row in set (0.00 sec)
:: ¼³Á¤
mysql ¿¡¼ Á¦°øÇÏ´Â utility_queryÀÎ mysql_tzinfo_to_sqlÀ» ÀÌ¿ëÇؼ µ¥ÀÌŸ µî·Ï
# mysql_tzinfo_to_sql /usr/share/zoneinfo |mysql -uroot -pghtmxldrltnfwldnjs23 mysql
MariaDB [(none)]> select count(*) from mysql.time_zone;
+----------+
| count(*) |
+----------+
| 1787 |
+----------+
1 row in set (0.00 sec)
MariaDB [(none)]> select b.name, a.time_zone_id from mysql.time_zone a, mysql.time_zone_name b where a.time_zone_id = b.time_zone_id and b.name like '%Seoul';
+------------------+--------------+
| name | time_zone_id |
+------------------+--------------+
| Asia/Seoul | 303 |
| posix/Asia/Seoul | 899 |
| right/Asia/Seoul | 1495 |
+------------------+--------------+
3 rows in set (0.00 sec)
MariaDB [nova]> select @system_time_zone;
+-------------------+
| @system_time_zone |
+-------------------+
| NULL |
+-------------------+
1 row in set (0.02 sec)
MariaDB [nova]> select @@global.time_zone, @@session.time_zone;
+--------------------+---------------------+
| @@global.time_zone | @@session.time_zone |
+--------------------+---------------------+
| SYSTEM | SYSTEM |
+--------------------+---------------------+
1 row in set (0.03 sec)
MariaDB [(none)]> set time_zone = 'Asia/Seoul';
Query OK, 0 rows affected (0.02 sec)
MariaDB [(none)]> select @@time_zone;
+-------------+
| @@time_zone |
+-------------+
| Asia/Seoul |
+-------------+
1 row in set (0.00 sec)
MariaDB [(none)]> select @@global.time_zone, @@session.time_zone;
+--------------------+---------------------+
| @@global.time_zone | @@session.time_zone |
+--------------------+---------------------+
| SYSTEM | Asia/Seoul |
+--------------------+---------------------+
1 row in set (0.00 sec)
MariaDB [(none)]> select @@system_time_zone;
+--------------------+
| @@system_time_zone |
+--------------------+
| KST |
+--------------------+
1 row in set (0.00 sec)