Getting [FAIL] "The username is m001-student" even though username is m001-student in db

Test Result
2 total, 1 passed, 0 skipped:
[PASS] “Successfully connected to the Atlas Cluster”
[FAIL] “The username is m001-student”

I ran following on terminal to confirm user.

db.runCommand({connectionStatus: 1})
authInfo: {
authenticatedUsers: [ { user: ‘m001-student’, db: ‘admin’ } ],
authenticatedUserRoles: [ { role: ‘readWriteAnyDatabase’, db: ‘admin’ } ]

1 Like

Hi @Madhav_Jha

Welcome to the MongoDB Community Forums! :four_leaf_clover:

This problem usually comes from the fact that you are using mongosh rather than mongo in the terminal.

Kindly try using mongo. It will work as expected.



Thank you Satyam. It worked.

1 Like