feat: add mongodb-replicaset/ & mysql/ & minio/

This commit is contained in:
Sun-ZhenXing
2025-09-24 00:06:13 +08:00
parent 619281e78a
commit 79ad907def
11 changed files with 156 additions and 2 deletions

View File

@@ -0,0 +1,22 @@
# MongoDB
```bash
docker exec -it mongodb-mongo1-1 mongosh
```
初始化副本集:
```js
use admin
db.auth('root', '$MONGO_ROOT_PASSWORD')
config = {
_id: "rs0",
members: [
{_id: 0, host: "192.168.31.38:27017"},
{_id: 1, host: "192.168.31.38:27018"},
{_id: 2, host: "192.168.31.38:27019"},
]
}
rs.initiate(config)
exit
```