ยง2024-06-02
-
set up
-
check with dig +short
alexlai@YuShei-Parking-System-API:~$ dig dig +short _mongodb._tcp.ys20220318.yushei.com.tw SRV
0 0 27017 redisMongo05.yushei.com.tw.
0 0 27017 redisMongo03.yushei.com.tw.
- test connect with mongosh
ys20230318 replicationSet is in version v5.0.8 The mongodb+srv connection string format is supported starting from MongoDB version 3.6. T
alexlai@n2Bookworm:~$ mongosh "mongodb+srv://siteRootAdmin:b23258585@ys20220318.yushei.com.tw/YuSheiDB?replicaSet=ys20220318&authSource=admin&tls=false"
Current Mongosh Log ID: 665bdd6cfe31b5f3678db5fa
Connecting to: mongodb+srv://<credentials>@ys20220318.yushei.com.tw/YuSheiDB?replicaSet=ys20220318&authSource=admin&tls=false&appName=mongosh+2.2.6
Using MongoDB: 5.0.8
Using Mongosh: 2.2.6
For mongosh info see: https://docs.mongodb.com/mongodb-shell/
------
The server generated these startup warnings when booting
2024-05-09T17:37:42.790+08:00: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine. See http://dochub.mongodb.org/core/prodnotes-filesystem
------
- cretae a capped collection
const uri = "mongodb://siteRootAdmin:b23258585@x8664Arch.yushei.com.tw:27017,hc4Jammy.yushei.com.tw:27017,n2Jammy.yushei.com.tw:27017/YuSheiDBTest?replicaSet=odroid01&authSource=admin";