Connect to H2 database using Datagrip client

Viewed 829

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.

2 Answers

Change data source Connection type to Embedded and specify path to your database file.

H2 embedded db

For additional options read H2 database URL overview

Related