Resolve the time difference of MySQL inserting timestamp data by 8 hours

WordPress Source: csdn comment 1.6K Reading mode

Log in to MySQL as an administrator and execute the following statements:

mysql > SET time_zone = '+8:00'; #When this was Beijing, we were in the East 8th District

mysql> flush privileges; #Effective immediately

If the above operations have not yet taken effect, please go to:

[mysqld] of my.cnf/my.ini

Add:

default-time_zone = '+8:00'

Then restart the MySQL service.

Most of the articles on this site are original and used for personal learning records, which may be helpful to you, for reference only!

 weinxin
My Wechat
Copyright Notice
Please indicate the source and link of the original article reprinted on this site. Thank you for your cooperation!
five hundred and ninety-eight million eight hundred and forty-five thousand and six
 
 Robin
five hundred and ninety-eight million eight hundred and forty-five thousand and six
 anonymous

Comment

Anonymous netizens
 :?:  :razz:  :sad:  :evil:  :!:  :smile:  :oops:  :grin:  :eek:  :shock:  :???:  :cool:  :lol:  :mad:  :twisted:  :roll:  :wink:  :idea:  :arrow:  :neutral:  :cry:  :mrgreen:

Drag the slider to complete validation