English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
To change the time zone in MySQL, we can use the SET command. Here is the syntax.
SET time_zone='someValue';
Now let's use the above syntax and apply it to the following query.
mysql > SET time_zone = '+8:00';
In this case, the value of time_zone is equal to8. To globally change the time zone, use the GLOBAL command. This is the syntax.
SET GLOBAL time_zone = 'someValue';
This is an example.
mysql> SET GLOBAL time_zone = '+8:00';
The above query will globally change the time zone.