Recent

Author Topic: MySQL or MariaDB  (Read 1703 times)

calm_sea

  • New Member
  • *
  • Posts: 39
MySQL or MariaDB
« on: June 28, 2022, 08:14:30 am »
Hello! For a proprietary licensed project, is it better to use MySQL or MariaDB as a server? Does the problem arise only for client licenses? Are those of Lazarus LGPL? I had a doubt because I read in wikipedia that only MariaDB has an LGPL license (therefore for closed source projects)

mangakissa

  • Hero Member
  • *****
  • Posts: 1131
Re: MySQL or MariaDB
« Reply #1 on: June 28, 2022, 08:40:01 am »
Mariadb is developped from MySQL, because MySQL is heading forward to  licensed database with support.
Mariadb is a community edition just like MySQL was.
Lazarus 2.06 (64b) / FPC 3.0.4 / Windows 10
stucked on Delphi 10.3.1

Handoko

  • Hero Member
  • *****
  • Posts: 5130
  • My goal: build my own game engine using Lazarus
Re: MySQL or MariaDB
« Reply #2 on: June 28, 2022, 12:45:33 pm »
I cannot say much about the license, and I'm not an expert in database programming. But I have bad experience installing MySQL.

Some years ago, my client wanted to install UniCenta, an open source POS system. UniCenta itself supported many well-known databases. The first choice in my head was MySQL, well ... I chose it because I heard a lot about it.

I downloaded and tried to install MySQL on the client's computer, a Windows 7 system. It said it requires dot net version xxx. I checked the computer, the system only had version 3.5 installed. So I tried the older version of MySQL that can run on dot net 3.5. Unfortunately, it said it requires certain version MS VC++. So I tried to install that MS VC++. Yet I couldn't install it, because that required the Windows to update to the newer service pack.

I gave up. After doing some research on the web, they said MariaDB can be used as a drop-in replacement for MySQL. Because MariaDB is a fork of MySQL, I didn't think I would have better luck. Surprisingly to me, I could install MariaDB on the first attempt.

That was my story installing MySQL. My first try and I believe that would be my last.

Zvoni

  • Hero Member
  • *****
  • Posts: 2319
Re: MySQL or MariaDB
« Reply #3 on: June 28, 2022, 02:07:15 pm »
I cannot say much about the license, and I'm not an expert in database programming. But I have bad experience installing MySQL.

Some years ago, my client wanted to install UniCenta, an open source POS system. UniCenta itself supported many well-known databases. The first choice in my head was MySQL, well ... I chose it because I heard a lot about it.

I downloaded and tried to install MySQL on the client's computer, a Windows 7 system. It said it requires dot net version xxx. I checked the computer, the system only had version 3.5 installed. So I tried the older version of MySQL that can run on dot net 3.5. Unfortunately, it said it requires certain version MS VC++. So I tried to install that MS VC++. Yet I couldn't install it, because that required the Windows to update to the newer service pack.

I gave up. After doing some research on the web, they said MariaDB can be used as a drop-in replacement for MySQL. Because MariaDB is a fork of MySQL, I didn't think I would have better luck. Surprisingly to me, I could install MariaDB on the first attempt.

That was my story installing MySQL. My first try and I believe that would be my last.
This has nothing to do with MySQL, but everything with Winbloze.
And i've installed MySQL enough times on FreeBSD and/or Linux, to not need more than 20 minutes including initial setup of Root-Password etc.
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

Handoko

  • Hero Member
  • *****
  • Posts: 5130
  • My goal: build my own game engine using Lazarus
Re: MySQL or MariaDB
« Reply #4 on: June 28, 2022, 02:28:57 pm »
I understand that is not all MySQL fault. But I can't understand why (older versions of) MySQL Windows depended so much on .Net and Ms VC++ and Win7 latest service pack. They could make it more old-system friendly, at least I could install MariaDB latest version on that system, which MySQL older versions refused to install.

