I start a new mongo instance, create a user, authorize it, but when I run \"show collections\", the system says that the id is not authorized. I do not know why?
I had the same problem and this is how I solved it:
db = db.getSiblingDB('admin') db.addUser( { user: "mongoadmin", pwd: "adminpass", roles: ['clusterAdmin', 'userAdminAnyDatabase', 'readAnyDatabase'] } )