Time zone error occurs when JDBC connect to the database

When JDBCl is connected: java.sql.SQLException: The server time zone value' й ׼ʱ ' is unrecognized

**
Solution: Step
1. cmd or win+R
2. Enter the mysql database: mysql -u username -p
enter the password.
3. Execute: show variables like "%time_zone%"; view the current mysql database time zone.
4. Modify the time zone: set global time_zone="+8:00";

Guess you like

Origin blog.csdn.net/qq_44634579/article/details/110150420