Jump to content
Sign in to follow this  
adyble

Firedac and SSL

Recommended Posts

Hello

Trying to use Firedac to connect to to a remote Mysql server using SSL in a Delphi application. We can so it fine if the application is 64bit but we want to keep this system 32bit for the time being.

Devart's MyDAC will handle it but I think the issue if with FireDAC rather than Mysql or the DLLs we are using. I would rather keep with FireDAC tha  change everythng to MyDAC as well.

 

Anyone had any experience of achieving this ?

 

The helpful error is - 

 

---------------------------
sqlssl
---------------------------
[FireDAC][Phys][MySQL] SSL connection error: unknown error number.
---------------------------
OK   
---------------------------

 

Thanks

Andy

Edited by adyble
Press enter too seen

Share this post


Link to post

do you have all DLL in the same place?

Quote

FireDAC requires one of the following libraries:

  • The LIBMYSQL.DLL client library for connecting to MySQL server.
  • The LIBMYSQLD.DLL embedded server library. See MySQL Embedded server later in this topic.

You can take them from a server (details) installation Bin or Lib folders and place them in:

a folder listed in your PATH environment variable (for example, <Windows>\SYSTEM32)

your application EXE folder.

To connect to a 64-bit version of MySQL 8.0 at runtime you need:

  • LIBMYSQL.DLL.
  • VS2015 runtime 64-bit.
  • Two libraries from MySQL MSVC++ Connectors pack of the 8.0 version:
    • LIBCRYPTO-1_1-x64.DLL.
    • LIBSSL-1_1-x64.DLL.

Note: If you use a 64-bit SQL server, the client DLLs will also be 64-bit. To connect at design time or to use this server with a 32-bit application, download 32-bit DLLs from

https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Connect_to_MySQL_Server_(FireDAC)

 

Share this post


Link to post

Hi

 

Thanks for your answer. Just to confirm, I am very experienced with Firedac and Delphi form a point of connections without SSL.

This is purely an SSL related issue. I have it working fine in a 64bit application however I don't want to change these existing apps form 32 bit just yet.

 

In theory using the 32bit SSL DLLs should work but it just gives this error - 

 

[FireDAC][Phys][MySQL] SSL connection error: unknown error number.

 

Has anyone got an example of it working ?

Thanks

 

Edited by adyble
pressed ctrl enter for new line

Share this post


Link to post
2 hours ago, adyble said:

In theory using the 32bit SSL DLLs should work but it just gives this error - 

 

[FireDAC][Phys][MySQL] SSL connection error: unknown error number.

Which exact versions of the 32 OpenSSL DLLs have you tried? Are they 1.1.x or 1.0.x versions?

Share this post


Link to post

Hi

 

Seems to be 1.1 - libcrypto-1_1-x32 , libcrypto-1_1, Libssl-1_1-x32

 

Thanks

 

Share this post


Link to post

In https://stackoverflow.com/questions/71993040/delphi-11-1s-firedac-and-mysql-ssl-connection-error-unknown-error-number there is one fresh comment saying "I solved the same problem today, downgrading the MySql version to 8.0.23", and one answer "I installed and uninstalled MySQL (and MySQL Workbench and MySQL Script) probably 10 times. The last install worked. I have no idea why this was necessary.". Maybe this or one of the other answers / suggestions may be helpful.

  • Like 1

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
Sign in to follow this  

×