Rômulo Sorato
Rômulo Sorato

Reputation: 1651

Cannot connect to h2 database in Intellij

I´m trying to follow this tutorial tutorial in Intellij IDEA but when i try to connect to h2 database the console trowns me an error:

 Connection is broken: "java.net.ConnectException: Connection refused: connect: localhost:9092" 
        java.net.ConnectException: Connection refused: connect.

What i need to do to make the connection?

Thanks in advance

enter image description here

Upvotes: 4

Views: 10414

Answers (2)

Maxim Savin
Maxim Savin

Reputation: 71

Change connection type from "Remote" to "In-memory"

Upvotes: 7

Rômulo Sorato
Rômulo Sorato

Reputation: 1651

The problem is with the url, it needs to path to your app: jdbc:h2:file:C:\Users\romul\IdeaProjects\raspberryAwards;MV_STORE=false;AUTO_SERVER=TRUE

Upvotes: 6

Related Questions