MySQL time zone settings

 

If MySQL does not specify the time zone explicitly, it will use the time zone of the operating system by default.

 

Modify MySQL time zone:

Open the MySQL configuration file, my.ini or my.cnf,

Find the [mysqld] keyword and add the following configuration below it:

 

default-time_zone=+8:00

 

illustrate:

+8:00 means East Eighth District, which is Beijing time.

After modifying the configuration, it will take effect after restarting.

 

 

Check the current time zone used by MySQL:

 

 

 

 



 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326313221&siteId=291194637