Mysql
如何解決此錯誤“錯誤 1298 (HY000):未知或不正確的時區:‘UTC’”?
當我執行以下命令時,我得到一個錯誤,但是我的一個腳本需要它。
SET time_zone = 'UTC'; ERROR 1298 (HY000): Unknown or incorrect time zone: 'UTC'
只需執行
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql -p
$ mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql -p Enter password: Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it. Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it. Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it. Warning: Unable to load '/usr/share/zoneinfo/zone1970.tab' as time zone. Skipping it.