Robo 3T (formerly Robomongo) is a popular desktop graphical user interface (GUI) for your MongoDB hosting deployments that allows you to interact with your data through visual indicators instead of a text-based interface. This open source tool has cross-platform support and actually embeds the mongo shell within its interface to provide both shell and GUI-based interaction.
As a highly-popular GUI leveraged by our MongoDB hosting customers, we're providing this tutorial on how to quickly connect your ScaleGrid deployment with Robo 3T.
Identify Client Machine
The first thing we need to do is identify a machine to install Robo 3T. You can either create a new instance, or pick an existing instance which has access to the ScaleGrid MongoDB cluster you'd like to connect to. For new ScaleGrid users, create a free 30-day trial account and set up your first MongoDB cluster (Robo 3T supported on all plans).
- For our MongoDB Bring Your Own Cloud (BYOC) AWS deployments that are not open to the internet, this may mean selecting an instance that is allowed to connect to the Security Group and also has VPN connectivity to the Virtual Private Cloud (VPC).
- For AWS customers who have their deployments open to the internet, this will involve adding the identified machine's IP address to the ScaleGrid cluster's whitelist.
Install Robo 3T
Robo 3T is available for download here. It's very important to check your ScaleGrid deployment to ensure you install the Robo 3T version that supports the deployment's current MongoDB version, and you can check this link for more information on Robo 3T's supported platforms. The latest version of Robo 3T at the time of writing this is 1.2, which supports MongoDB versions up to 3.4.
Create Robo 3T User on MongoDB
We do not recommend connecting to your MongoDB deployment using the "admin" user that ScaleGrid provides by default. Instead, create a new user with appropriate permissions for client access. The roles that you choose to assign to the user will depend on your exact use-case.
In order to create simple, per-database, read-write or read-only users, log into the ScaleGrid console, navigate to the cluster details page, and click on the Databases tab:
Click on the Manage button beside the database you want to create the user on, and then select the Users tab:
You can also use the ScaleGrid web-shell available on the Admin tab to create such users. For this example, I will create a new user who has read-write access to any database on the cluster:
With the prerequisites in place, we can now go to the Robo 3T GUI to continue to connect to our database deployment.
Connecting to a Standalone MongoDB Deployment
You will need the database server name and port to start, which can be found in your Connection String on your MongoDB cluster details page in the console:
Connection String: mongodb://admin:
- Server Name: SG-example-1234.servers.mongodirector.com
- Port: 27017
Setting Up a New Connection on Robo 3T
Launch Robo 3T and open the 'Manage Connections' window:
Click on 'Create' to setup a new connection.
Standalone Connection Settings
In the Connection tab, select Direct Connection as the 'Type', give the connection a name, and enter the server name and port picked from the Connection String found in your ScaleGrid MongoDB cluster details page in the 'Address' and 'Port' fields:
In the Authentication tab, enter the Database as 'admin' (or whatever database you have created your MongoDB user on). Then, enter your user credentials in the remaining fields:
If SSL is enabled on your MongoDB cluster, then additional configuration is required on the SSL tab which can be setup as shown below. By default, ScaleGrid provides self-signed certificates, however you have the option to bring your own SSL certificates or ask us to buy them on your behalf:
You are now set! Click on 'Test' to test the connection. Robo 3T should be able to connect successfully.
Save the connection, then double click on it, and you will see your database.
Connecting to a MongoDB Replica Set Deployment
Connecting your ScaleGrid MongoDB replica set to Robo 3T is similar to connecting a standalone deployment. Most of the settings are the same, except instead of specifying a single server name, we need to specify a list of server names. The list can be created from the Connection String.
If your connection string looks like:
then, your list of server and ports would be:
And the replica set name is: 'RS-example-0'.
Setup a New Replica Set Connection on Robo 3T
Like before, launch Robo 3T and open the 'Manage Connections' window. Then click on 'Create' to setup a new connection.
Replica Set Connection Settings
Select Type as 'Replica Set', type in a name, and then enter your server names as found by the example above. Your replica set name can also be entered:
The configuration on the Authentication and SSL tabs are identical to the standalone configuration.
Once setup, click on 'Test' to verify connectivity and then double click on the connection to establish a connection.
If you’ve completed all of the above steps for either a MongoDB standalone or a replica set deployment and your connections aren't working, here are a few to things to try out:
- Ensure you can connect from the client machine to the MongoDB server using mongo shell. The syntax for connection is available on the ScaleGrid MongoDB cluster details page in the Overview tab under the heading 'Command Line String'.
- Ensure that the MongoDB version is supported by the Robo 3T you are using.
- Ensure that the credentials you're using to connect are correct.
- Check if the deployment has SSL enabled and you have configured it correctly.
If you have any issues, get in touch with us at email@example.com and we would be happy to help you out!