ApsaraDB for MongoDB supports the following database versions: 3.2, 3.4, 4.0, and 4.2. We recommend that you use drivers running the same database version as the ApsaraDB for MongoDB instance to access it. You can download drivers in different languages from the MongoDB official website.
Note For more information about differences between the database versions, see MongoDB versions and storage engines.

How do I view the database version of an ApsaraDB for MongoDB instance?

  1. You can connect to a replica set instance by using the mongo shell. For more information, see Connect to a replica set instance by using the mongo shell.
  2. Run the following command to view the database version:
    db.version()
    The command output shows that the database version is 4.0.0.
    mgset-12xxxx:PRIMARY> db.version()
    4.0.0

References

Upgrade the database version of an ApsaraDB for MongoDB instance