Edit MySQL timezone

For edit the time zone on your mysql server, you can run the query as below.

SET GLOBAL time_zone = 'timezone';

timezone can be set based on the zone you need. For example your time zone is GMT+0800, then just run the query as below.

SET GLOBAL time_zone = '+800';

For how to check the current time, please refer to here

How to get mysql current time

In Mysql, there have a function to store the time by default. It will same with server time usually, but how to confirm it?

Just use the command as below

mysql> SELECT NOW();
+———————+
| NOW() |
+———————+
| 2011-08-26 10:57:30 |
+———————+