Database (Percona/MySQL)

The DB layer on a BOA host is Percona Server, version-pinned per Devuan codename, with one shared server instance per host serving every Octopus instance, the Hostmaster front end, and every hosted site. This section documents the operating interface: how the server is installed and tuned, how /etc/mysql/my.cnf is deployed and protected, the nightly mydumper dump chain, the browser DB tools and their access model, and the graceful stop/start orchestrator the upgrade and self-heal paths drive.

Everything here is keyed to the live source: lib/functions/sql.sh.inc (install, the my.cnf template lifecycle, InnoDB sizing, the upgrade-time memory tuner), the per-DB dump scripts under aegir/tools/system/, the monitor/check/mysql.sh self-heal path, and the xtra.sh.inc GUI-tool installers. Two things the names suggest but the code does not do are called out explicitly: mycnfup is not the version migrator, and move_sql.sh does not move databases.

The architectural shape worth holding in mind:

  • One server, host-wide. A single Percona daemon, one my.cnf, one slow log, one set of binlogs. There is no per-Octopus DB split — per-instance separation is by user/database grants, not by socket or config.
  • The my.cnf is template-deployed, not generated. BOA copies aegir/conf/var/my.cnf.txt over /etc/mysql/my.cnf and sed-patches a handful of directives per Percona series. No per-host generation, no marker diff. _CUSTOM_CONFIG_SQL=YES is the only thing that stops the re-deploy.
  • Credentials never hit the command line. Every BOA-issued MySQL command authenticates via --defaults-file=/root/.my.cnf (or the implicit root read), so the root password never lands in /proc/<pid>/cmdline.

Pages

  • Percona install + tuning — supported versions per Devuan codename, the staged 5.7 → 8.0 → 8.4 in-place upgrade and its recovery guards, the real upgrade-time memory tuner (_tune_sql_memory_limits, not the dead memorytuner binary), _USE_MYSQLTUNER, server collation, and the monitor stack's high-load restart.
  • my.cnf lifecycle + mycnfup — how my.cnf is deployed and per-version sed-patched, the logging-reset-first invariant, the hardened template defaults, _CUSTOM_CONFIG_SQL protection, the conf.d/ drop-in pattern, and what mycnfup actually is (a memory tuner + mysqld controller).
  • Dumps with mydumper — the nightly mysql_backup.sh per-DB mydumper chain, the mysql system-schema mysqldump exception, retention (_DB_BACKUPS_TTL, basic-mode 3-day), the mysqldump/rsync 755 failure mode, mysql_repair.sh/mysql_cleanup.sh/purge_binlogs.sh, and restore.
  • DB GUI tools — Adminer and sqlbuddy (and retired Chive/CGP), their dedicated subdomain vhosts, the ADM/BDD xtras keywords, and the IP-allowlist + app-credential access model (there is no Aegir/Drupal SSO on these vhosts).
  • Graceful MySQLD controlmove_sql.sh: the clean stop/start/restart building block the InnoDB log-resize, Percona-upgrade, and self-heal paths drive. It moves no data.

See the Reference appendix for the consolidated _VAR and command tables, and Discontinued features for the dropped Simple Cluster (Percona XtraDB Cluster + ProxySQL + Galera) and Chive.