1. Server mode:
Start server: java -cp hsqldb.jar org.hsqldb.Server -database.0 file:mydb -dbname.0 xdb
URL -> jdbc:hsqldb:hsql://localhost/xdb
Connect through SQL tool: java -jar hsqldb.jar server
Please note that when connect hsqldb using SQL tool, it will read sqltool.rc to get your connect url, username and password. The following is a sample sqltool.rc:
urlid server
url jdbc:hsqldb:hsql://localhost/xdb
username sa
password
2. Memory-Only mode:
URL -> jdbc:hsqldb:mem:aname