I have been using MLab and MongoAtlas successfully for a project I'm working on. Now I'm trying to migrate the DB to local storage so that the software can write and store data without needing internet access.
The problem has come up after the initial install on an rPi3B+ running openSuse Tumbleweed. I installed it, ran mongod
, then mongo
. Once in the shell I ran a few simple things like show dbs
without a problem.
Then I ran these two lines from this tutorial (for ubuntu 18.04): https://www.howtoforge.com/tutorial/install-mongodb-on-ubuntu/
sudo systemctl start mongodb
sudo systemctl enable mongodb
Note: the tutorial specifies mongod
but that didn't work until using mongodb
After this I run into an authorization problem when using show dbs
and db.createUser()
.
"errmsg" : "not authorized on admin to execute command { listDatabases: 1.0, $db: \"admin\" }",
"code" : 13,
"codeName" : "Unauthorized"
Even when running sudo mongo
to enter the shell this is still a problem. What about that tutorial changed my ability to use the shell? Also, what would be the better way to run mongo as a service on boot up?
Thanks!
mongo -u admin -p admin123 --authenticationDatabase admin
. Still can't figure out what's going on and am having trouble connecting to mongo locally. Went back to using atlas for the time being. – Eru Jan 21 at 4:42