h2db

How to change default port number (8082) of H2DB console application?


I want to use H2DB console application on Windows,Linux and AIX. Idea is to use console app provided by H2DB as database server and allow other services to use it for database access. The problem is the default port of 8082 which seems to always unavailable. How can I change this port? I am using downloads on this page http://www.h2database.com/html/download.html


Solution

  • You need to locate the .h2.server.properties file in your home directory, open it with some text editor and add or edit webPort setting in it.

    webPort=8888
    

    https://h2database.com/html/tutorial.html#console_settings

    There is no setting for TCP port in that file, you need to add -tcpPort 9999 to command-line arguments instead.