Search code examples
h2datagrip

Connect to H2 database using Datagrip client


Connecting to local h2 db from Datagrip Client is failing with the below error

A file path that is implicitly relative to the current working directory is not allowed in the database URL "jdbc:h2:file:localhost:8082/test". Use an absolute path, ~/name, ./name, or the baseDir setting instead.


Solution

  • Where are the Database Files Stored? section in http://www.h2database.com/html/faq.html helped me to configure and connect.

    DB URL Ex: jdbc:h2:file:C:/db-workspace/h2/data/test

    enter image description here