Navigation

Driver Compatibility

Note

The compatibility matrices show which versions of the driver are recommended for use with a given major release. Older driver versions may be able to connect to a version of MongoDB which is not recommended for that driver version; however, not all server features will be available.

C Driver Compatibility

MongoDB Compatibility

The following compatibility table specifies the recommended version(s) of the MongoDB C driver for use with a specific version of MongoDB.

The first column lists the driver version(s).

C Driver Version MongoDB 4.2 MongoDB 4.0 MongoDB 3.6 MongoDB 3.4 MongoDB 3.2 MongoDB 3.0 MongoDB 2.6
Version 1.15  
Version 1.14    
Version 1.13    
Version 1.12    
Version 1.11    
Version 1.10      
Version 1.9    
Version 1.8      
Version 1.7      
Version 1.6      
Version 1.5      
Version 1.4        
Version 1.3        
Version 1.2          
Version 1.1          
Version 1.0          

The driver does not support older versions of MongoDB.

Language Compatibility

The following compatibility table specifies the recommended version(s) of the MongoDB C driver for use with a specific version of C.

The first column lists the driver version(s).

C Driver Versions C11 C99 C89
All Versions

C++ Driver Compatibility

MongoDB Compatibility

The following compatibility table specifies the recommended version(s) of the MongoDB C++ driver for use with a specific version of MongoDB.

The first column lists the driver version(s).

C++ Driver Version MongoDB 4.2 MongoDB 4.0 MongoDB 3.6 MongoDB 3.4 MongoDB 3.2 MongoDB 3.0 MongoDB 2.6 MongoDB 2.4
mongocxx 3.5    
mongocxx 3.4      
mongocxx 3.3        
mongocxx 3.2      
mongocxx 3.1      
mongocxx 3.0        

The driver does not support older versions of MongoDB.

Language Compatibility

The following compatibility table specifies the recommended version(s) of the MongoDB C++ driver for use with a specific version of C++.

The first column lists the driver version(s).

C++ Driver Version C++03 C++11 C++14
mongocxx-3.x  
legacy-1.x

C#/.Net Driver Compatibility

MongoDB Compatibility

The following compatibility table specifies the recommended version(s) of the MongoDB C#/.NET driver for use with a specific version of MongoDB.

The first column lists the driver version(s).

C#/.NET Driver Version MongoDB 4.2 MongoDB 4.0 MongoDB 3.6 MongoDB 3.4 MongoDB 3.2 MongoDB 3.0 MongoDB 2.6
Version 2.9
Version 2.8  
Version 2.7  
Version 2.6    
Version 2.5    
Version 2.4      
Version 2.3        
Version 2.2        
Version 2.0          
Version 1.11        
Version 1.10          

The driver does not support older versions of MongoDB.

Language Compatibility

The following compatibility table specifies the recommended version(s) of the MongoDB C#/.NET driver for use with a specific version of .NET.

The first column lists the driver version(s).

Driver Version .NET 3.5 .NET 4.0 .NET 4.5 .NET 4.6 .NET 4.7 .NET 4.8 .NET Core 1.0 .NET Core 1.1 .NET Core 2.0 .NET Core 2.1 .NET Core 2.2
Version 2.9    
Version 2.8    
Version 2.7    
Version 2.6    
Version 2.5    
Version 2.4    
Version 2.3    
Version 2.2              
Version 2.0              
Version 1.11          
Version 1.10          

Go Driver Compatibility

MongoDB Compatibility

Go Driver MongoDB 4.2 MongoDB 4.0 MongoDB 3.6 MongoDB 3.4 MongoDB 3.2 MongoDB 3.0 MongoDB 2.6
1.1
1.0  

Language Compatibility

The MongoDB Go driver requires Go 1.10 or later.

Java Driver Compatibility

MongoDB Compatibility

The following compatibility table specifies the recommended version(s) of the MongoDB Java driver for use with a specific version of MongoDB.

The first column lists the driver version(s).

Java Driver Version MongoDB 4.2 MongoDB 4.0 MongoDB 3.6 MongoDB 3.4 MongoDB 3.2 MongoDB 3.0 MongoDB 2.6
Version 3.11
Version 3.10  
Version 3.9  
Version 3.8  
Version 3.7    
Version 3.6    
Version 3.5      
Version 3.4      
Version 3.3        
Version 3.2        
Version 3.1          
Version 3.0          
Version 2.14         [*]
Version 2.13          
Version 2.12            

The driver does not support older versions of MongoDB.

[*]The 2.14 driver does not support all MongoDB 3.2 features (e.g., read concern); however, if you are currently on a version 2.x driver and would like to run against MongoDB 3.2 but cannot upgrade to driver version 3.2, use the 2.14 driver.

Language Compatibility

The following compatibility table specifies the recommended version(s) of the MongoDB Java driver for use with a specific version of Java.

