How to access NuoDB running in Docker via GUI?
In order to access NuoDB running in Docker via GUI you need to use some sort of universal GUI SQL database management and analysis tool as your SQL workbench or IDE, and there are some configurations required for that:
- NuoDB TE container — Transaction Engine (TE) handles SQL queries, in this example it is simpler to connect to it directly, rather than via an Admin Process. Use
-pflag as highlighted in bold in the example below. This creates a firewall rule which maps a container port to a port on the Docker host to the outside world to enable you to access the TE directly.
docker run -d --name test-te-1 \
--hostname test-te-1 \
--network nuodb-net \
--publish 48006:48006 \
nuodb/nuodb-ce:latest nuodocker \
--api-server nuoadmin1:8888 \
start te --db-name test \
--server-id nuoadmin1 \
--labels "te te1"
- SQL client — Download and install your preferred SQL client like DbVisualizer, DBeaver, SQuirreL SQL Client that works out of the box, or any other SQL client that could allow you to specify your own JDBC driver.
- Connect to NuoDB — Use the wizard in your SQL client to choose "NuoDB" Java driver and insert your settings including the port (48006 in this example), then add a new driver property parameter
directwith a value of
true. By adding this property, the client uses the TE directly and does not expect to be given a connection URL by an Admin Process.