Getting the error for create user

What is the issue in it please let me know

‘db.createUser(
{ user: “m103-application-user”,
pwd: “m103-application-pass”,
roles: [ { db: “applicationData”, role: “readWrite” } ]
}
)’

when i hit enter i am getting this error:

$‘db.createUser(\n{ user: “m103-application-user”,\npwd: “m103-application-pass”,\nroles: [ { db: “applicationData”, role: “readWrite” } ]\n}\n)’: command not found

and when click on run test getting this error:

3 total, 0 passed, 0 skipped:
[FAIL] “The user m103-application-user was created on the admin database”

Did you create the ‘m103-application-user’ on the admin database?

[FAIL] “The user m103-application-user has the correct permissions”

Did you create the ‘m103-application-user’ with the readWrite role on the
applicationData database?

[FAIL] “The user m103-application-user has the correct password”

Did you create the ‘m103-application-user’ with the password
‘m103-application-pass’?

Please help

Hi!

Checklist

  1. Are you running this inside the mongo shell?
  2. Make sure quotes are straight " type them by hand.
  3. Remember to use the admin db too. use admin

This command is a mongo shell command. You must connect to a mongod or mongos to run it.

Hi @rajesh_50804,

I hope you found @steevej-1495’s and @Santiago_Miranda’s comment helpful and you were able to resolve the issue.

Let us know if you are still facing this issue.