Timezones

MySQL: Load timezones info in MySQL Server

Run following command on command line:

mysql_tzinfo_to_sql  /usr/share/zoneinfo | mysql -u root -p mysql

and to change timezone of the mysql server, add following line in the my.cnf file (/etc/my.cnf)

default_time_zone=Asia/Kolkata

or run following query on MySQL prompt (this will be valid for current session only)

SET time_zone = ‘Asia/Kolkata’;

 Scroll to top