赞
踩
$ docker run -itd --name mongo -p 27017:27017 mongo --auth
$ docker exec -it mongo mongo admin
db.createUser({ user: "useradmin", pwd: "adminpassword", roles: [{ role: "userAdminAnyDatabase", db: "admin" }] })
db.createUser({ user: "useradmin", pwd: "adminpassword", roles: [{ role: "readWrite", db: "goods" }] })
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。