what is required to connect to mariadb? - SOLVED lazarus / 16-Databases ---------------------------------------------------------------------- Michael Collier · 2019-10-21 20:22 I have: lazarus 2.0.4 fpc 3.0.4 debian10 MariaDB 10.3.17-MariaDB-0+deb10u1 I'd like to connect from lazarus but can only see MySQL components (no mariaDB components), do I use MySQL components? Also, do I need to install any client libraries? If so are they MySQL/MariaDB? Any links please? The message I get when I attempt a connection using MySQL56 is cannot load default client library "libmysqlclient.so" I have some client libraries installed, for Mysql and MariaDB, maybe I have the wrong ones? I tried, for example, sudo apt-get install mariadb-client and also from package manager installed "default-mysql-client" and "default-mysql-client-core" Any help please? ---------------------------------------------------------------------- dogriz · 2019-10-22 09:22 Check your installed library version in /usr/lib/x86_64-linux-gnu/ You can create symlink to "libmysqlclient.so" if needed. ---------------------------------------------------------------------- Michael Collier · 2019-10-22 13:47 ok thanks, inside /usr/lib/x86_64-linux-gnu/ I have libmariadb.so.3 but no libraries with mysql name.. should there be? ---------------------------------------------------------------------- dogriz · 2019-10-22 14:59 Try with this command: Code: [Select]sudo ln -s /usr/lib/x86_64-linux-gnu/libmariadb.so.3 /usr/lib/x86_64-linux-gnu/libmysqlclient.so ---------------------------------------------------------------------- Michael Collier · 2019-10-22 16:30 Thanks dogriz, it is connecting now, so if I understand correctly the code you sent created a link to the mariadb library (libmariadb.so.3) but with a mysql name (libmysqlclient.so) to trick the laraus component TMySQL56Connection into thinking it is using mysql. Hopefully this will help others in the future too, Cheers Mike. ---------------------------------------------------------------------- LennartH · 2019-10-24 15:59 HI Lazarus v2.0.0+dfsg-2 rdebian package 2.00.... Buster Mariadb 10.3 I have same problem that I get a message "can not load libmysqlclient.so". I found my file at /usr/lib/arm-linux-gnueabihf/libmariadb.so.3, I made a link as sudo ln -s /usr/lib/arm-linux-gnueabihf/libmariadb.so.3       /usr/lib/x86_64-linux-gnu/libmysqlclient.so but thas doesn't seem to work, I still get the same error. I have no katalog /usr/lib/x86_64-linux-gnu  after installing Lazarus and Mariadb, Is this the rightplace also for Buster that see to be the only thing that differs from the other fellow? Another directory? Is it possible to find where Lazarus expect the file to be placed?  Best Rgds Lennart from Sweden ---------------------------------------------------------------------- Michael Collier · 2019-10-24 18:08 Quote from: LennartH on October 24, 2019, 05:59:02 pmI have same problem that I get a message "can not load libmysqlclient.so". I found my file at /usr/lib/arm-linux-gnueabihf/libmariadb.so.3, I made a link as sudo ln -s /usr/lib/arm-linux-gnueabihf/libmariadb.so.3       /usr/lib/x86_64-linux-gnu/libmysqlclient.so Hi LennartH , I think for libmariadb.so.3 to work you must use TMySQL56Connection (the other components on my system would not connect), can you confirm which lazarus component you are trying to connect with please? ---------------------------------------------------------------------- LennartH · 2019-10-25 06:24 HI and Thanks for a very quick answer. Yes, I changed to TMysql56Connection from 55 that I used  before when mysql was the default for Raspberry. I found that info on the net. My link is as below, Right? pi@raspberrypi:/usr/lib $ find -iname "libmysqlclient.so" ./x86_64-linux-gnu/libmysqlclient.so Rgds Lennart ---------------------------------------------------------------------- dogriz · 2019-10-25 07:08 Quote from: LennartH on October 25, 2019, 08:24:15 amMy link is as below, Right? pi@raspberrypi:/usr/lib $ find -iname "libmysqlclient.so" ./x86_64-linux-gnu/libmysqlclient.so On ARM Linux (RaspberryPi) path to symlink should be: /usr/lib/arm- linux-gnueabihf/ So, create it like this: Code: [Select]sudo ln -s /usr/lib/arm-linux-gnueabihf/libmariadb.so.3 /usr/lib/arm-linux-gnueabihf/libmysqlclient.so ---------------------------------------------------------------------- LennartH · 2019-10-25 08:40 WOW, it worked. Thanks a lot, I realy appreciat your kind help. I have been struggle with this for long time until I joined this forum. How quick it was to get good help. Many Thanks. Rgds Lennart ---------------------------------------------------------------------- dogriz · 2019-10-25 11:28 Quote from: Michael Collier on October 24, 2019, 08:08:56 pmI think for libmariadb.so.3 to work you must use TMySQL56Connection (the other components on my system would not connect)Yes, mysqlconn.inc looks like this: Code: [Select]...   MariaDBVersion = {$IFDEF mysql57}     '10.1'; {$ELSE} {$IFDEF mysql56}   // MariaDB 10.0 is compatible with MySQL 5.6     '10.'; {$ELSE} // MariaDB 5.1..5.5 presumably report the same version number as MySQL     MySQLVersion; {$ENDIF} {$ENDIF} ... It is confusing if you use MariaDB... (I haven't checked for MySQL 8 ) Besides versioning, I'm not certain how compatible the latest versions of MariaDB/MySQL are with freepascal/lazarus database components because of their differences and new functionalities, but someone more knowledgeable might give an answer to that.