Hey everyone, I’m scratching my head over this one. I’ve got a Delphi 12 app that needs to talk to a MariaDB 11.4 LTS server. But when I try to use the FireDAC component, it throws a fit saying:
[FireDAC][Phys][MySQL]-1101. Unsupported MySQL version [302060000]. Supported are client and server from v 3.20
From what I can tell, FireDAC only plays nice with MariaDB versions between 5.5 and 10.6. Weird, right? Especially since it seems to work fine with the latest MySQL.
So, what’s the best way to get my Delphi app chatting with a modern MariaDB server? Any tricks or workarounds you folks use? I’m all ears!
hav u tried using a different connector library? UniDAC from devart works great w/ newer mariadb versions. it’s not free but worth it imho. another option is to use the mariadb connector/c directly thru the API. bit more work but gives u full control. good luck mate!
I’ve faced similar challenges with FireDAC and newer database versions. One effective solution I’ve implemented is using ODBC to connect to MariaDB. It’s more version-agnostic and has worked well with the latest MariaDB releases.
To set this up, install the MariaDB ODBC driver on your development machine and target systems. Then, configure an ODBC DSN for your database. In your Delphi app, use TFDConnection with the ODBC driver instead of the MySQL/MariaDB-specific one.
This approach has the added benefit of making your application more flexible if you need to switch database systems in the future. It might require some adjustments to your SQL statements, but overall, it’s a robust solution that’s served me well in production environments.
I’ve run into this issue before, and it can be a real pain. One workaround I’ve had success with is using a third-party MySQL connector instead of FireDAC. The DevArt MySQL Data Access Components have worked well for me with newer MariaDB versions.
Another option is to modify the FireDAC source code to bypass the version check. It’s not ideal, but it can get you up and running quickly. You’d need to locate the version check in the FireDAC MySQL driver and adjust it to accept higher version numbers.
If you’re open to alternatives, consider using a REST API layer between your Delphi app and the MariaDB database. This decouples your app from direct database access and can sidestep compatibility issues.
Lastly, have you considered downgrading your MariaDB server to a version FireDAC supports? It’s not always feasible, but it might be the path of least resistance if your database requirements allow it.
I’ve been in your shoes, and it’s definitely frustrating when newer database versions break compatibility. Here’s what worked for me:
Try using the MySQL ODBC driver instead of FireDAC. It’s more forgiving with version differences and has served me well with recent MariaDB releases. You’ll need to install the MySQL Connector/ODBC (make sure it’s the latest version) and set up a DSN.
In your Delphi app, switch to using TAdoConnection instead of TFDConnection. You might need to tweak some SQL statements, but overall, it’s a solid workaround that’s kept my projects running smoothly.
If you absolutely need to stick with FireDAC, consider setting up a MariaDB proxy server. It can act as a middleman, presenting itself as an older version to FireDAC while still communicating with your newer MariaDB backend.
Remember, these are temporary solutions. Keep an eye out for FireDAC updates that might add support for newer MariaDB versions in the future.