Thank you so much for this, I'm very new to Unix and wouldn't have been able to figure it out.
I ran into an error trying to compile it:
https://pastebin.com/78Kq0Kj2
$ cmake . -DMYSQLCLIENT_STATIC_LINKING=1
- You will link statically to the MySQL client library (set with -DMYSQLCLIENT_STATIC_LINKING=<bool>)
-- Searching for static libraries with the base name(s) "libmysqlclient_r.a libmysqlclient.a"
-- mysql_config was found /usr/bin/mysql_config
CMake Error at cmake/FindMySQL.cmake:406 (message):
Could not find static "libmysqlclient_r.a libmysqlclient.a" in
MYSQL_LIB_DIR "/usr/lib/arm-linux-gnueabihf" in "mysqlopt"
Call Stack (most recent call first):
cmake/FindMySQL.cmake:627 (_check_lib_search_error)
CMakeLists.txt:81 (INCLUDE)
I already installed libmysqlclient18, and exported the environment variables before following your guide, maybe the problem's here ?
shell> export MYSQL_INCLUDE_DIR=/usr/include/mysql
shell> export MYSQL_LIB_DIR=/usr/lib/arm-linux-gnueabihf
shell> export MYSQL_DIR=/usr/bin/mysql