MariaDB / MySQL
Cheat sheet · https://pcornel.dk/topic.php?topic=6090
Answer
MariaDB and MySQL are open-source relational databases, usually with the InnoDB storage engine, configured in my.cnf and managed with the mysql client and mysqladmin.
Remember
Know which fork and version (features differ). Tune innodb_buffer_pool_size first. Use the slow query log, binary logs for PITR/replication, and least-privilege users.
First checks
SHOW GLOBAL VARIABLES LIKE 'innodb_buffer_pool_size';— buffer pool sizepsql -c "SELECT now(), version();"— PostgreSQL reachable and versionmysql -e "SELECT NOW(), VERSION();"— MariaDB/MySQL reachable and versionsqlcmd -S <server> -Q "SELECT @@VERSION"— SQL Server reachable and version
Commands
SHOW GLOBAL STATUS
Verify in this order
client → mysqld → InnoDB (buffer pool, redo, binlog) → disk
Where it usually breaks
Failures commonly involve host-specific grants, authentication plugin differences, exhausted connections, InnoDB recovery/space pressure, binlog/GTID mismatches, replicas that are connected but not applying, and backups that were never restore-tested.
MariaDB / MySQL verification boundary matrix
| Boundary | Inspect | Healthy interpretation | Do not infer |
|---|---|---|---|
| Intent | Server architecture | Intended object/scope is explicit and versioned where relevant | Intent is already effective |
| Owning runtime/control plane | Databases/users/privileges / InnoDB | Owner accepts and reports the expected object state | Downstream dependencies are healthy |
| Effective state | Configuration files and variables | Independent read-back matches the intended state | Every client sees the same result |
| Consumer outcome | Logs | The original bounded check succeeds in the same time window | Production correctness outside this scope |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=6090