Manage MariaDB

SolidGroundUX DocumentationSolidGroundUX
NL

Install, configure, manage, validate, and inspect MariaDB

Source: target-root/usr/local/libexec/solidgroundux/manage-mariadb.sh

Install, configure, manage, validate, and inspect MariaDB

Public functions

Internal functions
FunctionPurposeArgumentsOutput
_db_default_client_cidrDetermine the subnet of the default-route IPv4 interface.——
_db_check_client_cidrValidate a single IPv4 address or a routed CIDR.——
_db_account_hostConvert CIDR to MariaDB's IPv4/netmask host format.——
_db_transitionFramework countdown before installation work.——
_db_confirmAsk for explicit installation approval.——
_db_failure_pauseKeep failures visible before the console redraws.——
_db_suggest_poolSuggest a quarter of physical RAM in megabytes.——
_db_require_ubuntuRequire supported platform before package writes.——
_db_installedCheck package state.——
_db_run_writeHonor SolidGroundUX dryrun before changing host.——
_db_restart_activeOnly restart when currently active.——
_db_check_portValidate TCP port argument.——
_db_serviceStart, stop, restart or inspect the MariaDB systemd service as requested.——
_db_firewallOpen the configured TCP port (not the database auth rules).——
_db_storageNo automatic migration of populated database files.——
_db_storage_checkReject unsafe filesystem roots, unmounted fstab targets and existing data.- $1: Filesystem path to inspect.—
_db_package_datadirDiscover the initialized package directory rather than assuming its path.——
_db_ensure_initializedInitialize only an empty and stopped package data directory.——
_db_apparmor_profileDiscover the distro-installed MariaDB AppArmor profile.——
_db_apparmor_prepareAllow MariaDB to access a custom datadir in its active profile.- $1: Data directory that requires AppArmor access.—
_db_apparmor_known_denialIdentify the tested Ubuntu mknod/c AppArmor denial since a start attempt.- $1: Timestamp from which AppArmor kernel denials are inspected.—
_db_apparmor_recoverOffer explicit, profile-only complain mode as a tested compatibility workaround.- $1: AppArmor profile path.—
_db_custom_datadirRelocate only freshly initialized package data to validated destination.- $1: Selected MariaDB data directory.—
_db_fresh_installInitialize a fresh MariaDB service using an arbitrary validated directory.——
_db_repositoryStock Ubuntu repos, no external keys or pinned versions.——
_db_installInstall engine using the selected Ubuntu packages.——
_db_toolsInstall standard engine command-line client.——
_db_logsDisplay recent service journal without another management UI.——
_db_backupClarify scope without implementing unsafe restore operations.——
_db_existing_installOffer inspection or reconfiguration options for an existing MariaDB installation.——
_db_prepareMirror SQL Server's tracked four-step preparation.——
_db_optionRead a selected MariaDB server setting from the active service or configuration.- $1: Configuration or response-field key.—
_db_portInvoke the port action through the module manager.——
_db_setWrite a MariaDB configuration setting through the selected configuration mechanism.- $1: Configuration or response-field key.—
_db_configureCollect and apply MariaDB port, bind address and buffer-pool settings.——
_db_storage_detailDisplay the configured database data directory.——
_db_networkReview or configure the MariaDB TCP port and bind address.——
_db_memoryReview or configure the MariaDB InnoDB buffer-pool size.——
_db_accessConfigure one workstation-scoped DBeaver administrator.——
_db_statusDisplay installed MariaDB package, service and configuration status.——
_db_validateCheck MariaDB installation and service prerequisites and report validation results.——
_run_actionExecute management action and retain its exit status.- $1: Management action to execute.—

Description

Install, configure, manage, validate, and inspect MariaDB.

Usage

Run the executable from its shell command (or installed wrapper):

manage-mariadb --action status
manage-mariadb --dryrun --action storage

Script-specific options:

  • --action NAME, -a: Management action (supported actions: prepare, repository, install, configure, storage, network, memory, access, service, firewall, tools, validate, status, logs, backup).

MariaDB-specific operations

SolidGroundUX writes a dedicated override rather than patching distro files.