MySQL
Quote
Requirements for Windows
The following prerequisites are available at the Microsoft Download Center:
- Microsoft .NET Framework 4.5.2
- Microsoft Visual C++ 2015-2022 Redistributable
- Microsoft Windows 11 or Windows Server 2022
Source: https://dev.mysql.com/doc/workbench/en/wb-requirements.html

I checked MariaDB requirements, they do not mention any .Net, Visual C/++ nor latest version of Windows.
« Last Edit: June 28, 2022, 02:31:58 pm by Handoko »

Zvoni

  • Hero Member
  • *****
  • Posts: 2319
Re: MySQL or MariaDB
« Reply #5 on: June 28, 2022, 02:59:56 pm »
I understand that is not all MySQL fault. But I can't understand why (older versions of) MySQL Windows depended so much on .Net and Ms VC++ and Win7 latest service pack. They could make it more old-system friendly, at least I could install MariaDB latest version on that system, which MySQL older versions refused to install.

MySQL
Quote
Requirements for Windows
The following prerequisites are available at the Microsoft Download Center:
- Microsoft .NET Framework 4.5.2
- Microsoft Visual C++ 2015-2022 Redistributable
- Microsoft Windows 11 or Windows Server 2022
Source: https://dev.mysql.com/doc/workbench/en/wb-requirements.html

I checked MariaDB requirements, they do not mention any .Net, Visual C/++ nor latest version of Windows.
I've even gone on to install VirtualBox on Windows (host) if there was no choice, setting up a VM with FreeBSD or Linux as Guest-OS with LAN-Bridge (so the VM appears as its own computer in the LAN), installed MySQL there with no hassle, and Full Steam ahead *shrug*
I've stopped bothering around with the (marketing) intricacies of Micro$oft
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

calm_sea

  • New Member
  • *
  • Posts: 39
Re: MySQL or MariaDB
« Reply #6 on: June 28, 2022, 03:23:13 pm »
it's strange. I have used MySQL and MariaDB in many ways, Linux, Windows, with virtualbox, with docker. I never had problems. However my question was about the licenses, in particular about the client libraries to be distributed with the application

Handoko

  • Hero Member
  • *****
  • Posts: 5130
  • My goal: build my own game engine using Lazarus
Re: MySQL or MariaDB
« Reply #7 on: June 28, 2022, 04:18:01 pm »
First of all I am not a lawyer, so please correct me if I am wrong. Also, English is not my native language.

MariaDB
- Server is licensed in GPLv2
- Client library is licensed in LGPLv2

MySQL
- Licensed in GPLv2
- Commercial license (for closed-source projects)

Sources:
https://www.mysql.com/about/legal/licensing/oem/
https://en.wikipedia.org/wiki/GPL_linking_exception
https://en.wikipedia.org/wiki/GNU_General_Public_License#Linking_and_derived_works
https://en.wikipedia.org/wiki/GNU_General_Public_License#Compatibility_and_multi-licensing

We all know GPL-licensed software is free. But GPL has limitations. I forget where is the page explaining it, but I still remember we cannot distribute proprietary program together with GPL-licensed software/library as a single bundle. The 'solution' for this issue is distributing your closed-source program alone and let users to download the GPL licensed software/library.

MariaDB's client library is licensed in LGPLv2. That sounds good but still it has a limitation. I guess most of you already know most of Lazarus default installed components are licensed in LGPL too. But they're not exactly the same. In the case of Lazarus, those components have linking exception. Without linking exception, the software that uses LGPL library has to link to the library dynamically. Any code that is statically link to LGPL library has to be released under GPL-compatible licenses, unless the LGPL license has linking exception.

A good point for MySQL is, they provide commercial license if you or your clients are willing to pay.
« Last Edit: June 28, 2022, 06:34:53 pm by Handoko »

calm_sea

  • New Member
  • *
  • Posts: 39
Re: MySQL or MariaDB
« Reply #8 on: June 28, 2022, 10:49:20 pm »
Thanks for your answer. I am not sure if the MariaDB client can be used. I think the link is dynamic because I need the dll file (or .so). From what you say it's ok, isn't it?
ps: what about firebird? it declares MPL modified

