进入mongodb容器:
docker exec -it mongodb bash
连接数据库:
进入bin文件夹然后执行mongosh db_name -u ... -p ...
创建root用户:
db.createUser({ 'user' : 'root', 'pwd' : '123123', 'roles':[ {role:'root',db:'admin'} ]})
进入mongodb容器: docker exec -it mongodb bash
连接数据库:
进入bin文件夹然后执行mongosh db_name -u ... -p ...
创建root用户:
db.createUser({ 'user' : 'root', 'pwd' : '123123', 'roles':[ {role:'root',db:'admin'} ]})
For further actions, you may consider blocking this person and/or reporting abuse
Bleuio tech -
James -
Mike Young -
Mike Young -
Top comments (0)