Sunday, March 3, 2013

Change the server time zone and mysql time


To change the server time zone do the following steps
# mv /etc/localtime /etc/localtime.bk
# ln -s /usr/share/zoneinfo/Requiredtimezone /etc/localtime

After this you need to restart mysql to correct mysql time. Steps to check mysql and server time are correct
# date +%s
1332653030
# mysql
SELECT FROM_UNIXTIME(1332653030);
Check if above time and date time matches

No comments:

Post a Comment