IntelliJ IDEA连接MySQL(报错Server returns invalid timezone. Go to 'Advanced' tab and set 'serverTimezon)

When using IntelliJ IDEA for web application development, to achieve the development of data persistence layer, we do not want to switch back and forth between IntelliJ IDEA and visualization tool database, then we can use IntelliJ IDEA integrated database visualization of this powerful feature, this is Eclipse also temporarily impossible.
Next we show you IntelliJ IDEA and MySQL database visualization tools how to integrate.
Here Insert Picture Description
Here Insert Picture Description

Here Insert Picture Description
In one operation, for unknown reasons, download MySQL driver jar package I spent a long time but also occasionally prompt the download fails, I always encounter download failure simply click Try again to try again, I do not know how many times test and finally download better. However, the situation can not be connected or there may be an error (Server returns invalid timezone. Go to 'Advanced' tab and set 'serverTimezone' property manually., It may Connection to test @ localhost failed. [ 08001] Could not create connection to . database server Attempt), the reason is that the connection failed: time zone used by MySQL slower than Beijing eight hours we use. Here are two effective solutions:
1. execute a command line statement (absolutely effective pro-test) in the MySQL database:

set global time_zone='+8:00';

2. The need to increase following a last (not pro-test) in the url:

?useSSL=false&serverTimezone=UTC

Here Insert Picture Description
Here Insert Picture Description

Here Insert Picture Description
Effective solutions on their own Baidu two solutions are found, and then the teacher to the idea of another solution: the default IntelliJ IDEA integration of MySQL 8.0 version, but we are on the computer you're using is MySQL5.5 version, produced a version conflict. Solution: We can modify the MySQL driver jar package IntelliJ IDEA is used by default.
Here Insert Picture Description
Here Insert Picture Description
And then, to refresh the database table:

Here Insert Picture Description

Published 46 original articles · won praise 16 · views 2642

Guess you like

Origin blog.csdn.net/qq_43598138/article/details/103772854