2

I have a simple Quarkus application that uses an in-memory H2 database. The JDBC connection string has some custom settings: jdbc:h2:mem:quarkus_db;DATABASE_TO_LOWER=TRUE;DB_CLOSE_DELAY=-1;MODE=MariaDB.

I'm trying to connect to the exact same database from a database manager — say DataGrip. After following the documentation, several answers from StackOverflow, and some blog posts, I'm still unable to connect to the same instance and query for any existing data using SQL.

There is something I don't fully understand from the examples. I've seen that initially using a connection like this in the application: jdbc:h2:mem:quarkus_db, and while the same it's up and running, then on the other application/process (DataGrip in my case) using jdbc:h2:tcp://localhost/mem:quarkus_db should work, but I fail to see how the first scheme will create a TCP server.

My goal is to verify some data while the application is running. I understand that when using something like jdbc:h2:mem:*, everything will be lost after the application stops.

x80486
  • 6,627
  • 5
  • 52
  • 111
  • Possibly related: [*How to access in-memory h2 database from Intellij IDEA*](https://stackoverflow.com/q/52388984/642706) – Basil Bourque Dec 18 '22 at 22:41
  • I think I may have going through several of those, but I don't see anywhere how `Quarkus` is able to start `H2` in "server mode". – x80486 Dec 18 '22 at 22:59
  • See also [_In-Memory Databases_](https://www.h2database.com/html/features.html#in_memory_databases). – trashgod Dec 18 '22 at 23:36

0 Answers0