4

I am administrating a MySQL Server. It is installed on a ubuntu server. Recently I discovered, that the ubuntu server was set on a false timezone. I corrected that through terminal by the command dpkg-reconfigure tzdate. Now I want the MySQL Server to adapt this setting. Is this possible?

PeeHaa
  • 69,318
  • 57
  • 185
  • 258
Aufwind
  • 23,814
  • 37
  • 104
  • 151

3 Answers3

4

In your /etc/mysql/mysql.conf or wherever it is, check out the default-time-zone

Henry
  • 6,293
  • 2
  • 21
  • 30
  • 2
    I got this from the link you posted: `SET time_zone = SYSTEM;` After this command I restarted the MySQL Server and everything was fine! Thanks! – Aufwind May 16 '11 at 15:31
1

You need to update mysql tables on server for supporting the timezones names. Use shell command on server:

mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql -p
23W
  • 1,299
  • 16
  • 35
  • what the equivalent path for windows? /usr/share/zoneinfo I am using windows 10 wamp on this machine – themhz Oct 22 '16 at 10:20
0

In order to change timestamp on mysql , you can use the below steps.

Connect to mysql server. mysql -u root -p TYPE PASSWORD

SET GLOBAL time_zone = '+5:30';

Restart Mysql server by issuing the below query

service mysqld stop service mysqld start

Rizwan Basheer
  • 127
  • 1
  • 5