Lazarus and MAria DB lazarus / 16-Databases ---------------------------------------------------------------------- luzi3009 · 2020-12-17 14:31 Hi everyone I'm trying to put Lazarus V2.0.0 in Connection with Maria DB10.3.X on my Raspberry Pi. I have installed everything and i can already reach the Database from my Windows PC through HeidiSQL. Now i'm want to set up the connection with Lazarus but i always get the fault "Can not load default mysql library ( libmysqlclient.so.18 or libmysqlclient.so ) Check your installation" I've tried with all MYSQL Connection. The Error is the same accept from the clientnumber "18". What do i have to do? Thanks for your help ---------------------------------------------------------------------- devEric69 · 2020-12-17 14:51 Hello, To resolve this error... Quote from: luzi3009 on December 17, 2020, 03:31:21 pm"Can not load default mysql library ( libmysqlclient.so.18 or libmysqlclient.so ) Check your installation" ...try to install the Mysql client package, version number 18, for development, i.e. having probably a name like this globex:  *libmysqlclient18*-dev*.deb . ---------------------------------------------------------------------- luzi3009 · 2020-12-17 18:13 When i try to install this package it tells me i have a newer version and it will not be installed. ---------------------------------------------------------------------- devEric69 · 2020-12-19 19:13 In accordance with this summary (how the libraries loader works: https ://wiki.freepascal.org/File:lazarus_free_pascal_libraries_loading_unde r_linux.png), you can do - almost - 2 different things: - first, you can verify that there is a softlink from the link-name libmysqlclient.so towards the soname libmysqlclient.so.19 (say, that your already installed newer version is num# 19). In this hypothesis, you can uninstall the new version (i.e. version 19), and install the old one (i.e. 18) with the development package file *.deb . The development package will automatically complete your installation by also creating the shortcut-softlink from the soname *mysql*.so.18 towards the real library file *mysql*18.x.so. - but, if you want to keep your newer version (say, version 19), then you have to rely on MySQL backward compatibility (a.k.a. conservation of the bottom-up compatibility of the APIs of the released libraries, i.e. hope that a client library version 19 is always compatible with client softwares targeted for a client library version 18). Let's say that with a premium database server like MySQL or MariaDB, this should be the case. However, this should be checked before. In such a validated case, then you have to do the following manually shortcuts- symlinks:   · libmysqlclient.so ==towards==> libmysqlclient.so.18  · libmysqlclient.so.18 ==towards==> libmysqlclient.so.19 The shortcut-symlink libmysqlclient.so.19 should already exist and point towards the newer installed *mysql*19.x.so library. ---------------------------------------------------------------------- luzi3009 · 2020-12-19 19:17 Hello Thanks for your help. I will try this tomorrow. But where is the .so placed? I do not find it in lib Thanks ---------------------------------------------------------------------- devEric69 · 2020-12-20 10:57 AFAIK, the loader uses the following search paths, to resolve a librairy loading, starting from a link-name or starting from a soname:   ●  directories specified by the environment variable LD_RUN_PATH   ●  directories specified by the environment variable LD_LIBRARY_PATH   ●  directories specified in DT_RUNPATH or DT_RPATH field, when a DT_SONAME and DT_NEEDED are present in the executable trying to launch a shared library   ●  default directories, normally /lib/* and /usr/lib/* (← most likely locations, for a multi-clients database server)   ●  commercial directories such as /opt/appli_name/*   ●  directories listed in the /etc/ld.so.conf file, of course ---------------------------------------------------------------------- luzi3009 · 2020-12-20 11:12 i had a look in /lib/ and in /usr/lib and there is nothing with libmysql.so but i find other .so i have installed earlier. How do i install the libmysql.so now? I'm very confused because i installed the MariaDb-client and it is all running ---------------------------------------------------------------------- luzi3009 · 2020-12-20 11:18 ok I solved the problem finally Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i sudo apt install libmariadb-devsudo ln -s /usr/lib/arm-linux- gnueabihf/libmariadbclient.so /usr/lib/arm-linux- gnueabihf/libmysqlclient.so i missed these 2 lines during installation. But Thanks for your help. I made my understand the database direction better. ---------------------------------------------------------------------- devEric69 · 2020-12-20 13:09 Quote from: luzi3009 on December 20, 2020, 12:18:47 pmok I solved the problem finally Well done!