MongoDB
- docker安装
安装参考官网
docker pull mongodb/mongodb-enterprise-server:6.0.5-ubi8
docker run --name mongodb-server -p 27017:27017 \
-e MONGO_INITDB_ROOT_USERNAME=username \
-e MONGO_INITDB_ROOT_PASSWORD=password \
-d mongodb/mongodb-enterprise-server:6.0.5-ubi8 --wiredTigerCacheSizeGB 1
- 连接
mongosh ip:27017 -u username -p password
- 使用
db.people.insertOne( {
user_id: "abc123",
age: 55,
status: "A"
} )