Executing brew install mariadb on legacy macOS environments initiates a multi-stage dependency resolution pipeline. During this phase, the package manager attempts to fetch or compile prerequisites such as cmake, openssl@3, groonga, pcre2, lz4, and zstd. Systems running older OS releases frequently trigger compatibility warnings from the repository maintainers, indicating that formulae may fail to compile correctly due to deprecated system toolchains.
When the installer attempts to link the compression libraries, the build process frequently halts with a dependency resolution failure:
Error: An exception occurred within a child process:
RuntimeError: /usr/local/opt/lz4 not present or broken
Please reinstall lz4.
This failure typically stems from a corrupted symllink or a partially installed compression library within the local Cellar. Clearing the broken state requires explicitly purging the problematic formula before triggering the main installation sequence:
# 1. Clear the corrupted lz4 state
brew remove lz4 --force
# 2. Re-evaluate dependencies and build the database server
brew install mariadb
Following the cleanup, the package manager successfully downloads and compiles the necessary components without interruption:
==> Installing mariadb dependencies: lz4, zstd
==> Pouring lz4--1.9.4.catalina.bottle.tar.gz
🍺 /usr/local/Cellar/lz4/1.9.4: 22 files, 680.2KB
==> Building zstd from source
==> cmake --build builddir && cmake --install builddir
🍺 /usr/local/Cellar/zstd/1.5.5: 31 files, 2.5MB
==> Applying patches and installing mariadb-11.3.2
🍺 /usr/local/Cellar/mariadb/11.3.2: 950 files, 228.6MB
Once the binaries are in place, initialize the database daemon and apply baseline security configurations:
# Launch and register the MariaDB background process
brew services start mariadb
# Verify the running service status
brew services info mariadb
# Execute the interactive security hardening routine
mysql_secure_installation
After authentication credentials are established, connect to the SQL interface to validate the storage angine and provision a test schema using modern character encoding standards:
mysql -u root -p
Inside the database client, execute the following statements to confirm functionality:
-- Initialize a new schema with modern Unicode support
CREATE DATABASE staging_env DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
-- Verify the creation parameters
SHOW CREATE DATABASE staging_env;