./mongo
use db1
db.auth("u1","p1")
show users
查看用户信息时,提示not authorized on admin to execute command
解决方法:
关闭认证,需要修改配置文件mongodb.conf,设置auth=false,同时注释掉keyFile属性,然后重启mongodb
./mongo
use db1
db.auth("u1","p1")
show users
查看用户信息时,提示not authorized on admin to execute command
解决方法:
关闭认证,需要修改配置文件mongodb.conf,设置auth=false,同时注释掉keyFile属性,然后重启mongodb