Change the global time zone variable:
SET @@global.time_zone = '+3:00';
QUIT
The variable time_zone can be set directly on the MySQL client console.
Check your current time with the NOW () function before you start playing:
SELECT NOW();
Then change the global time zone variable and disconnect from the server:
SET @@global.time_zone = '+3:00';
QUIT
You need to go out and log back into your MySQL session to see the effects.
Once you restart your MySQL session, check the current time again:
SELECT NOW ();
If you have the zone database of zone names properly configured, you can refer to the zones by their names. Here's an example:
SET time_zone='America/Sao_Paulo';
SELECT @@time_zone;
To be able to refer to a time zone zone name, such as 'Brazil / DeNoronha', you must have the timezones name database correctly configured. If you have questions about this, or you are not able to use the names of the spindle zones, read this article .
To see all the valid spindles for Brazil, for example, use the following query:
SELECT * FROM mysql.time_zone_name WHERE Name LIKE '%Brazil%';
See more details in this answer .