Jump to content
mijn

MongoDB with Delphi 11.2 FireDAC

Recommended Posts

Hello,

spent many hours trying to setup a working env for Delphi 11.2 and MongoDB.

Delphi 11.2 can only run (dockerized) MongoDB up to version 5.0 due to driver limitations in Delphi 11.2.

Trying to run the samples I get some error like "auth mechanism SCRAM-SHA-1 not supported".

Before ditching Delphi for Elixir or else, has anyone  some hints for a working setup with MongoDB, Delphi and FireDAC?

 

Thanks in advance for reading!

Share this post


Link to post

Yes SCRAM-SHA-1  is supported:
https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Connect_to_MongoDB_Database_(FireDAC)

 

You need to configure the certificates and etc. as indicated in the "Using a Secure Connection" subtopic, this is the easiest part... but then you have this "small" detail:

Note: The MongoDB C driver has been compiled without SSL support. If your application requires SSL, you should compile the MongoDB C driver on your own and provide an additional set of required libraries. These libraries might require the OpenSSL and Microsoft Visual C++ Runtime libraries.

 

For some reason MongoDB doesn't provide the SSL version from his native C driver (used by Firedac) out of the box. You can find more details here, also the instructions around the driver compilation with SSL enabled:
https://github.com/mongodb/mongo-c-driver

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×