Upgrade mongoDB Server From 4.0.19 To 4.2.8
Upgrade mongoDB Server From 4.0.19 To 4.2.8
4.0 Hands-on
RAVINDRA MALWAL
Topic: Upgrade mongoDB server from 4.0.19 to 4.2.8
In this QuickStart, we learn how to:
https://www.mongodb.com/try/download/enterprise
PATH=$PATH:$HOME/.local/bin:$HOME/bin
export PATH=/u02/mongoDB/4.2.8/mongodb-linux-x86_64-rhel62-
4.2.8/bin:$PATH
export MONGO_HOME=/u02/mongoDB/4.2.8/mongodb-linux-x86_64-rhel62-4.2.8
export PATH
[mongod@localhost ~]$
4] Enable the 4.2 features, set the feature compatibility version (FCV) to 4.2
- Login to database
-
[mongod@localhost appdb]$ mongo --host "127.0.0.1:27017" -u "admin" -p
"Admin1234" --authenticationDatabase "admin"
MongoDB shell version v4.2.8
connecting to:
mongodb://127.0.0.1:27017/?authSource=admin&compressors=disabled&gssap
iServiceName=mongodb
Implicit session: session { "id" : UUID("09d49e25-fccb-489a-85ad-
aafb8dae248d") }
MongoDB server version: 4.2.8
>
> use admin
switched to db admin
> db.adminCommand( { setFeatureCompatibilityVersion: "4.2" } )
{ "ok" : 1 }
>
>
> db.adminCommand( { getParameter: 1, featureCompatibilityVersion: 1 }
)
5] Validation:
> db.version()
4.2.8
>