Linux Notes: MySQL - MariaDB
- The information presented here is intended for educational use by qualified computer technologists.
- The information presented here is provided free of charge, as-is, with no warranty of any kind.
Edit: 2026-01-18
Introduction (mostly copied from my OpenVMS page)
Relational Database Caveat:
(please read all items in this disclaimer before continuing)
- DB2 and Oracle-DB
represent the BMW and Mercedes Benz of the enterprise database industry. You will not find anything better.
- However, most charities, students, and small businesses can only afford Volkswagens and this is where MySQL and MariaDB
are popular.
- If your organization has any kind of annual IS/IT budget then you should stick with Oracle-Rdb (OpenVMS only) or Oracle-DB (all platforms) and
should pay for annual support.
- If you do not have the skills to fix problems yourself, or cannot tolerate problems lasting days-to-weeks, then you should never depend upon open
source software without some kind of active support contract. Why? Open source developers do not worry about things like: "who answers the call when Joe is
on vacation?" or "Joe just perished in a traffic accident". People who sell support contracts do worry about such things. On top of this, I have seen boundary issues
in open source software go unanswered for years. What "you may think is an important problem" might be ignored by the rest of the user community.
- MySQL support contracts are available from other companies including Oracle
- MariaDB support contracts are available from other companies including MariaDB Corporation Ab
MySQL
History (10k view)
- MySQL is a fully SQL-compliant "open source" relational database created by MySQL Ab of Sweden
- both the database, as well as the company, were named after "My", the older daughter of co-founder Michael "Monty" Widenius
- open-source means it could be acquired, installed and used, free-of-charge under the GPL license
- this company only made money by selling support
- The first version appeared in 1995 for the PC
- Sun Microsystems paid one billion dollars to acquire MySQL Ab in 2008
(not sure of the business model here since SUN intended to continue giving it away; perhaps they were thinking about paid support contracts)
- Oracle acquired SUN Microsystems, along with MySQL, in 2010 (the acquisition began in 2009)
- MySQL has diverted much attention (and perhaps a small amount of business) away from Oracle's flagship products so it should come as no surprise that Oracle
has been accused of delaying "bug fixes" as well as "product development". Consider these observations:
- InnoDB is a popular "ACID
compliant" storage engine used by the MySQL community since 2001. It was created by Innobase Oy
of Helsinki Finland which was purchased by Oracle in 2005
- BerkeleyDB (BDB) was a popular "ACID
compliant" storage engine when created in 1986 for use with BSD UNIX. It
was the default storage engine before MySQL-5.1 and was maintained by Sleepycat Software
which was purchased by Oracle in 2006
- After finalizing the purchase of Sun Microsystems in 2010, Oracle inserted a copyright notice along with a rights notice
into the client banner. The following example hails from MySQL-5.1
$ mysql -uroot mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 69
Server version: 5.1.46-log Source distribution
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
Nothing wrong with a copyright notice but it does make lawyers and developers nervous.
A few technical details
MariaDB
History (10k view)
- MariaDB is a fully SQL-compliant "open source" relational database created by MariaDB Corporation Ab of Sweden.
- both were named after "Maria", the younger daughter of co-founder Michael "Monty"
Widenius
- open-source means it could be acquired, installed and used, free-of-charge under the GPL license
- this company only made money by selling support
- Shortly after the purchase of MySQL Ab by SUN Microsystems in 2008, Widenius thought SUN was taking MySQL development in the wrong direction so
started his own company called Monty Program Ab. This company forked MySQL into MariaDB to keep it free. Monty Program Ab merged with SkySQL into
MariaDB Corporation Ab
- Acquisitions by Oracle (see above) along with other activities in 2011-2012 (see next link) made the Linux community nervous which is why MariaDB is now the preferred
relational database on most Linux distros (although you can replace it with MySQL if you desire)
A few technical details
Notes:
- this is an unfinished script (the NUMA stuff was never implemented)
- I used this on a 2-socket HPE DL385p_gen8 on June-2021 to disable all the cores associated with the second CPU
- this saved me from having to drive 160 km to swap out a box and/or unplug one CPU chip
- also, I did this on a running system so there is the convenience of not having to shutdown etc.
- this script should work on a 2-socket DL380p (but never tested by me)
- this script should work on a 4-socket DL580 or DL585 (but never tested by me)
- caveats:
- this script begins with three safety parameters (SOCKETS, CORES, THREADS). These must be changed for any platform other than the one I wrote this for so BE
VERY CAREFUL.
- If you do not know what you are doing then please call your resident computer technologist.
- changes made by this script are not permanent (so it you screw up then just power off followed by a reboot)
Linux-specific stuff
Initial Install
# ensure the optional epel repo is available
sudo yum list \*epel-release\*
# install epel
sudo yum install epel-release
#
sudo yum clean all
sudo yum makecache
sudo yum list mariadb\*
sudo yum install mariadb
update
Caveat: By using either YUM or DNF (on enterprise
Linux distros like RHEL) or APT (on Debian-based distros), it is possible to inadvertently update update your database engine. This has been known to cause some grief so
never do this unless you perform the following ritual:
# backup all of your databases (just in case)
mysqldump --user=neil --password=SuperSecret --all-databases --result-file=db_all_v04.sql
# -------------------------------
# now update your database engine (first two steps are optional)
sudo yum clean all
sudo yum makecache
# see what should be updated
sudo yum check-update
# update mariadb client + server packages
sudo yum update mariadb
# -------------------------------
# now run the database repair tool
# /usr/bin/mysql_upgrade --force -uroot -h127.0.0.1 -p

Back to
Home
Neil Rieck
Waterloo, Ontario, Canada.