Zvoni

  • Hero Member
  • *****
  • Posts: 2319
Re: MySQL or MariaDB
« Reply #9 on: June 28, 2022, 11:00:54 pm »
I‘d rather go with PostgreSQL instead of Firebird in this case
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

af0815

  • Hero Member
  • *****
  • Posts: 1289
Re: MySQL or MariaDB
« Reply #10 on: June 29, 2022, 08:37:19 am »
However my question was about the licenses, in particular about the client libraries to be distributed with the application
Is the client library in the distribution, have at minimum LGPL and you only link dynamical it is ok. With LGPL included the linking exception you can also link according the license static too.

But for absolutly safy, ask a lawyer who is knowing softwarerigths.
regards
Andreas

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1106
Re: MySQL or MariaDB
« Reply #11 on: June 29, 2022, 11:38:45 pm »
Hello! For a proprietary licensed project, is it better to use MySQL or MariaDB as a server? Does the problem arise only for client licenses? Are those of Lazarus LGPL? I had a doubt because I read in wikipedia that only MariaDB has an LGPL license (therefore for closed source projects)
If download size matters (because final installation size is always bigger):

Download PostgreSQL
Open source PostgreSQL packages and installers from EDB
PostgreSQL Version  14.4
Windows x86-64
File size: 298 MB
https://www.enterprisedb.com/downloads/postgres-postgresql-downloads
postgresql-14.4-1-windows-x64.exe


Release date: 2022-05-21
File name: mariadb-10.8.3-winx64.msi
File size: 65.3 MB
https://mariadb.org/download/?t=mariadb&p=mariadb&r=10.8.3&os=windows&cpu=x86_64&pkg=msi&m=fder


December 22, 2021
Win64  64-bit Kits
Windows executable installer, recommended for first-time users
Firebird-4.0.1.2692-0-x64.exe    25 MB    
https://firebirdsql.org/en/firebird-4-0-1/


Maybe you should also consider how much hungry for hardware resources each one of them is.


Thanks for your answer. I am not sure if the MariaDB client can be used. I think the link is dynamic because I need the dll file (or .so). From what you say it's ok, isn't it?
ps: what about firebird? it declares MPL modified
Firebird is really completely free for both commercial and open source projects.

Handoko

  • Hero Member
  • *****
  • Posts: 5130
  • My goal: build my own game engine using Lazarus
Re: MySQL or MariaDB
« Reply #12 on: June 30, 2022, 07:55:28 am »
... if the MariaDB client can be used. I think the link is dynamic because I need the dll file (or .so). From what you say it's ok, isn't it?

From what I understand on the LGPL linking is they want to make sure users can freely modify/improve and update the LGPL library used in the closed source program. This is the FAQ explaining the case of static linking of LGPL:

Quote
(1) If you statically link against an LGPLed library, you must also provide your application in an object (not necessarily source) format, so that a user has the opportunity to modify the library and relink the application.
https://www.gnu.org/licenses/gpl-faq.html#LGPLStaticVsDynamic

So I think static linking is allowed if the programmer provides a 'way' to let users to update the LGPL library used in the program. I haven't try but if your Lazarus-generated application uses the database client library and the program will still run if users replace/update that client library to a newer version.

ps: what about firebird? it declares MPL modified

Firebird is licensed in IPL and IDPL, both are variants of the Mozilla Public Licence V.1.1 (MPL).
https://firebirdsql.org/manual/qsg2-firebird-licenses.html
https://firebirdsql.org/en/licensing/

These are what I know about MPL:

MPL license is more permissive than GPL/LGPL, it allows static and dynamic linking to proprietary projects. You can choose whatever license you like on your final projects (the larger work), you are even allowed to modify the MPL code used in your closed source projects.

- MPL 2.0 is compatible with GPL, but MPL 1.1 is not compatible with GPL.
- You need to inform users your final project uses MPL library and where to get that MPL library.
- Any modification on the MPL code must make public, except in private use.

https://www.mozilla.org/en-US/MPL/1.1/FAQ/

 

TinyPortal © 2005-2018