Skip to content

Instantly share code, notes, and snippets.

@coseos
Created December 20, 2022 09:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coseos/64283b1c4d8ac05e4c32e4ca19fb28bb to your computer and use it in GitHub Desktop.
Save coseos/64283b1c4d8ac05e4c32e4ca19fb28bb to your computer and use it in GitHub Desktop.
#!/bin/bash
# A script to start the h2 console in a docker container
# $1 is the container id
# $2 is the database
# $3 is the user (sa would be the default)
docker exec -it $1 Java -cp h2.jar org.h2.tools.Shell -url jdbc:h2:tcp://localhost/$2 -user $3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment