Atualmente estou correndo em um problema ao usar mariadb-10.0
. Depois de importar meus horários locais usando mysql_tzinfo_to_sql
(conforme descrito aqui ) e adicionando default_time_zone = UTC
ao [mysqld]
seção do meu /etc/mysql/mariadb.conf.d/50-server.cnf
meu error.log me diz o seguinte.
161004 12:15:57 [ERROR] Fatal error: Illegal or unknown default time zone 'UTC'
161004 12:15:57 [Note] InnoDB: Using mutexes to ref count buffer pool pages
161004 12:15:57 [Note] InnoDB: The InnoDB memory heap is disabled
161004 12:15:57 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
161004 12:15:57 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
161004 12:15:57 [Note] InnoDB: Compressed tables use zlib 1.2.8
161004 12:15:57 [Note] InnoDB: Using Linux native AIO
161004 12:15:57 [Note] InnoDB: Using CPU crc32 instructions
161004 12:15:57 [Note] InnoDB: Initializing buffer pool, size = 2.5G
161004 12:15:57 [Note] InnoDB: Completed initialization of buffer pool
161004 12:15:58 [Note] InnoDB: Highest supported file format is Barracuda.
161004 12:15:58 [Note] InnoDB: 128 rollback segment(s) are active.
161004 12:15:58 [Note] InnoDB: Waiting for purge to start
161004 12:15:58 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.31-77.0 started; log sequence number 43378228606
161004 12:15:58 [Note] Plugin 'FEEDBACK' is disabled.
161004 12:15:58 [ERROR] Fatal error: Illegal or unknown default time zone 'UTC'
Verificando o meu mysql_tzinfo_to_sql
, o seguinte seria importado:
INSERT INTO time_zone (Use_leap_seconds) VALUES ('N');
SET @time_zone_id= LAST_INSERT_ID();
INSERT INTO time_zone_name (Name, Time_zone_id) VALUES ('UTC', @time_zone_id);
INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, Offset, Is_DST, Abbreviation) VALUES
(@time_zone_id, 0, 0, 0, 'UTC')
;
As tabelas time_zone_name parecem corretas até o momento:
MariaDB [(none)]> select * from mysql.time_zone_name where name like '%UTC%';
+---------------+--------------+
| Name | Time_zone_id |
+---------------+--------------+
| Etc/UTC | 418 |
| UTC | 597 |
| posix/Etc/UTC | 1020 |
| posix/UTC | 1199 |
| right/Etc/UTC | 1622 |
| right/UTC | 1801 |
+---------------+--------------+