First Connection
Learn how to connect to your first MongoDB database.
Overview
Sutido supports connecting to MongoDB databases in several ways: using a connection string (URI), configuring settings manually, or connecting through an SSH tunnel for remote databases.
Quick Connect with URI
The fastest way to connect is using a MongoDB connection string:
- Click "New Connection" in the connection panel
- Select the "URI" tab
- Paste your MongoDB connection string
- Click "Test Connection" to verify
- Give your connection a name
- Click "Save"
Example Connection Strings
# Local MongoDB
mongodb://localhost:27017
# With authentication
mongodb://username:password@localhost:27017/mydb
# MongoDB Atlas
mongodb+srv://user:pass@cluster.mongodb.net/mydb
# Replica set
mongodb://host1:27017,host2:27017,host3:27017/?replicaSet=myRS Manual Configuration
For more control, configure your connection manually:
Basic Settings
- Connection Name: A friendly name for this connection
- Host: The server hostname or IP address
- Port: MongoDB port (default: 27017)
Authentication
Sutido supports these authentication methods:
- None: No authentication (local development)
- SCRAM-SHA-256: Modern password authentication (recommended)
- SCRAM-SHA-1: Legacy password authentication
For authenticated connections, provide:
- Username: Your MongoDB username
- Password: Your MongoDB password
- Auth Database: The database containing user credentials (usually "admin")
Security Note: Your password is stored securely in your operating system's keychain, not in a plain text file.
Replica Set Configuration
To connect to a replica set:
- Select "Replica Set" as the connection type
- Add all replica set members (host:port)
- Specify the replica set name
- Choose your read preference
Read Preferences
| Preference | Description |
|---|---|
| Primary | Always read from the primary node |
| Primary Preferred | Prefer primary, fallback to secondary |
| Secondary | Always read from secondary nodes |
| Secondary Preferred | Prefer secondary, fallback to primary |
| Nearest | Read from the node with lowest latency |
Testing Your Connection
Always test your connection before saving. Click "Test Connection" to verify that Sutido can reach your database with the provided settings. If the test fails, check:
- Network connectivity to the MongoDB server
- Firewall rules allowing traffic on the MongoDB port
- Username and password are correct
- The auth database is specified correctly
Managing Connections
Your saved connections appear in the left panel. You can:
- Connect: Double-click or click the connect button
- Edit: Right-click and select "Edit"
- Delete: Right-click and select "Delete"
- Duplicate: Right-click and select "Duplicate"
Next Steps
Once connected, explore the interface overview to learn your way around Sutido.