Omnis Technical Note TNSQ0039Updated July 2021

Using the Dynamic MySQL DAM

for Omnis Studio 10.2 or above
by Gary Ashford, Omnis Engineering

The "dynamic" MySQL DAM allows selection of the MySQL client library in a given deployment and this makes it possible to update the client library without the need for a replacement DAM. Using the latest release of the client library ensures support for the latest MySQL features including enhanced encryption and SSL support. The client library and its dependencies can be obtained from a standard MySQL client or server distribution and applied to the system.

Show discussion for:

Downloading the Clientware
The required client libraries can be extracted from any standard distribution of MySQL Database Server, including the MySQL Community Server, available from the MySQL Developer Site.

The following table shows the name of the client library required on each supported platform, together with the required dependencies. These must all be extracted and placed in a location where Omnis will find them when it starts up.

Client Librarylibmysql.dlllibmysqlclient.dylib→→
MySQL 8.0.35 and later libssl-3-x64.dll
MySQL 8.0.18 and lower ssleay32.dll
Notes On Windows, these files are normally found inside the bin folder of the server / downloaded archive. On macOS, these files are normally found inside the lib of the server / downloaded archive. On Linux, these files are normally found inside the lib of the server / downloaded archive.

Assuming a .zip or .tar archive is downloaded, the client library (and its symbolic link file) can normally be found inside the "lib" folder. The dependencies can be found either in the "lib" folder or inside the "bin" folder.

*The Windows client currently requires the Microsoft Visual C++ Redistributable for Visual Studio 2015 to be installed. This provides the additional library dependency: vcruntime140_1.dll (Newer clients may require a later version of the C++ redistributable).

We recommend placing the client library and its dependencies in the following locations:

Install Location"Omnis" folder
(in the same folder as omnis.exe)
"" folder
libssl and libcrypto dylibs are installed to

On macOS, libmysqlclient.x.dylib looks for libssl.dylib and libcrypto.dylib in the @loader_path/../lib folder by default. libssl.1.1.dylib, libcrypto.1.1.dylib plus their symlinks should therefore be placed in a folder named, creating this folder as necessary.

On Linux, the client libraries can also be placed inside the Omnis folder because the omnisX64 script appends to the LD_LIBRARY_PATH environment variable.

MySQL DAM Compatibility
In Studio 10.2 (builds after 30204), the MySQL DAM is able to use a dynamic client library in place of it's embedded client library. This means that no replacement DAM is needed as it was with Studio 10.2 build 30204 and earlier.

Creating a "Universal" Client Library
MacOS Universal binaries combine libraries containing multiple architectures. This means that you can have a mixture of Intel and ARM macOS Omnis clients, all using the same Universal Omnis Runtime. To create universal version of your MySQL library and the required dependencies, use the lipo command to join the separate architectures, for example:

lipo -create mysql_x86_64/libmysqlclient.21.dylib mysql_arm64/libmysqlclient.21.dylib -output libmysqlclient.21.dylib
lipo -create mysql_x86_64/libssl.1.1.dylib mysql_arm64/libssl.1.1.dylib -output libssl.1.1.dylib
lipo -create mysql_x86_64/libcrypto.1.1.dylib mysql_arm64/libcrypto.1.1.dylib -output libcrypto.1.1.dylib

Testing the DAM
After starting Studio, check the Trace Log in case there is an error loading the MySQL DAM. When loaded, the MYSQLDAM should appear in the $extobjects section, viewed using the Notation Inspector.

Failure to load the MYSQLDAM indicates that either the client library or one of its dependencies could not be located, or may be of the wrong architecture. Please refer to technote TNEX0009 for help in diagnosing & resolving dynamic library dependencies.



Search Omnis Developer Resources


Hit enter to search