init start-h2
The init start-h2
subcommand starts the in-memory H2 database included in the Liquibase installation package to get started and test how Liquibase works.
If you run the liquibase init project
command, you can use H2 only with one of the following options:
- Creating the Liquibase project with the default values [Y].
- Customizing the values [C] but keeping the default URL, username, and password.
The H2 database console opens automatically in a browser on port 9090 and requires a new command line or terminal window.
Syntax
To start the H2 database, open a new terminal window and run the following command:
liquibase init start-h2
To continue running commands, use another terminal window.
Command arguments
Note: Syntax for each parameter is specified in kebab-case
(CLI and flow file), camelCase
(properties file and JAVA_OPTS
), and ENVAR_CASE
(environment variable).
Tip: For best results, specify all commands and parameters in the --kebab-case
format in the CLI. If your preference is camelCase, it also works in the CLI.
Attribute | Definition | Requirements |
---|---|---|
|
Network address to bind to. Default: |
Optional |
|
Port to run h2 database on. Default: |
Optional |
|
Whether to open a browser to the database's web interface. Default: |
Optional |
|
Password to use for created h2 user. Default: |
Optional |
|
Username to create in h2. Default: |
Optional |
|
Port to run h2's web interface on. Default: |
Optional |
Related links
For more information about using Liquibase and H2, see the following pages: