MySQL mysql_tzinfo_to_sql program

后端 未结 6 887
抹茶落季
抹茶落季 2021-01-05 15:10

I am using MySQL 5.0.51b on microsoft windows xp. I am trying to load data from zoneinfo files(generated by library downloaded from here) to database tables as described her

6条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-05 15:38

    based on Francisco Corrales Morales answer.

    For MySQL 5.7+ on Windows 10 machine, my procedure is

    1. download latest POSIX Standard time zone script under 5.7+ section from https://dev.mysql.com/downloads/timezones.html
    2. Extract the file then there would be a single SQL file named timezone_posix.sql
    3. run the sql script, in my case, use command line below
    bin\mysql.exe --host=localhost --port=3306 --user=USERNAME -p mysql < c:\...\Downloads\timezone_2020d_posix_sql\timezone_posix.sql
    

    Note make sure you run the time zone script under mysql database/schema.

提交回复
热议问题