Recent

Author Topic: Connecting to MariaDB 10.6 or 10.11  (Read 2732 times)

bruce.button

  • Jr. Member
  • **
  • Posts: 59
Re: Connecting to MariaDB 10.6 or 10.11
« Reply #15 on: February 29, 2024, 06:07:37 pm »
Here are some further findings:

I can connect easily to the database server using the Zeos library. In the TZConnection object I just specify the usual parameters, choose MariaDB-10 as the protocol and point the connection to the client library dll. Using libmariadb.dll I have no trouble connecting to the database. It doesn't matter whether I change the compile options by checking or unchecking "Win 32 gui application".

My conclusion is that there is no problem with the client library, but with the TMySQL57Connection object. I gather that others use it with success (mainly on Linux?), but I have not been able to use it successfully, even with a MySQL database server.

I was reluctant to use Zeos because its development seems to have stalled; the latest stable release (7.2.14) is from July 2021, nearly three years ago. But if that's all that works, it seems there is no choice.

I'd be grateful for perspectives on this point from seasoned users of Lazarus and MySQL/MariaDB.

dseligo

  • Hero Member
  • *****
  • Posts: 1412
Re: Connecting to MariaDB 10.6 or 10.11
« Reply #16 on: February 29, 2024, 09:17:21 pm »
As far as I can see I am targeting 32 bit. (Win 32 gui application is checked in Project Compiler options.)

Option 'Win32 gui application (-WG)' is not to choose between 32 and 64 bit target. If you want to make console application then uncheck this.

Look above this option, at 'Target OS (-T)' and 'Target CPU family (-P)'. If you have '(Default)' in both and Lazarus is 64-bit then you are targeting 64 bit. You target 64 bit also if target OS is Win64 and target CPU family is x86_64.
If target OS is Win32 and target CPU family is i386 then you are targeting 32 bit.

dseligo

  • Hero Member
  • *****
  • Posts: 1412
Re: Connecting to MariaDB 10.6 or 10.11
« Reply #17 on: February 29, 2024, 09:23:49 pm »
I was reluctant to use Zeos because its development seems to have stalled; the latest stable release (7.2.14) is from July 2021, nearly three years ago. But if that's all that works, it seems there is no choice.

I think version 8 is under development.

Quote
I'd be grateful for perspectives on this point from seasoned users of Lazarus and MySQL/MariaDB.

I use Zeos with MariaDB without problems for years.

bruce.button

  • Jr. Member
  • **
  • Posts: 59
Re: Connecting to MariaDB 10.6 or 10.11
« Reply #18 on: March 02, 2024, 01:53:29 pm »
As far as I can see I am targeting 32 bit. (Win 32 gui application is checked in Project Compiler options.)

Option 'Win32 gui application (-WG)' is not to choose between 32 and 64 bit target. If you want to make console application then uncheck this.

Look above this option, at 'Target OS (-T)' and 'Target CPU family (-P)'. If you have '(Default)' in both and Lazarus is 64-bit then you are targeting 64 bit. You target 64 bit also if target OS is Win64 and target CPU family is x86_64.
If target OS is Win32 and target CPU family is i386 then you are targeting 32 bit.

Thank you for that information. That is helpful.

bruce.button

  • Jr. Member
  • **
  • Posts: 59
Re: Connecting to MariaDB 10.6 or 10.11
« Reply #19 on: March 02, 2024, 02:00:48 pm »
I was reluctant to use Zeos because its development seems to have stalled; the latest stable release (7.2.14) is from July 2021, nearly three years ago. But if that's all that works, it seems there is no choice.

I think version 8 is under development.

Quote
I'd be grateful for perspectives on this point from seasoned users of Lazarus and MySQL/MariaDB.

I use Zeos with MariaDB without problems for years.

Thank you, dseligo. My conclusion is that Zeos is the way to go, especially since they have just released a stable version 8.0 with feature additions and bug fixes. I can connect to various databases easily and the library seems to work well.

 

TinyPortal © 2005-2018