进入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
Lucas M. -
Vivesh -
0xFedev -
Tristan Elliott -
Top comments (0)