[Lazarus] How to connect to MariaDB/mySql database from fpc/Lazarus?

Michael Van Canneyt michael at freepascal.org
Tue Aug 27 07:51:16 CEST 2019



On Tue, 27 Aug 2019, Bo Berglund via lazarus wrote:

> On Mon, 26 Aug 2019 23:39:47 +0200 (CEST), Michael Van Canneyt via
> lazarus <lazarus at lists.lazarus-ide.org> wrote:
>
>> If you have a choice of database, choose something else.
>> MariaDB/MySQLDB are the probably the worst choices you can make.
>> Postgres, Firebird, SQLIte: all better choices, depending on your use case.
>>
>
> Well it so happens that the database I need to access is a MySql one
> on our website. So I have created an export of it using phpmyadmin on
> the webserver and loaded this into a MariaDB server I have inbstalled
> on a RaspberryPi4 box.
> Gonna use this while I am making the program to finally be deployed
> against the website database.
> So the database server is not really a choice I can make.

That's why I started with 'if you have a choice'.

MySQL by itself is not a very good database, but connecting to it from
FPC/Lazarus is even worse.

Unfortunately, the ease of use of the LAMP stack made it very popular, 
and many are in your situation. I would not recommend it for new projects.

Michael.


More information about the lazarus mailing list