Rocto is the Remote Octo server. It is an implementation of the Postgres server, and receives SQL queries from any clients that can communicate with Postgres over the network. These queries are passed to Octo, which interacts with the database and passes results back through Rocto to the clients.
SQuirreL SQL is an open-source Java SQL Client program for any JDBC compliant database.
To connect Rocto to SQuirreL SQL:
Add a PostgreSQL JAR file as a driver to SQuirreL SQL.
Configure the PostgreSQL driver to use the provided JAR file. The URL format for PostgreSQL in SQuirreL SQL is
Put in the path to your JAR file (e.g.
~/user/postgresql-42.2.6-SNAPSHOT.jar) in the dialog box that pops up after clicking “Add” on the interface above.
Create an alias for your Rocto server, including the server IP address and port number. These can be configured for Rocto in the config file. For example,
Rocto requires the creation of a user name and password. Follow the directions given in the Octo Administration Guide to add a new user.
Use the user name and password created in the previous step with the newly created connection alias.
Rocto does not currently support SSL, so make sure to turn SSL off in the Properties menu when configuring an alias. (Click on Properties and then disable
Connect to Rocto: Execute rocto in your terminal and press the “Connect” button in SQuirreL SQL. Now you can execute SQL queries.
Suppose there is a table “names” with records in it:
CREATE TABLE names (id INTEGER PRIMARY KEY, firstName VARCHAR, lastName VARCHAR);
A simple query in SQuirreL SQL could be:
SELECT * FROM names;
To terminate the Rocto instance, you may use
CTRL+C. Note that the rocto instance may not exit immediately upon sending
CTRL+C if there are still active client connections. In that case, rocto will gracefully exit once all client connections are closed.
Mandatory arguments for long options are also mandatory for short options.
-a/--allowschemachangesoption is off by default and must be explicitly enabled since normal users will not need to change the schema. When using this option, implement security measures appropriate to the environment, e.g. network controls to restrict access to the listening TCP port to a specific host or subnet.
Allows Rocto to make changes to the schema (CREATE TABLE and DROP TABLE).
Octo looks for configuration files in default locations, e.g.
$ydb_dist/plugin/octo/octo.conf. If a configuration file is specified on the command line, this will override any configuration specified in files from the default locations.
Use specified configuration file instead of the default.
Display the help message and exit.
Listen on the specified port.
Specify amount of information to output when running commands specifying a numeric value from 0-5 or adding additional ‘v’ characters.
Display version information and exit.
Display release information and exit.