mariadb 10, mysql 시간설정 (global.time_zone, session.time_zone, system_time_zone)
참고 문서 : dev.mysql.com/doc/refman/8.0/en/time-zone-support.html
MySQL :: MySQL 8.0 Reference Manual :: 5.1.15 MySQL Server Time Zone Support
5.1.15 MySQL Server Time Zone Support This section describes the time zone settings maintained by MySQL, how to load the system tables required for named time support, how to stay current with time zone changes, and how to enable leap-second support. Begi
dev.mysql.com
작업전에 쿼리를 실행하면
select @@global.time_zone,@@session.time_zone,@@system_time_zone;
아래처럼 나온다
@@global.time_zone | @@session.time_zone | @@system_time_zone |
SYSTEM | SYSTEM | UTC |
set time_zone='Asia/Seoul'; 를 실행하면
Lookup Error - MySQL Database Error: Unknown or incorrect time zone: 'Asia/Seoul' 에러를 띄우고
서버 시간대 추가
# mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql
# mysql_tzinfo_to_sql /usr/share/zoneinfo/Asia/Seoul KST
'IT > IT' 카테고리의 다른 글
윈도우 10 숨긴파일 찾기 (0) | 2020.12.11 |
---|---|
컴퓨터 마우스 찾는 법 (0) | 2020.11.25 |
크롬 다운로드 위치 변경 (0) | 2020.11.25 |