Reputation: 631
I want to set timezone in mysql from default timezone ('los angles') to my own timezone ('asia/jakart'). I have been change the timezone using query ->
SET GLOBAL TIME_ZONE = 'ASIA/JAKARTA'
The timezone was change if i using the query above. but if i restart mysql, the timezone is back to default timezone(los angels).
How to make the timezone changed permanent to asia/jakarta?
Upvotes: 4
Views: 8810
Reputation: 477
In /etc/mysql/my.cnf
[mysqld_safe]
socket=/var/run/mysqld/mysqld.sock
default_time_zone=Asia/Jakarta
Remember to use underscores _
Upvotes: 2
Reputation: 7616
Put the following in your mysql server configuration (e.g. my.cnf)
default-time-zone=Asia/Jakarta
Please check the doc here
Upvotes: 2