've just installed mongodb on Ubuntu
Started it, now trying to create new user:
use mydb
db.createUser({user: "testuser", pwd: "testPwd", roles: ["readWrite"])
Here is response.
Three dots. Nothing happens. What am I doing wrong?
Started it, now trying to create new user:
use mydb
db.createUser({user: "testuser", pwd: "testPwd", roles: ["readWrite"])
Here is response.
Three dots. Nothing happens. What am I doing wrong?
The three dots means that the shell is waiting for you to finish up your command. In this case you've forgotten to close the JSON document (you're missing the closing } character. Your command should be as follows:
use mydb
db.createUser({user: "testuser", pwd: "testPwd", roles: ["readWrite"]})
Give that a go and your user should be created.db.createUser({user: "testuser", pwd: "testPwd", roles: ["readWrite"]})
Oh, right. Just a typo. Thank you very much!
댓글 없음:
댓글 쓰기