I’m working on a project where I need to establish a connection between Delphi XE3 and MySQL’s embedded server using the libmysqld.dll library. Currently, I’m aware of DevArt’s MyDAC components which offer the TMyEmbConnection component for this purpose, but the licensing cost makes it unsuitable for my current project requirements.
I attempted to implement this using dbExpress but encountered issues and couldn’t get it working properly. I’m looking for alternative approaches to solve this connectivity challenge.
Specifically, I need guidance on:
- Whether dbExpress or other built-in Delphi XE3 components can handle embedded MySQL connections
- Recommendations for third-party components, particularly free or open-source options
Any suggestions or code examples would be greatly appreciated.
Back when I dealt with embedded MySQL in older Delphi versions, I’d skip the standard data access components completely - way more reliable. Have you tried using the MySQL C API directly through DLL imports? Yeah, it’s more manual work, but you get full control over embedded server initialization and connections. The trick is calling mysql_library_init() with embedded server parameters before connecting, then use standard MySQL API functions like mysql_real_connect(). I built a thin wrapper class around these API calls - handled the messy low-level stuff while keeping a clean interface for the rest of my app. ZeosLib’s worth checking out too since it’s open source with MySQL support, though I’m not sure about embedded server compatibility in the XE3 days. Direct API usage has a steeper learning curve upfront, but you’ll dodge dependency issues and licensing costs from third-party components.