Use Psql in Windows to Connect to an ObjectRocket Instance
In this article you will learn how to connect PostgreSQL on Windows to the ObjectRocket instance using the SQL Shell (psql). We’ll cover step by step how to use psql on Windows to connect to an ObjectRocket database.
You will need to setup an instance of PostgreSQL on your ObjectRocket account.
Install PostgreSQL in Windows
In Windows you can download PostgreSQL from the website. You will have to download and install the version 11 or 12 of PostgreSQL depending on the version you specified on your instance of PostgreSQL in ObjectRocket.
Connect to an ObjectRocket Instance
After you installed PostgreSQL on your local device, open the SQL Shell (psql) to make a connection to your ObjectRocket instance of PostgreSQL. It will open a terminal where you will need to specify the server host name, database name, port, username and password.
When you open the PostgreSQL shell it will ask for the host name of the server. You can get the host name “ingress” on the “connect” tab.
The default database that you can connect to on your ObjectRocket instance is
postgres. You can create a new database when you are already connected to the psql. You can connect to the new database using the command
The port is a 4-digit number and you can find your port number in the “connect” tab beside the ingress host.
Use the username that you used when you created the ObjectRocket instance. You can create multiple usernames in one ObjectRocket instance and specify if it is an admin or not. The default user is
postgres which is an admin user for PostgreSQL.
Use the password you specified for each user when you created the PostgreSQL instance in ObjectRocket.
Example of connection
Now let’s run through an example so you can see how to connect to a PostgreSQL instance in ObjectRocket. For our example, we will use the host domain
ingress.w98sujpz.launchpad.objectrocket.cloud, default database
4144, the user
orkb and the password.
psql example will show how to connect to the ObjectRocket instance of PostgreSQL using the SQL Shell (psql).
Server [localhost]: ingress.w98sujpz.launchpad.objectrocket.cloud
Port : 4144
Username [postgres]: orkb
Password FOR USER orkb:
NOTE: The password is not visible when you are typing it as a part of the security, so you should make sure that you are typing the right password.
We are now connected to the ObjectRocket instance of PostgreSQL.
Now that you have access on the instance, you can now create a database. Using the
CREATE DATABASE statement, you can create a new database for the PostgreSQL.
The following statement will create a new database name
CREATE DATABASE objrkt;
To connect to the database, use the command
\c plus the name of the database. See the following:
To list the database you have on you database, you can use the following:
List OF DATABASES
Name | Owner | Encoding | COLLATE | Ctype | Access privileges
objrkt | orkb | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +
| | | | | postgres=CTc/postgres
template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +
| | | | | postgres=CTc/postgres
In this tutorial we’ve walked through how to connect to a PostgreSQL instance on ObjectRocket if you’re working on Windows. We also showed how to create a new database once you’re connected to that instance.
Pilot the ObjectRocket Platform Free!
Try Fully-Managed CockroachDB, Elasticsearch, MongoDB, PostgreSQL (Beta) or Redis.Get Started