mysql create and modify time zone

I usually use sqlserver a lot. Now I use mysql. I don’t know some common sense issues. The following issues need attention:
The following are all using the Navicat tool to connect to the mysql database

1. Create a mysql database:

   Select utf8 for character set, utf8_general_ci for collation

 

2. Modify time zone
If you do not modify the time zone, the default is US time, and the time display problem will occur.

  set global time_zone ='+8:00'; ##Modify mysql global time zone to Beijing time
  set time_zone ='+8:00'; ##Modify the current session time zone
  flush privileges; #effective immediately

Guess you like

Origin blog.csdn.net/orangapple/article/details/109242898