In this tutorial, we’ll show you how to connect to ObjectRocket with Studio 3T, the GUI for MongoDB.
ObjectRocket is a Database-as-a-Service (DBaaS) platform that specializes in NoSQL databases. They’re one of the most trusted MongoDB hosting providers, committed to developing a cloud infrastructure capable of supporting reliable and scalable MongoDB database architectures (spoken like a true MongoDB user).
- Sign up for an ObjectRocket instance (ObjectRocket offers a 30-day free trial)
- Download our MongoDB GUI on your Windows, Mac, or Linux machine
Connect to ObjectRocket
Choose your MongoDB instance
To connect to ObjectRocket, you’ll first need to log into their web interface to gather the connection details.
- Sign in with your ObjectRocket account.
- You’ll see a list of your hosted instances. Click on your target instance, which is ObjectRocket in our example.
- A detailed overview of your instance will open up. You need to configure two key settings to ensure a seamless connection through a MongoDB GUI like Studio 3T, namely Add ACL and Databases.
Add an ACL
ACL stands for Access Control List, which limits the IPs that can connect to your instance.
- Click on the Add ACL button, or click on the Security tab then choose Add ACL.
- Configure your ACL settings. MyIP limits the connection to your own IP address. Use this only if you have a static IP address!AnyIP allows access to any IP address, which is ideal if you have a dynamic IP address. Use this only when dealing with test databases, and make sure to update your settings when working on production databases!
- Click Add ACL Entry. You should see the ACL immediately.
Add a database and user
You need to have a database and a user set up so that you can connect to Studio 3T.
- Click on the Databases tab. This will open up an overview of your databases.
If you haven’t set up a database, follow these steps on how to add a database and user.
- Click on your target database, which is marine_mammals in our example.
- Click on the Users tab. You should already have an existing user from Step 1, but click on Add User to create another if needed. Fill out the fields and click Add Database User.
Now that you’ve added an ACL and ensured you have a working database and user, you’re ready to copy your connection details.
Copy your connection details
- While on Database view, switch over to the Connect tab.
- Go to the section called MongoURI. Here you will find the exact MongoDB URI you’ll paste into Studio 3T. You’ll also notice that the connection snippet contains placeholder texts (e.g. YOUR_USERNAME, YOUR_PASSWORD) – these can be easily modified later.
- Copy the snippet. Now we’re ready to head to Studio 3T!
Studio 3T’s Connection Manager
Connect via MongoDB URI
- Open Studio 3T and click on Connect.
- Choose New Connection.
- Click on From URI – this will open up the Import URI window.
- Paste the connection snippet from ObjectRocket and click OK.
Now it’s time to modify the placeholder texts.
- Click on the Authentication tab to modify your username and password.
- Enter a name for the connection.
- Click Save.
- Click Connect.
Creating a MongoDB database
Studio 3T makes it easy to create a database directly within the GUI: right-click on a server, click Add Database, and done.
Creating a MongoDB user
Similar to creating a database, you also need to create all database users through ObjectRocket’s web interface.
Creating a user on Studio 3T throws this authorization error:
Showing MongoDB databases
Executing a simple show.dbs command on Studio 3T’s IntelliShell will also not work because of missing authentication:
You can view a list of databases on ObjectRocket’s web interface, under the Databases tab.