Use it to operate or troubleshoot MariaDB/MySQL servers.
MariaDB / MySQL
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.
1. systemctl status mariadb (or mysqld) and the error log.
2. SHOW GLOBAL STATUS LIKE 'Threads_connected'; vs max_connections.
3. Buffer pool size and hit rate.
4. Slow log enabled?
5. Replication status if used.
client → mysqld → InnoDB (buffer pool, redo, binlog) → disk
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. Preserve the first divergent observation and repeat the same bounded verification after remediation.
Continue only after interpreting the current observation.Context & applicabilityCommon mistakes · platform/version boundaries
Databases owns MariaDB/MySQL engine behavior. Linux/Windows own the service host; Storage owns underlying disk/filesystem reliability; Security owns broader credential policy.
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Verification workflow Verify boundary
Confirm server product/version, active configuration variables, listening socket/port, authentication account/host match and InnoDB health. For data protection, show a restore into an isolated target; for replication, verify source position/GTID state and replica apply health/lag.
Step 2 Failure signatures and limits Narrow the fault
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.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
Subtopics
Go one level deeper into this subject.
The InnoDB buffer pool caches table and index pages in memory; its size is the most important MySQL/MariaDB performance setting.
Subtopic MySQL Users and PrivilegesMySQL and MariaDB accounts are user@host pairs with privileges granted per database, table or globally.
Subtopic MySQL Binary Log and ReplicationThe binary log records data changes; replicas read it from the source to stay in sync, and it is also used for point-in-time recovery.
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.
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
ReferenceWhat it is1 section · depth on demand
Operating model
MariaDB / MySQL covers operation of the MySQL-family server with InnoDB as the normal transactional engine: server configuration, schemas/users/privileges, connection handling, logs, binary logging, backup/restore and replication. Product/version differences between MariaDB and Oracle MySQL must be checked before copying configuration or replication features.
ReferenceHow it works1 section · depth on demand
In depth
MariaDB and MySQL are widely used open-source relational databases sharing a common origin. Most production setups use the InnoDB storage engine, which provides transactions, row-level locking and crash recovery.
Operational essentials:
| Area | Practice |
|---|---|
| Configuration | innodb_buffer_pool_size ~50–75% of RAM on dedicated servers; max_connections sized realistically |
| Security | mariadb-secure-installation, no anonymous users, accounts restricted by host, TLS |
| Backup | mariadb-backup/xtrabackup (hot physical) or mariadb-dump --single-transaction (logical) plus binary logs for point-in-time recovery |
| Replication | Binary log based (GTID), Galera cluster for multi-primary (MariaDB) |
| Monitoring | Slow query log, performance_schema, SHOW GLOBAL STATUS |
mariadb -e "SHOW GLOBAL STATUS LIKE 'Threads_connected'; SHOW PROCESSLIST;"
mariadb-dump --single-transaction --routines --triggers appdb | gzip > appdb.sql.gz
MariaDB and MySQL have diverged (versions, features, GTID formats) — check compatibility before replicating or migrating between them.
ReferenceImportant terms & boundaries1 section · depth on demand
Scope map
- Server architecture
- Databases/users/privileges
- InnoDB
- Configuration files and variables
- Logs
- Connection troubleshooting
- Backup/restore
- Binary log and replication
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Configuration & expected output
Concrete examples are shown only when the stored reference contains an actual configuration or output shape for this Topic.
Configuration example
Assumptions: Values sized for a dedicated 16 GB server; adjust to your memory and workload.
# /etc/mysql/mariadb.conf.d/60-app.cnf
[mysqld]
bind-address = 10.0.10.21
max_connections = 300
innodb_buffer_pool_size = 10G
innodb_log_file_size = 1G
innodb_flush_log_at_trx_commit = 1
sync_binlog = 1
log_bin = mysql-bin
binlog_format = ROWExpected output
mariadb -e "SHOW GLOBAL VARIABLES WHERE Variable_name IN ('innodb_buffer_pool_size','innodb_flush_log_at_trx_commit','log_bin');"Expected state: The running server reports the values from the option file.
+--------------------------------+-------------+
| Variable_name | Value |
+--------------------------------+-------------+
| innodb_buffer_pool_size | 10737418240 |
| innodb_flush_log_at_trx_commit | 1 |
| log_bin | ON |
+--------------------------------+-------------+Edits to the file only take effect after restart unless the variable is dynamic; always read the live value back. Illustrative authored output: field layout matches the tool, values will differ in your environment.Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Documentation verification: confirms the upstream model used by the Topic. It does not assert local production behavior.
Basis: https://mariadb.com/docs/server/ · confidence 92%What changed and what may be affected
Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.
Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
MariaDB / MySQL verification boundary matrix
A compact lookup separating intent, owning component state, effective state and consumer-visible outcome for MariaDB / MySQL.
| 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 |
Deep reference
Design & tradeoffs
Scope
Databases owns MariaDB/MySQL engine behavior. Linux/Windows own the service host; Storage owns underlying disk/filesystem reliability; Security owns broader credential policy.