how to set global time_zone in mysql 1

how to set global time_zone in mysql

SET GLOBAL time_zone = timezone;

eg: SET GLOBAL time_zone = 'Asia/Kolkata';

Here is what the above code is Doing:
1. We are creating a connection to the database.
2. We are creating a cursor object.
3. We are executing the query to create a database.
4. We are executing the query to create a table.
5. We are executing the query to insert data into the table.
6. We are executing the query to fetch the data from the table.
7. We are printing the data.
8. We are closing the connection.

Similar Posts