How to change mysql time zone
Edit /etc/my.cnf and change your time zone.
root@box1 [/var/lib/mysql]# cat /etc/my.cnf
[mysqld_safe]
timezone = Europe/London
~
[mysqld]
set-variable = max_connections=500
safe-show-database
Login to mysql and check the time now.
root@box1 [/var/lib/mysql]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 369
Server version: 5.0.81-community MySQL Community Edition (GPL)
~
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
~
mysql> select now();
+---------------------+
| now() |
+---------------------+
| 2009-11-07 17:28:51 |
+---------------------+
1 row in set (0.00 sec)
~
mysql> quit
Bye
root@box1 [/var/lib/mysql]# date
Sat Nov 7 17:29:06 GMT 2009
Post a Comment