6

I'm using Windows 7

Mysql 5.5.15

running set time_zone = "Europe/Moscow";

I get Error Number: 1298 Unknown or incorrect time zone: 'Europe/Moscow'

I update the timezone tables using the latest from here http://dev.mysql.com/downloads/timezones.html but after mysql server startup the time zone tables are still empty and the command still returns the same errors.

Does anyone faced similar problem?

Volder
  • 972
  • 4
  • 13
  • 29
  • similar problem here, but without solution http://web.archiveorange.com/archive/v/2HORyt7t4kCIDgQkWHPq – Volder Feb 04 '12 at 21:16

3 Answers3

10

Solution:

For those who faced the same problem - here is what I found. I ran show variables like 'datadir' and found out that my data files are stored in a different folder:C:\ProgramData\MySQL\MySQL Server 5.5\data\

and I was replacing files in C:\Program Files... folder initially. There was also the needed files present.

So finally everything went fine.

Volder
  • 972
  • 4
  • 13
  • 29
  • Thanks much for this.. spent close to an hour finding why the tables were empty even after copying the files. – Satish P Feb 24 '17 at 13:45
1

I solved my problem by following this steps.

  • If your MySql 5.6 or below

download timezone_2016f_posix.zip from below link and unzip then replace all files to

e.g. yourDrive:\mysql\data\mysql

or

  • If your MySql 5.7+

download timezone_2016f_posix_sql.zip from below link and unzip then replace all files to

e.g. YourDrive:\mysql\data\mysql

You will get all of zip file from this link http://dev.mysql.com/downloads/timezones.html

Note: Your mysql data path will be changed depands on your mysql version or MySql setup or If you use XAMPP the your path will be like this yourdrive:\Xampp\mysql\data\mysql

Hope it will help

Masum
  • 4,879
  • 2
  • 23
  • 28
0

Try:

SET GLOBAL time_zone = <timezone>;
Nir Alfasi
  • 53,191
  • 11
  • 86
  • 129
  • the same error #1298 - Unknown or incorrect time zone: 'Europe/Moscow' the problem is that tables related to time_zone are empty in DB, although the files like time_zone_name.MYD contain data – Volder Feb 04 '12 at 21:34
  • yes, this was exactly where I started from. I posted solution which I found and what I did wrong, thanks. – Volder Feb 05 '12 at 09:44