TMySQL56Connection can not work with the installed MySQL client version lazarus / 16-Databases ---------------------------------------------------------------------- Mario · 2024-06-15 20:27 Hi! I'm trying to use TSQLConnector, and this is the error message I get: TMySQL56Connection can not work with the installed MySQL client version: Expected (5.6), got (3.3.. I am on a current Debian 12, with fpc and lazarus (and mysql, etc) installed with apt. I found this bug report: https://gitlab.com/freepascal.org/fpc/source/-/issues/39422 It says I should set SkipLibraryVersionCheck to false, but alas, the compiler says that this property doesn't exist. Here's the listing: 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    Conn := TSQLConnector.Create(nil);   with Conn do begin     SkipLibraryVersionCheck := True;  { Alas, not found. }      ConnectorType := 'mysql 5.6';      HostName := 'localhost/';      DatabaseName := 'vmail';      UserName := 'vmail';      Password := '*********';      Transaction := TSQLTransaction.Create(Conn);   end;  How can I solve this? Thanks! ---------------------------------------------------------------------- CharlyTango · 2024-06-15 21:28 for some (unknown by me) reason the TSQLConnector does not have a "SkipLibraryVersionCheck" property. This property exists only in the database specific connectors like TMySQL56Connection. If you need more flexibility i recommend ZEOS ---------------------------------------------------------------------- Thaddy · 2024-06-15 22:45 The component is simply right to refuse if it is a MySQL 3.3 that is installed and that is very old.. Try the component for MySQL40. But it is usually better to install MariaDb (compatible) since Debian decided to drop direct support for MySQL after Oracle took over and subsequentially tinkered with the original license,,,,,MariaDB can be used as a drop in replacement for higher MySQL versions and is written by the original developers of MySQL. And Debian is not the only major distribution to drop MySQL support.... The reason is one of the most famous FOSS quarrels to date. Most distributions, like Debian, therefor provide a version of MySQL that still adheres to their philosophy regarding open source software. What makes you think that a component for 56 works with a version 33? I wonder what kind of coffee you had... https://developers.slashdot.org/story/06/12/13/1515217/mysql-quietly- drops-support-for-debian-linux-updated https://linuxgenie.net/how-to-install-mysql-on-debian-12-bookworm/ AND: https://stackoverflow.com/questions/67865527/debian10-unable-to-start- mysql-server Only red hat enterprise and suse enterprise support MySQL officially. So only the enterprise versions of these two. All other nixes are stuck with older distributions or unofficial packages. IOW Oracle screwed it up and you were sleepingi if you did not know that. The FOSS quarrel went both ways: Oracle finally reacted and changed the server license even more restricted since October.  If Possible, use MariaDB. It is just as good, faster and API compatible. And if the versioncheck is unknown, you also have an old Lazarus. ---------------------------------------------------------------------- Thaddy · 2024-06-15 23:22 Actually, by now, it is time to rename/clone the components to MariaDB versions and move on. The MySQL components 56 or higher work perfectly well with MariaDB. It is not 2006-9 anymore. MariaDB was forked from 3.3... Ever since they have a rat race with features and compatibility just like FreePascal/Lazarus and Delphi. Although that is mostly amicably. https://en.wikipedia.org/wiki/MariaDB ---------------------------------------------------------------------- GordonFindlay · 2024-06-16 01:04 CharlyTango has given you the answer - use database specific connectors and then set SkipLibraryVersionCheck. But for completeness - you seem to be running mariadb, not MySQL. mariadb uses MySQL terminology in many places-- for example the connector, configuration files (my.cnf ..), command-line utilities (mysqladmin, mysqlbackup ...) but returns its own version numbers, which are not reflected in the fpc connector code. Previously discussed in the thread https://forum.lazarus.freepascal.org/index.php/topic,66948.0.html among others. ---------------------------------------------------------------------- Thaddy · 2024-06-16 05:57 Nonsense, Gordon MariaDB never had a version 3.3. the oldest release was 5.1 and in sync with mySql 5.1. 3.3 is mysql and old See tthe release history; https://mariadb.com/kb/en/mariadb-releases/ Lazarus is also old if the mysql connectors do not have skipversioncheck. Yor best place to start is with one of the older mysql connectors and a newer lazarus. The Lazarus components themselvesmake no use of MariaDB specific features and MariaDB was upto version 11 almost 100% in sync with MySQL  behavior and formats. Main differences are the newer storage engines, but these are opaque to the Lazarus controls.They care only about the SQL dialects and these are compatible. The true version can be revealed by typing mysql -V same command worked also for mariadb, but is now changed to mariadb -V for versions beyong 10. ---------------------------------------------------------------------- Mario · 2024-06-16 08:14 Hi, thanks for the answers! AFAICT, mysql 3.3 is not installed on this system, unless something really really strange happened. mysql --version returns 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 mysql  Ver 15.1 Distrib 10.11.6-MariaDB, for debian-linux-gnu (x86_64) using  EditLine wrapper So basically I have no idea what is going on. But I'll try with the version specific TMySQL connector later. Regards,            Mario ---------------------------------------------------------------------- MarkMLl · 2024-06-16 08:30 Quote from: Mario on June 16, 2024, 10:14:44 amAFAICT, mysql 3.3 is not installed on this system, unless something really really strange happened. But something's pulled in an old client library. Try to track it down (i.e. probably a .so file) and then use apt-file to determine what package it's come from (which would probably merit a Debian bug report). MarkMLl ---------------------------------------------------------------------- CharlyTango · 2024-06-16 08:52 Since mariadb is currently neglected in SQLDB, I recommend: Update to Lazarus 3.4ZEOS as access components (latest version 8.0 is available in the Online Package Manager OPM)As an access library, download the corresponding DLL (or the comparable Linux .so component) directly from MariaDB.org. I use the same combination. ---------------------------------------------------------------------- Thaddy · 2024-06-16 11:21 That looks like a valid version. Try to use MySQL80 as connection. ---------------------------------------------------------------------- Mario · 2024-06-16 12:11 Quote from: MarkMLl on June 16, 2024, 10:30:47 amQuote from: Mario on June 16, 2024, 10:14:44 amAFAICT, mysql 3.3 is not installed on this system, unless something really really strange happened. But something's pulled in an old client library. Try to track it down (i.e. probably a .so file) and then use apt-file to determine what package it's come from (which would probably merit a Debian bug report). MarkMLl Hmm... I found a few things with "3.3" in the file name, but none mysql-related. I was hoping to find the .so but nope. ---------------------------------------------------------------------- Thaddy · 2024-06-16 14:08 With my installation a plain mysql.so an on windows a plain mysql.dll show up. ---------------------------------------------------------------------- Mario · 2024-06-17 14:14 Quote from: MarkMLl on June 16, 2024, 10:30:47 amQuote from: Mario on June 16, 2024, 10:14:44 amAFAICT, mysql 3.3 is not installed on this system, unless something really really strange happened. But something's pulled in an old client library. Try to track it down (i.e. probably a .so file) and then use apt-file to determine what package it's come from (which would probably merit a Debian bug report). Turns out it's libmariadb3. It is installed by libmariadb-dev-compat, which just creates a symbolic link for libmysqlclient.so -> libmariadb3.so. Which indeed has version 3.3.8, which in turn seems to be the correct and current mariadb client library version. Checked by outputting mysql_get_client_info() in a C program (see below). I think this is a bug because it's not the corresponding mysql client version. Does someone know if the upstream libariadb3 has this problem too? Code: C  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i #include #include  void main (int argc, char* argv[]){   printf("%s\n", mysql_get_client_info());} ---------------------------------------------------------------------- Seenkao · 2024-07-18 05:11 Эта проблема как-то решается? Я весь интернет перерыл, из-за этой проблемы. Использование MariaDB в Lazarus вызывает проблемы с подключением как в первопосте. Терминал же выводит: Quotemysql --version mysql  Ver 15.1 Distrib 10.11.6-MariaDB, for debian-linux-gnu (x86_64) using  EditLine wrapper ---------------------------------------------------- Google translate: Is this problem somehow solved? I scoured the entire Internet because of this problem. Using MariaDB in Lazarus causes connection problems as in the first post. The terminal outputs: Quotemysql --version mysql  Ver 15.1 Distrib 10.11.6-MariaDB, for debian-linux-gnu (x86_64) using  EditLine wrapper ---------------------------------------------------------------------- Zvoni · 2024-07-18 06:28 TSQLConnector has a protected Read-only Property "Proxy" which represents the "real" TSQLConnection Maybe derive your own TSQLConnector-Class changing that Property to Public and read/write. I think to remember there was something similar some years ago here on this Forum Everything said: MariaDB 10.11 (See TS version-output) is from 2022.... So MySQL80 would be the correct one, not 5.6 ---------------------------------------------------------------------- Seenkao · 2024-07-18 06:42 QuoteEInOutError: TMySQL80Connection can not work with the installed MySQL client version: Expected (8.0), got (3.3.8 ) ---------------------------------------------------------------------- Seenkao · 2024-07-18 07:51 Я не знаю что произошло. Но я два дня бодался с этой проблемой и при выставленном флаге SkipLibraryVersionCheck так же была ошибка. Сегодня я выставил этот флаг и всё заработало нормально. -------------------- Google translate: I don't know what happened. But I struggled with this problem for two days and when the SkipLibraryVersionCheck flag was set there was also an error. Today I set this flag and everything worked fine. ---------------------------------------------------------------------- CharlyTango · 2024-07-23 07:58 Quote from: CharlyTango on June 16, 2024, 10:52:12 amSince mariadb is currently neglected in SQLDB, I recommend: Update to Lazarus 3.4ZEOS as access components (latest version 8.0 is available in the Online Package Manager OPM)As an access library, download the corresponding DLL (or the comparable Linux .so component) directly from MariaDB.org. My opinion: As long as MariaDB is not handled properly in SQLDB, I will use ZEOS. Period