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: