MongoDB Connections
TablePro supports MongoDB 5.0 and later. Collections appear as tables in the sidebar. Documents display with fields as columns, and nested objects render as formatted JSON.Quick Setup
1
Create Connection
Click New Connection, select MongoDB, enter host/port/username/password/database, and click Create
2
Test Connection
Click Test Connection to verify
Connection Settings
Advanced (Optional): Configure Read Preference (primary, secondary, nearest) and Write Concern (majority for stronger durability) for replica sets.


MongoDB connection form
Replica Sets
The Hosts field accepts multiplehost:port pairs separated by commas (for example host1:27017,host2:27017,host3:27017). TablePro discovers the primary automatically and routes writes there.
Set the replica set name in the Advanced tab.
You can also paste a multi-host URI directly:
SSH tunneling only forwards the first host. Other members must be reachable from the SSH server.
Example Configurations
Local: hostlocalhost:27017, no auth, database myapp
Docker: host localhost:27017 (or mapped port), password from MONGO_INITDB_ROOT_PASSWORD env, auth DB admin
MongoDB Atlas: Enable SSL/TLS in connection form
Remote: Use SSH tunneling for secure access
SSL/TLS
The MongoDB driver has no TLS fallback. Preferred behaves the same as Required (the SSL pane shows a warning). MongoDB Atlas requires TLS, so use Required or Verify CA. For unencrypted local instances, use Disabled or SSH tunneling. See SSL/TLS for details.Connection URL
mongodb+srv:// scheme resolves hosts through DNS SRV records and does not allow a port. If you paste an SRV URL that includes one (for example cluster.mongodb.net:27017), TablePro strips it before connecting. The plain mongodb:// scheme keeps any port you provide.
See Connection URL Reference for all parameters.
Features
Collection Browsing: Sidebar shows all collections. Click to view documents in data grid. Document Viewing: Top-level fields as columns, nested objects as formatted JSON, arrays as JSON arrays, ObjectIds as strings, BSON types formatted appropriately. Schema inferred by sampling. Collection Duplication: Open Create Table, click Duplicate, select source collection. Usesaggregate with $out, recreates indexes. Result named originalName_copy.
MongoDB Shell Queries (MQL syntax):
insertOne()/insertMany(), update with updateOne()/updateMany(), delete with deleteOne()/deleteMany().
Troubleshooting
Connection refused: Check MongoDB is running (brew services start mongodb-community), verify host/port in mongod.conf, check bindIp setting.
Auth failed: Verify username/password/auth database. Check user roles with db.getUsers(); Create user with db.createUser({user:"appuser", pwd:"password", roles:[{role:"readWrite", db:"myapp"}]})
Timeout: Verify host/port, check network and firewall, whitelist IP in MongoDB Atlas.
Limitations: Transactions need replica set/sharded cluster, schema inferred by sampling, capped collections restricted, GridFS not browsable, change streams unsupported.
Performance: Use filters, limit(), pagination, indexes. Analyze with explain("executionStats").