ApsaraDB for MongoDB supports the following database versions:MongoDB 4.2, 4.0, and 3.4. 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. 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()

References

Upgrade MongoDB versions