I am following this tutorial
https://docs.nodebb.org/installing/os/windows/
I got thru most of it easily but when I go to login as an admin with this command:
mongo -u admin -p ojo --authenticationDatabase=admin
I get an error:
uncaught exception: SyntaxError: unexpected token: identifier :
@(shell):1:9
ojo is the password btw
the admin account was created and it shows up when you run show users
show users
{
"_id" : "admin.admin",
"userId" : UUID("e3c3df1d-f63d-48e3-ae65-b9cf03c86333"),
"user" : "admin",
"db" : "admin",
"roles" : [
{
"role" : "root",
"db" : "admin"
}
],
"mechanisms" : [
"SCRAM-SHA-1",
"SCRAM-SHA-256"
]
}
{
"_id" : "admin.admin2",
"userId" : UUID("0b87390b-2c08-4e21-9183-8a2406a9304e"),
"user" : "admin2",
"db" : "admin",
"roles" : [
{
"role" : "root",
"db" : "admin"
}
],
"mechanisms" : [
"SCRAM-SHA-1",
"SCRAM-SHA-256"
]
}
What am I doing incorrectly? Tried many attempts.
Don't open mongo shell and enter the connection string.
You have to enter the connection string (e.g., mongo mongodb+srv://m999student:[email protected]/testdb
) from the operating system command prompt
win + r
cmd