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-31 (this new page is still under construction)
Introduction (some items copied from OpenVMS pages)
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
- Did you know that Wikipedia has employed MariaDB since 2013?
Why relational databases?
Relational databases are "relational in both time and space"
Consider the following example from Oracle 9i
- Alice and Bob are bank employees accessing a database consisting of one million accounts.
- At 9:00, Alice begins generating a financial report which will take 2 minutes to execute (caveat: must be a read-only select)
- At 9:01, Alice's report generator is halfway through the database.
- Now, Bob performs a transaction moving $25 from the first account to the last account then commits his changes before Alice's report is finished.
- In ISAM technology the $25 would be counted twice in Alice's report. Once on the first record and a
second time on the last.
- In a relational technology (with transaction support) Alice will not see any of Bob's changes because:
- all of Bob's before/after information is stored in the rollback segments (UNDO tables) along with the transaction time.
- When fetching Alice's report data, the engine will use the start time of her transactional query as a key while watching the UNDO tables to ensure she sees the
data as it was when she submitted the query at 9:00.
- It's as if Alice sees a "snapshot" of the whole database taken at 9:00, and "snapshot" is exactly what the file is called in Oracle-Rdb
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
Linux-specific stuff
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 backup-update-upgrade ritual (see
Engine Update below). This means that you must never do wild-card Linux updates. It is
better to do selective updates like so:
# showing the recipe for YUM-based Linux distros
# note: on new systems, executing 'yum' will invoke 'dnf'
# This was done as to not break installation scripts
# -------------------------------------------------------
sudo yum clean all
sudo yum make cache
# see what could be updated
sudo yum check-update
# if you see updates for packages beginning with a, b, c
sudo yum update a\* b\* c\*
# if you see updates for packages beginning with d, e, f
sudo yum update d\* e\* f\*
# only update the kernel if you are prepared to do a reboot
sudo yum update ker\*
reboot
Initial Install (both client + server)
# 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
Engine Update
# 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
CLI Examples

Back to
Home
Neil Rieck
Waterloo, Ontario, Canada.