Secure MongoDB data and prevent accidental writes or unintended modifications with Read-Only Mode, which can be set for a specific collection or an entire connection. Read-Only Mode can be useful when working with data, especially during critical operations. Ready to get started and protect your MongoDB collection data?
Try Studio 3T for freeSet a MongoDB collection to read-only
- Open a collection from the Connection Tree.
This opens a Collection Tab.
- In the Result tab toolbar, click on the Lock icon.
This prevents you from modifying MongoDB documents in all three views (Table, Tree, and JSON View).
![Read-only mode for MongoDB document fields and collections in Studio 3T](https://studio3t.com/wp-content/uploads/2024/07/mongodb-read-only-mode-fields-1024x621.jpg)
Set a MongoDB connection to read-only
- Open a MongoDB connection – new or existing – using the Connection Manager.
- On the New Connection dialog or the Edit Connection dialog, select Read-Only Lock on the Server tab.
![Set a MongoDB connection to read-only mode in Studio 3T](https://studio3t.com/wp-content/uploads/2024/07/read-only-lock-mongodb-connection-880x1024.png)
This article was originally published by Kathryn Vargas and has since been updated.