MariaDB
Introduction
MariaDB is a fork. MySQL. It's doing the same command developers that I once wrote. MySQL. For most applications, this is a drop-in replacement: the same protocols. Same connectors, same connectors. SQL.
How different is MySQL?
In practice, the difference is three things: MariaDB is growing faster.
Drawing storage engines (Aria, ColumnStore, Spider), optimizer here
more aggressive, and the licensing is fully open (GPLv2 without the
Oracle commercial clauses).
The reverse side: very fresh MySQL 8 features (for example, window)
functions in their latest form) may come to MariaDB with a delay.
Check the specific version, not the name of the DBMS.
Installation
sudo apt install -y mariadb-server
After installation, set the root password and remove anonymous users:
sudo mysql_secure_installation
Moving from MySQL
Staff path: mysqldump on the old base, dump reversal on the new one. Before that, check the versions and run. mysql_upgradeother than system tables The old format will remain and the server will not start.
mysqldump -u root -p --all-databases > full.sql
Storage engines
Default engine here Aria instead of MyISAM: crash safe and faster
Reading. ColumnStore (column storage) is connected for analytics
for heavy units, for sharding Spider, which folds
Tables across multiple servers are transparent to the application.
The rule is simple: OLTP lives on InnoDB/Aria.
ColumnStore, do not build it with crutches on the transaction engine.
What to monitor
Three metrics predict almost all incidents: slow queries (Enable slow query log with threshold per second) The buffer pool and the growth of binlogs. Once a quarter, drive. mysqlcheck --optimize large tables and Make sure that backups are not just created, but unfolded.