MySQL and MariaDB: history, forks and practical use
Development began in 1994 when SQL was integrated into the existing Unireg system. The first official version appeared in December 1995. MySQL quickly gained ground in web applications and dynamic websites.
2. The acquisitions and the birth of MariaDB
In 2001, MySQL Finland Ab brought in investors and appointed Mårten Mickos as CEO. In 2003, the company signed an agreement with SAP and released MaxDB, a database for business applications.A crucial technological step followed in 2005: Oracle acquired the InnoDB storage engine. InnoDB provides transactions, referential integrity, and crash recovery — essential features for reliable databases. This acquisition gave Oracle control over a core component of an open source alternative, which later became a direct trigger for the fork.
In March 2008, Sun Microsystems acquired MySQL AB for 1 billion dollars. The announcement was on January 16, 2008, and the completion on February 26, 2008. The acquisition was short-lived: in April 2009, Oracle announced the acquisition of Sun Microsystems, including MySQL.
The open source community feared that Oracle would slow down development. Michael "Monty" Widenius, one of the original developers of MySQL, therefore started a fork in 2009 with other core developers: MariaDB. The first version, MariaDB 5.1.38, appeared on October 29, 2009.
3. MariaDB as an independent successor
MariaDB is technically a direct successor to MySQL and fully compatible. It retains the open source spirit and remains independent of commercial interests.In 2012, the MariaDB Foundation was established to ensure independent development. In October 2014, SkySQL Ab was renamed to MariaDB Corporation, which professionalized commercial support. In January 2016, Monty Widenius became CTO of MariaDB Corporation.
MariaDB offers additional features compared to MySQL: virtual columns, dynamic columns, better analytical capabilities, and new storage engines such as Aria and ColumnStore.
4. MySQL and MariaDB in Docker
In modern development practices, MySQL and MariaDB often run in containers. Docker Compose creates a consistent database environment for development, testing, and production.Below is an example for a Laravel stack with PHP-FPM, Nginx, and MariaDB:
version: '3.8'</p><p>services:
nginx:
image: nginx:1.25-alpine
ports:
- "8080:80"
volumes:
- ./src:/var/www/html
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
depends_on:
- php-fpm</p><p>php-fpm:
image: php:8.2-fpm
volumes:
- ./src:/var/www/html</p><p>mariadb:
image: mariadb:11.2
environment:
MARIADB_DATABASE: laravel
MARIADB_USER: laravel
MARIADB_PASSWORD: secret
MARIADB_ROOT_PASSWORD: rootsecret
ports:
- "3306:3306"
volumes:
- db_data:/var/lib/mysql</p><p>volumes:
db_data:Start the stack with:
docker compose up -d
The database is then reachable at `localhost:3306` with user `laravel` and password `secret`.
5. Graphical clients for MySQL and MariaDB
DBeaver Community
DBeaver Community is a free multi-platform database tool that supports MySQL, MariaDB, PostgreSQL, SQLite, and many other databases. It is based on Eclipse and offers an extensive interface for database management, SQL queries, and data analysis.Installation via Flatpak:
flatpak install flathub io.dbeaver.DBeaverCommunity
Sequeler
Sequeler is a user-friendly SQL client for MySQL, MariaDB, PostgreSQL, and SQLite. It offers a graphical interface for connections, SQL commands, tables, and data. Installation via Flatpak:flatpak install flathub com.github.alexkdeveloper.sequeler
SQuirreL SQL Client
SQuirreL SQL Client is a Java-based SQL client that works with any JDBC-compatible database, including MySQL and MariaDB. It supports drivers from various databases and is suitable for developers working with multiple database platforms.6. MySQL and MariaDB in monitoring
Both systems also run in infrastructure management. Cacti, a web-based monitoring tool, uses MariaDB to store and visualize network performance. It requires a web server and a database; MariaDB is one of the supported options.Installation of Cacti with MariaDB on Debian 12:
sudo apt update
sudo apt install mariadb-server cactiDuring installation, you configure the database for Cacti. The web interface is then accessible via `http://localhost/cacti`.
7. MySQL versus MariaDB: practical differences
The choice between MySQL and MariaDB depends on the use case. MariaDB is a drop-in replacement for MySQL and offers additional storage engines and better performance in some workloads. MySQL, however, has greater commercial support through Oracle and a longer track record in enterprise environments.For new projects on Linux with open source software, MariaDB is often the standard choice, as it continues community-driven development. For existing infrastructures with MySQL licenses or specific Oracle support, MySQL remains the safe option.
Verification
Check whether your database is running and which version is active:mysql --version
For MariaDB:
mariadb --version
Make a test connection:
mysql -u root -p -e "SELECT VERSION();"
In Docker:
docker compose exec mariadb mariadb -u root -p -e "SELECT VERSION();"
Frequently asked problems
Problem: Cannot connect to MySQL/MariaDB from another machine. Solution: check whether the database is listening on all interfaces. In `/etc/mysql/mariadb.conf.d/50-server.cnf` set `bind-address = 0.0.0.0` and restart the service:sudo systemctl restart mariadb
Problem: MySQL-dump does not work after migration to MariaDB. Solution: use `mariadb-dump` instead of `mysqldump` for full compatibility:
mariadb-dump -u root -p database > backup.sql
Problem: InnoDB tables become corrupted after a crash. Solution: start MariaDB with `innodb_force_recovery=1` in `/etc/mysql/mariadb.conf.d/50-server.cnf`, dump the data and restore the database:
sudo systemctl stop mariadb
sudo mysqld --innodb-force-recovery=1The history of MySQL shows how an open source project can grow into an industry standard and how a fork like MariaDB can continue the original values — the choice between the two determines not only your database, but also your position within the broader ecosystem.