MongoDB How to view version information in detail
- 2021-01-19 22:31:19
- OfStack
In summary 1, how to view MongoDB version information
1: Connect to MongoDB and use the command to view.
> db.version();
4.0.0
>
2: mongo command to view
The relative path uses the mongo command
# ./mongo --version
MongoDB shell version v4.0.0
git version: 3b07af3d4f471ae89e8186d33bbb1d5259597d51
OpenSSL version: OpenSSL 1.0.1e-fips 11 Feb 2013
allocator: tcmalloc
modules: none
build environment:
distmod: rhel62
distarch: x86_64
target_arch: x86_64
Or use an absolute path
# /usr/local/mongodb/bin/mongo --version
3: Use mongod to view
# ./mongod --version
db version v4.0.0
git version: 3b07af3d4f471ae89e8186d33bbb1d5259597d51
OpenSSL version: OpenSSL 1.0.1e-fips 11 Feb 2013
allocator: tcmalloc
modules: none
build environment:
distmod: rhel62
distarch: x86_64
target_arch: x86_64
About the difference between mongo and mongod
mongod is the main process that handles MongoDB systems. It handles data requests, manages data stores, and performs back-end administrative operations. When we run the mongod command, it means we are starting the MongoDB process and running it in the background.
ES32en is a command-line utility used to connect to a specific instance of ES33en. When we run the mongo command with no arguments it will use the default port number and localhost connection
conclusion