

Authorization allows a user to have specific access to a resource. View the SQL Mapping reference to see how the MongoSQL syntax and commands map to MongoDB's commands.Īll MongoSQL queries are SELECT statements of this form: SELECT expr1 alias1], expr2 alias2]. You need to get an idea of what is authentication and authorization in MongoDB. Login as admin, create user what can readWrite ONLY test -db, authenticate with that user, check can use list admin database collections and what this user can do with test database. Let's create mongodb instance with -auth. The MongoSQL Query Syntax is designed to allow the use of SQL-like statements to query the structured data documents of MongoDB. use products db.grantRolesToUser('productsUser', 'readWrite' ) grantRolesToUser documentation. When specifying collection_name, if the collection is in a different database than the current database, you can use the syntax db.collection_name. In this document, keywords such as SELECT are capitalized for illustration purposes. When creating a user nosqlprotocol accepts all roles as predefined by MongoDB, but not all of them are translated into GRANT privileges.

See the SQL Mapping page for how Aqua Data Studio's syntax maps to MongoDB Query syntax ( ). This document details Aqua Data Studio's MongoSQL syntax and functions.

MongoSQL queries are written using a subset of the SQL-92 standard. To grant roles to a user, you must have the grantRole action on the roles.
