Mysql time zone error solution

After mysql is installed, the time zone error is found when testing in eclipse
1. Find the my.ini file (may be in a hidden file) and find it in the installation directory
2. Modify the MySQL configuration file, open the my.ini file with Notepad, and
search [mysqld] The node adds the following sentence under the node (remember not to add the carriage return by yourself and start a new line and write the following sentence)
default-time-zone='+08:00' to
restart the MySQL service
3. Open the cmd window , Log in to MySQL and
execute show variables like'%time_zone%'; this command
and then execute set global time_zone='+8:00'; this sentence (don’t miss the semicolon)

Guess you like

Origin blog.csdn.net/weixin_43631997/article/details/104747902