Omnis Technical Note TNSQ0039Updated July 2021

Using the Dynamic MySQL DAM

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

Introduction
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.

 Windows (32&64-bit)*macOSLinux
Client Librarylibmysql.dlllibmysqlclient.21.dylib
libmysqlclient.dylib
libmysqlclient.so.21.0.13
libmysqlclient.so
Dependencieslibssl-1_1-x64.dll
libcrypto-1_1-x64.dll
libssl.1.1.dylib
libcrypto.1.1.dylib
libssl.so.1.0.0
libcrypto.so.1.0.0
File versions shown are for mysql-8.0.18

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).

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

 WindowsmacOSLinux
Install Location"Omnis" folder
(in the same folder as omnis.exe)
"Omnis.app/Contents/Frameworks" folder
libssl and libcrypto dylibs are installed to Omnis.app/Contents/lib
/usr/local/lib

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 Omnis.app/Contents/lib, 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.

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.

References

 

Search Omnis Developer Resources

 

Hit enter to search

X