MongoDB Create User Erro
-
@PaigeLynn said in MongoDB Create User Erro:
db.createUser( { user: “admin”, pwd: “lllll111llll”, roles: [ { role: "root", db: “admin” } ] } )
Try using regular quotes around strings
"
and not“
-
Tried this
db.createUser( { user: ‘admin’, pwd: ‘redacted, roles: [ { role: ‘root’, db: ‘admin’ } ] } )
and get the same error
2019-08-11T20:49:18.702+0000 E QUERY [js] SyntaxError: illegal character @(shell):1:23
-
@PaigeLynn we're telling you to use actual quotation marks, not slanted ones
db.createUser( { user: "admin", pwd: "lllll111llll", roles: [ { role: "root", db: "admin" } ] } )
-
@PitaJ @baris do i change this IP to my AWS IP as I add authentication and I get this error message
MongoDB shell version v4.0.12 connecting to: mongodb://127.0.0.1:27017/?gssapiServiceName=mongodb 2019-08-11T21:06:18.005+0000 E QUERY [js] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed: SocketException: Error connecting to 127.0.0.1:27017 :: caused by :: Connection refused : connect@src/mongo/shell/mongo.js:344:17 @(connect):2:6 exception: connect failed
-
@PaigeLynn try connecting with the same information with the
mongo
cli -
@PitaJ just tried and I still get that error
2019-08-11T22:18:48.010+0000 E QUERY [js] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed: SocketException: Error connecting to 127.0.0.1:27017 :: caused by :: Connection refused : connect@src/mongo/shell/mongo.js:344:17
-
@PaigeLynn of you're getting the same error with the mongo cli then it's not NodeBB that's the problem and I can't help you.
Copyright © 2024 NodeBB | Contributors