Documentation
MongoDB
Connect TableR to MongoDB — Atlas SRV or a direct host — with connection discovery, auth source, replica set, SSL/TLS, connection strings, and troubleshooting.
MongoDB is a document database. TableR connects to a standalone server, a replica set, or Atlas; use the form fields or paste a MongoDB connection string.
Overview
TableR speaks the MongoDB wire protocol. Connection discovery can auto-detect the topology, use an SRV record (typical for Atlas), or connect directly to a host and port. Authentication is optional and can target a specific auth database.
- Standalone / replica set — connect on port 27017, optionally naming the replica set.
- Atlas — use an SRV connection (mongodb+srv) or paste the Atlas URI.
- Direct — connect to one host:port; use it for PrivateLink (pl-*.mongodb.net) or self-hosted servers.
Before you start
- A reachable MongoDB host, or an Atlas hostname / SRV URI.
- A username and password, if the deployment requires auth.
- The auth source database, if it is not admin.
- The replica set name, for a replica-set deployment.
- For Atlas / remote: network access and SSL/TLS.
Connection fields
These defaults match TableR's MongoDB connection form. Secrets are written to the operating system keyring, never to plain configuration files.
| Field | Required | Default | Notes |
|---|---|---|---|
| Host | Yes | 127.0.0.1 | Hostname, or an Atlas hostname. |
| Port | Yes | 27017 | MongoDB's default port (ignored for SRV). |
| Connection discovery | No | Auto-detect | Auto-detect, SRV (Atlas), or Direct (host:port). |
| Username | No | — | Optional; required when the deployment enforces auth. |
| Password | No | — | Optional; stored in the OS keyring. |
| Database | No | — | Optional default database. |
| Auth source | No | admin | The database that holds the user's credentials. |
| Replica set | No | — | Optional; the replica-set name. |
| SSL/TLS | No | Off | Supported; required by Atlas and most remote servers. |
Connect with the form
- 1Choose MongoDB
Open the launcher and pick the MongoDB card.
- 2Pick connection discovery
Auto-detect, SRV (Atlas), or Direct. Use Direct for PrivateLink (pl-*.mongodb.net) or self-hosted servers.
- 3Enter host and port
Use 127.0.0.1 and 27017 locally, or the Atlas hostname.
- 4Add credentials (optional)
Add username/password and the auth source when the deployment requires auth.
- 5Set database / replica set (optional)
Provide a default database and, for replica sets, the set name.
- 6Enable SSL/TLS for Atlas / remote
Turn on SSL/TLS for Atlas or any remote deployment.
- 7Save and connect
Save the profile so it reappears in the launcher, then connect.
Use a connection string
Instead of filling every field, you can paste a MongoDB connection string. Both mongodb:// and mongodb+srv:// (Atlas) schemes are accepted.
mongodb+srv://username:password@cluster.mongodb.net/?retryWrites=true&w=majority- Use mongodb+srv:// for Atlas, or mongodb://host:27017 for a direct or self-hosted server.
- Omit the password from the URI and let TableR store it in the keyring instead.
- Add authSource=admin (or your auth database) when the user lives outside the target database.
- URL-encode special characters in the password (for example @ becomes %40).
SSL/TLS
Local servers usually need no encryption. Atlas and most remote deployments require TLS — enable SSL/TLS, or include tls=true in the connection string.
- Off — no encryption (local or trusted networks only).
- On — TLS to the server (required by Atlas).
- SRV / Atlas connections use TLS by default.
Verify the connection
Once connected, open a query tab and run a couple of MongoDB commands:
db.runCommand({ ping: 1 })
db.version()ping should return { ok: 1 }, and db.version() prints the server version.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| Connection refused / timed out | Server not running, wrong host/port, or a firewall. | Confirm the server is reachable; for Atlas, allow your IP in the access list. |
| Authentication failed | Wrong credentials, or wrong auth source. | Re-check username/password and set the correct Auth source (often admin). |
| DNS / SRV lookup failed | Wrong SRV hostname or no DNS access. | Re-check the Atlas hostname, or switch discovery to Direct. |
| TLS required | Atlas or the server requires TLS. | Enable SSL/TLS, or add tls=true to the connection string. |