Authentication Database
- Last Updated: July 30, 2025
- 1 minute read
- DataDirect Connectors
- ODBC
- MongoDB 8.0
- Documentation
Attribute
AuthenticationDatabase (adb)
Purpose
Specifies the database in which your user ID was created. In MongoDB, you can create the same user ID in different databases with unique permissions. This option ensures that the driver authenticates with the correct version of the user ID when using user ID and password authentication (AuthenticationMethod=userIdPassword).
Valid Values
string
where:
string
is the name of the database in which your user ID was created.
Notes
-
AuthenticationDatabase is used only for user ID and password authentication (
AuthenticationMethod=userIdPassword). To ensure the correct permissions are used for your connection, it's recommended that you specify a value for AuthenticationDatabase when user ID and password authentication is enabled. -
If you do not specify a value for this option, the driver attempts to use your user ID with the database specified by the Databasename option. If your user ID was not created in the specified database, the driver will attempt to connect to the Admin database using your user ID and password.
Default Value
No default value