Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 811
Rômulo Sorato Avatar asked Sep 06 '25 03:09

Rômulo Sorato


2 Answers

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

like image 173
Maxim Savin Avatar answered Sep 07 '25 23:09

Maxim Savin


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

like image 40
Rômulo Sorato Avatar answered Sep 07 '25 23:09

Rômulo Sorato