MongoDB在Docker容器中连接方法

操作步骤

I have no name!@mongodb-ya-test1-6584bc44bf-cvfzr:/$ mongo
MongoDB shell version v4.0.3
connecting to: mongodb://127.0.0.1:27017
Implicit session: session { "id" : UUID("2cdf6cd1-080b-4a57-9f65-f9e02c5f1abe") }
MongoDB server version: 4.0.3
Welcome to the MongoDB shell.
> use mj_log
switched to db mj_log
> db.auth("mj_log",'aawRdslmS61A94gs')
1
> show tables;
logEntity
> db.logEntity.find()
......

你可能感兴趣的:(MongoDB在Docker容器中连接方法)