Jump to content
Dmitry Onoshko

Distributing application that connects remote MySQL/MariaDB servers

Recommended Posts

So, there’s a program that uses FireDAC to connect to remote MySQL/MariaDB servers. It’s written and debugged with a MariaDB installation and the only thing it seemed to require was libmariadb.dll.

 

Until it comes to putting the program to a computer with no MySQL/MariaDB installations at all and asking it to connect to a remote MySQL 8 server. It suddenly turns out it requires caching_sha2_password.dll as well. Copying it to the application folder actually worked, but… On another user computer I try to use libmysql.dll instead, and it asks for libssl-xxx.dll and libcrypto-xxx.dll. Which actually is mentioned in FireDAC documentation. But I can’t seem to find the information anywhere on MySQL/MariaDB websites.

 

The problems:

1) At any point in time whenever end-users decide to upgrade their DBMS an application might start requiring some libwhatever-they-choose-to-add-next.dll. This might be inevitable unless the developers on MySQL/MariaDB stay sane enough to think about such use cases.

2) I can’t really be sure if the DLLs I dealed with by now are enough once and forever.

3) Using the exact version compatible DLLs might be the best, but then how would I distribute the application without knowing in advance the MySQL/MariaDB server version?

 

Please, share any recommendations on how to make a DBMS client application work without disturbing end users with unnecessary errors. Thanks in advance.

Share this post


Link to post

Use Devart's MyDAC:

 

Quote

Component library for connecting applications to MySQL from Delphi, C++Builder and Lazarus. It also allows setting up a remote connection to MySQL directly via TCP/IP avoiding MySQL client library.

 

Share this post


Link to post
On 10/20/2024 at 12:36 AM, weirdo12 said:

Use Devart's MyDAC:

 

 

Will that really help to avoid providing DLLs next to the application in some tricky way?

Share this post


Link to post
7 minutes ago, Dmitry Onoshko said:

Will that really help to avoid providing DLLs next to the application in some tricky way?

Check out their documentation or contact them directly but my understanding is they don't use the client DLL's at all.

Share this post


Link to post
57 minutes ago, weirdo12 said:

Check out their documentation or contact them directly but my understanding is they don't use the client DLL's at all.

But, if so, this creates a potential problem like the one we used to have when MySQL changed default authorization mechanism and the programs that used older versions of the protocol failed to connect.

Edited by Dmitry Onoshko

Share this post


Link to post
13 hours ago, Dmitry Onoshko said:

But, if so, this creates a potential problem like the one we used to have when MySQL changed default authorization mechanism and the programs that used older versions of the protocol failed to connect.

The protocol doesn't change suddenly. You need to install a new MySQL version for that to happen.

In this case you need to check that the library you use for connection supports that version:

https://docwiki.embarcadero.com/Status/en/FireDAC_Database_Support

 

Same for MyDAC:

https://www.devart.com/mydac/compatibility.html

 

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

×