当前位置:网站首页>Teach you how to view version information with mongodb

Teach you how to view version information with mongodb

2022-06-24 15:33:00 PHP Development Engineer

This article mainly introduces about MongoDB How to view information about version information , In this paper, the example code is introduced in detail , It has certain reference learning value for everyone's study or work , Friends in need, let's study together with Xiaobian

1: Connect to MongoDB, Use see .

> db.version();
4.0.0
>

2:mongo see

Relative path usage 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 absolute path

# /usr/local/mongodb/bin/mongo --version

3: Use mongod see

# ./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 mongo And mongod The difference between

mongod Is dealing with MongoDB The main process of the system . It processes data requests , Manage data storage , And perform background management operations . When we run mongod Command means starting MongoDB process , And run it in the background .

mongo Is a command line tool for connecting to a specific mongod example . When we don't run with parameters mongo Command it will use the default port number and localhost Connect

This is about MongoDB This concludes the article on how to view version information

Original address :

come from “ Open source world ” , link :http://ym.baisou.ltd/?id=488, If you want to reprint , Please indicate the source , Otherwise, the legal liability will be investigated .

原网站

版权声明
本文为[PHP Development Engineer ]所创,转载请带上原文链接,感谢
https://yzsam.com/2021/05/20210511192758789r.html