0
votes

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?

2
See thisSabir Khan
@SabirKhan Couldn't solve my problem with that :(G. Dawid

2 Answers

4
votes

Go to the Properties tab and add a new property named serverTimezone with the value UTC.

1
votes

I had the same problem and solved it as follows

  1. looks for a customized database

  2. Select the type of database

  3. 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

insert image description here