Recent

Author Topic: connecting to mariadb  (Read 4571 times)

alanyoung

  • New Member
  • *
  • Posts: 13
connecting to mariadb
« on: December 12, 2025, 03:43:04 pm »
I have installed Lazarus Pascal on macos Tahoe .  I have also mariadb, installed on the same machine via homebrew, which works in terminal mode.  I also have a pascal project, created in an earlier vision of Lazarus Pascal, which successfully connected to a mariadb database.  When I tried to replicate the earlier pascal program in the newer version of pascal on the macOS Tahoe it always fails to connect to the database, with the message 'can not load the default MySQl library (\"libmysqlclient.dylib20\" or \"libmysqlclient.dylib\"). Check your installation.  Given it's a new clean installation (via fpcupdeluxe).  Is this a problem of the latest version of Lazarus Pascal or the method of installation.  Any help would be appreciated.  Thanks

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12599
  • FPC developer.
Re: connecting to mariadb
« Reply #1 on: December 12, 2025, 04:13:37 pm »
mysqlclient is an external requirement. It might be that the older version finds an older library (e.g. x86), and that your new build is in arm.

Try to verify target architecture of the old binary and new binary. (e.g. with the file command)

alanyoung

  • New Member
  • *
  • Posts: 13
Re: connecting to mariadb
« Reply #2 on: December 13, 2025, 01:27:11 pm »
the installation of Lazarus Pascal and mariadb are on a new new computer running Mac Tahoe.  The test to connect to mariadb via pascal was all with new project.  Therefore there should be no issue with old versions. 

Zvoni

  • Hero Member
  • *****
  • Posts: 3230
Re: connecting to mariadb
« Reply #3 on: December 15, 2025, 09:31:54 am »
And have you also homebrewed the MySQL-Client-Lib?

can you find "libmysqlclient.dylib20" or "libmysqlclient.dylib" by hand?
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

alanyoung

  • New Member
  • *
  • Posts: 13
Re: connecting to mariadb
« Reply #4 on: December 15, 2025, 05:57:03 pm »
I was unable to find either libmysqlclient.dylib20" or "libmysqlclient.dylib.

Trying to homebrew MySQL-Client-Lib gave no results

Zvoni

  • Hero Member
  • *****
  • Posts: 3230
Re: connecting to mariadb
« Reply #5 on: December 16, 2025, 08:20:31 am »
I was unable to find either libmysqlclient.dylib20" or "libmysqlclient.dylib.

Trying to homebrew MySQL-Client-Lib gave no results

?!?!?

https://formulae.brew.sh/formula/mysql-client

Though not sure, to what extent MySQL 9.5 Client is supported by our MySQL-Connection-Class
Maybe one of the older Versions on that page (8.0.44 or 8.4.7)
« Last Edit: December 16, 2025, 08:22:40 am by Zvoni »
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

alanyoung

  • New Member
  • *
  • Posts: 13
Re: connecting to mariadb
« Reply #6 on: December 16, 2025, 04:36:09 pm »
I tried both client versions but the problem still persists

 

TinyPortal © 2005-2018