Skip to content

How to access H2 database

leedonggyu edited this page Mar 19, 2021 · 5 revisions

How to access H2 database

If you using H2 database for ngrinder. you can easily acess H2 using H2-console or CLI.

1. H2-Console

  1. Dowlonad H2.zip from here and unzip
  2. Run {unziped folder}/bin/h2.sh
  3. Access http://{Input_your_host_ip}:8082/ in browser
  4. Enter database information

2. H2 CLI

  1. Dowlonad H2.zip from here and unzip
  2. Run java -cp {unziped folder}/bin/h2-<VERSION HERE>.jar org.h2.tools.Shell
  3. Enter database information
Welcome to H2 Shell 1.4.199
Exit with Ctrl+C
[Enter]   jdbc:h2:file:{Input_ngrinder_home_path}/db/h2
URL
[Enter]   org.h2.Driver
Driver
[Enter]   admin
User
[Enter]   admin
Password
Connected
Commands are case insensitive; SQL statements end with ';'
help or ?      Display this help
list           Toggle result list / stack trace mode
maxwidth       Set maximum column width (default is 100)
autocommit     Enable or disable autocommit
history        Show the last 20 statements
quit or exit   Close the connection and exit

sql>
Clone this wiki locally