The first column lists the driver version(s).

Java Driver Version Java 5 Java 6 Java 7 Java 8 Java 11 [†]
Version 3.11  
Version 3.10  
Version 3.9  
Version 3.8  
Version 3.4  
Version 3.3  
Version 3.2  
Version 3.1  
Version 3.0  
Versions >= 2.7
[†]Java versions 8 and above are all supported thanks to the JVM backwards compatibility promise. Only LTS versions will be explicitly listed in future.

Node.js Driver Compatibility

MongoDB Compatibility

Node.js Driver MongoDB 4.2 MongoDB 4.0 MongoDB 3.6 MongoDB 3.4 MongoDB 3.2 MongoDB 3.0 MongoDB 2.6
>= 3.3
>= 3.2.1  
>= 3.1  
>= 3.0    
>=2.2.12      
>=2.0.14          
>=1.4.29          

The driver does not support older versions of MongoDB.

Language Compatibility

The following compatibility table specifies the recommended version(s) of the MongoDB Node.js driver for use with a specific version of Node.js.

The first column lists the driver version(s).

Node.js Driver Node.js v0.8.X Node.js v0.10.X Node.js v0.12.X Node.js v4.X.X Node.js v6.X.X Node.js v8.X.X Node.js v10.x.x
3.3.X      
3.2.X      
3.1.X      
3.0.X      
2.2.X  
2.1.X  
2.0.X  
>=1.4.18        
1.4.X          

Perl Driver Compatibility

MongoDB Compatibility

The following compatibility table specifies the recommended version(s) of the MongoDB Perl driver for use with a specific version of MongoDB.

The first column lists the driver version(s).

The following compatibility table specifies the recommended version(s) of the MongoDB Perl driver for use with a specific version of MongoDB.

The first column lists the driver version(s).

Perl Driver MongoDB 4.2 MongoDB 4.0 MongoDB 3.6 MongoDB 3.4 MongoDB 3.2 MongoDB 3.0 MongoDB 2.6
2.2
2.0  
1.8      
1.6      
1.4        
1.2        
1.0          

The driver does not support older versions of MongoDB.

Language Compatibility

The MongoDB Perl driver requires Perl 5.10.1 or later.

PHP Driver Compatibility

MongoDB Compatibility

The following compatibility table specifies the recommended version(s) of the MongoDB PHP driver for use with a specific version of MongoDB.

The first column lists the driver version(s).

In the table below, ext and lib refer to the MongoDB PHP Extension and Library, respectively.

PHP Driver MongoDB 4.2 MongoDB 4.0 MongoDB 3.6 MongoDB 3.4 MongoDB 3.2 MongoDB 3.0 MongoDB 2.6
ext 1.6 + lib 1.5  
ext 1.5 + lib 1.4    
ext 1.4 + lib 1.3    
ext 1.3 + lib 1.2      
ext 1.2 + lib 1.1      
ext 1.1 + lib 1.0        
ext 1.0          

Language Compatibility

The following compatibility table specifies the recommended version(s) of the MongoDB PHP driver for use with a specific version of PHP.

The first column lists the driver version(s).

In the table below, ext and lib refer to the MongoDB PHP Extension and Library, respectively.

PHP Driver PHP 7.4 PHP 7.3 PHP 7.2 PHP 7.1 PHP 7.0 PHP 5.6 PHP 5.5
ext 1.6 + lib 1.5  
ext 1.5 + lib 1.4  
ext 1.4 + lib 1.3    
ext 1.3 + lib 1.2    

Python Driver Compatibility

MongoDB Compatibility

Note

MongoDB 4.2 Feature Availability

The following compatibility table specifies the recommended version(s) of the MongoDB Python driver for use with a specific version of MongoDB.

The first column lists the driver version(s).

Python Driver MongoDB 4.2 MongoDB 4.0 MongoDB 3.6 MongoDB 3.4 MongoDB 3.2 MongoDB 3.0 MongoDB 2.6
3.9
3.8  
3.7  
3.6    
3.5      
3.4      
3.3        
3.2        
3.1          
3.0          
2.9          
2.8          
2.7            

The driver does not support older versions of MongoDB.

Language Compatibility

The following compatibility table specifies the recommended version(s) of the MongoDB Python driver for use with a specific version of Python.

The first column lists the driver version(s).

Python 2 Compatibility

Python Driver Python 2.4 Python 2.5, Jython 2.5 Python 2.6 Python 2.7, PyPy
3.9      
3.8      
3.7    
3.6    
3.5    
3.4    
3.3    
3.2    
3.1    
3.0    
2.9
2.8
2.7

Python 3 Compatibility

Python Driver Python 3.1 Python 3.2 PyPy3 Python 3.3 Python 3.4 Python 3.5 Python 3.6 Python 3.7
3.8      
3.7      
3.6        
3.5      
3.4        
3.3        
3.2      
3.1      
3.0        
2.9  
2.8      
2.7      

