Reputation: 172
I want to connect MySQL with Java via IntelliJ IDEA.
I'm using MySQL. Settings are:
Host:127.0.01
Port:3306
User:root
Name of database I want to use is School.
In IntelliJ I add DB Navigator, setting are:
Name School
description: ..
Host: localhost
Port: 3306
User: root
Password: password that work in MySQL
After all I get a error:
"Cannot connect to School. The server time zone values "CET" is unrecognized or represent more then one time zones. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specific time zone value if you want to utilize time zone support.
I use Poland timezone. Do you have any advice how to fix it?
Upvotes: 0
Views: 3000
Reputation: 3
I just had the same issue,
My fix was just leave the default database name, as is.
Do not change the default name: mysql.
Else check your ports, if needed.
Mine is 3308.
Upvotes: 0
Reputation: 21
I had the same problem and solved it as follows
looks for a customized database
Select the type of database
data In the url insert the link
jdbc:mysql://localhost:3306/mysql?serverTimezone=UTC
localhost - is the servior
3306 - is the door
serverTimezone - Time zone of your zone
Upvotes: 1
Reputation: 93
Go to the Properties tab and add a new property named serverTimezone with the value UTC.
Upvotes: 6