MongoDB 版本号查询

--通过命令查看:

# mongo --version
Percona Server for MongoDB shell version v3.6.7-1.5
git version: f4cbafeaa1be7aa014838178f61de5a44a850cfe
OpenSSL version: OpenSSL 1.0.2k-fips  26 Jan 2017
allocator: tcmalloc
modules: none
build environment:
    distarch: x86_64
    target_arch: x86_64

# /usr/local/mongodb/bin/mongo --version
MongoDB shell version v4.0.2
git version: fc1573ba18aee42f97a3bb13b67af7d837826b47
OpenSSL version: OpenSSL 1.0.1e-fips 11 Feb 2013
allocator: tcmalloc
modules: none
build environment:
    distmod: rhel70
    distarch: x86_64
    target_arch: x86_64

--登录到数据库查看:
> db.version()
3.6.7-1.5

> db.version()
4.0.2

 

你可能感兴趣的:(MongoDB)