Note

  • Jython 2.5 is a Python 2.5-compatible alternative interpreter.
  • PyPy is a Python 2.7 and 3.2-compatible alternative interpreter.

Motor (Python async) Driver Compatibility

MongoDB Compatibility

The following compatibility table specifies the recommended version(s) of the Motor (Python async) driver for use with a specific version of Python.

The first column lists the driver version(s).

Motor (Python async) Driver MongoDB 3.6 MongoDB 3.4 MongoDB 3.2 MongoDB 3.0 MongoDB 2.6
1.2
1.1  
1.0  
0.7    
0.6      
0.5      
0.4      
0.3        
0.2        
  • Motor 1.2 wraps PyMongo 3.6+
  • Motor 1.1 wraps PyMongo 3.4+
  • Motor 1.0 wraps PyMongo 3.3+
  • Motor 0.7 wraps PyMongo >=2.9.4 and <3.0
  • Motor 0.6 wraps PyMongo 2.8
  • Motor 0.5 wraps PyMongo 2.8
  • Motor 0.4 wraps PyMongo 2.8
  • Motor 0.3 wraps PyMongo 2.7.1
  • Motor 0.2 wraps PyMongo 2.7.0

The driver does not support older versions of MongoDB.

Language Compatibility

The following compatibility table specifies the recommended version(s) of the Motor (Python async) driver for use with a specific version of Python.

The first column lists the driver version(s).

Motor (Python async) Driver Python 2.5 Python 2.6 Python 2.7 Python 3.3 Python 3.4 Python 3.5 Python 3.6
1.2      
1.1  
1.0  
0.7    
0.6    
0.5    
0.4      
0.3      
0.2        
0.1      
  • Motor 1.1 wraps PyMongo 3.4+
  • Motor 1.0 wraps PyMongo 3.3+
  • Motor 0.7 wraps PyMongo >=2.9.4 and <3.0
  • Motor 0.6 wraps PyMongo 2.8
  • Motor 0.5 wraps PyMongo 2.8
  • Motor 0.4 wraps PyMongo 2.8
  • Motor 0.3 wraps PyMongo 2.7.1
  • Motor 0.2 wraps PyMongo 2.7.0
  • Motor 0.1 wraps PyMongo 2.5.0

Note

  • Motor version 0.5 and earlier requires Tornado, and supports the same version of Python as its supported Tornado versions do.
  • For asyncio support, Motor requires Python 3.4+, or Python 3.3 with the asyncio package from PyPI.
  • PyPy is not supported as it runs Motor code slowly.
  • Motor does not support Jython or Windows.

Ruby Driver Compatibility

MongoDB Compatibility

The following compatibility table specifies the recommended version(s) of the MongoDB Ruby driver for use with a specific version of MongoDB.

The first column lists the driver version(s).

Ruby Driver MongoDB 4.2 MongoDB 4.0 MongoDB 3.6 MongoDB 3.4 MongoDB 3.2 MongoDB 3.0 MongoDB 2.6 MongoDB 2.4
2.10  
2.9    
2.8    
2.7    
2.6    
2.5      
2.4      
2.3        
2.2        
2.0          
1.12          
1.11            
1.10            
1.9              
1.8              

The driver does not support older versions of MongoDB.

Ruby Compatibility

The following compatibility table specifies the recommended version(s) of the MongoDB Ruby driver for use with a specific version of Ruby.

The first column lists the driver version(s).

Ruby Driver Ruby 2.6 Ruby 2.5 Ruby 2.4 Ruby 2.3 Ruby 2.2 Ruby 2.1 Ruby 2.0 Ruby 1.9 Ruby 1.8.7 JRuby 9.2 JRuby 9.1 JRuby
2.9    
2.8    
2.7    
2.6    
2.5          
2.4            
2.3            
2.2            
2.1            
2.0            
1.12 - 1.9              
1.8                
1.7 - 1.6                  

Scala Driver Compatibility

MongoDB Compatibility

The following compatibility table specifies the recommended version(s) of the Mongo Scala driver for use with a specific version of MongoDB.

The first column lists the driver version(s).

Scala Driver MongoDB 4.2 MongoDB 4.0 MongoDB 3.6 MongoDB 3.4 MongoDB 3.2 MongoDB 3.0 MongoDB 2.6
2.7
2.6  
2.5  
2.4  
2.3    
2.2    
2.1      
2.0      
1.2      
1.1        
1.0          

Language Compatibility

The following compatibility table specifies the recommended version(s) of the Mongo Scala driver for use with a specific version of Scala.

The first column lists the driver version(s).

Scala Driver Scala 2.13 Scala 2.12 Scala 2.11
2.7
2.6  
2.5  
2.4  
2.3  
2.2  
2.1  
2.0  
1.1  
1.1    
1.0