The default port number used by HSQLDB is 9001. This port is used for client-server communication when running the HSQLDB server in server mode. If you start the server without specifying a port number, it will use port 9001 by default.
However, it's important to note that you can configure the port number when starting the HSQLDB server using the
--port
option. For example, you can start the server on a different port like 1234 by running the following command:
java -cp path/to/hsqldb.jar org.hsqldb.server.Server --database.0 file:mydatabase --dbname.0 mydatabase --port 1234?
In this command, replace
path/to/hsqldb.jar
with the actual path to the HSQLDB JAR file, and replace
mydatabase
with the name of your database. The
--port
option specifies the port number to use for client-server communication.
If you're using HSQLDB in embedded mode within your Java application, you don't need to worry about port numbers, as the database runs within the same JVM as your application and communicates internally without using network ports.