Install the MariaDB command-line client so you can connect, query, and manage MariaDB and MySQL databases from any operating system.
You need only the lightweight CLI to connect to remote MariaDB or MySQL servers for development, CI pipelines, or read-only analytics. Skipping the server saves memory and avoids port conflicts.
Run brew install mariadb-connector-c
for just the client libraries, or brew install mariadb
and link only the mariadb
binary with brew link --only --overwrite mariadb
.
Update APT, then run sudo apt update && sudo apt install mariadb-client
. Verify with mariadb --version
.
Enable the MariaDB repo or use the default. Run sudo dnf install mariadb
(Fedora) or sudo yum install MariaDB-client
(CentOS 7).
Download the MSI from MariaDB.org, choose "Client only," or install via Winget: winget install MariaDB.MariaDB -s winget
, then deselect "Server" during setup.
Use mariadb -h host -P 3306 -u dev_user -p ecommerce
. The prompt asks for the password and opens an interactive shell.
Run mariadb -e "SELECT 1" -h host -u dev_user -p
. A return value of 1
confirms the client works and credentials are valid.
Yes. The tool is backward-compatible with MySQL servers over the standard 3306 port.
You need elevated privileges for system-wide installs. Use Homebrew or portable binaries for user-level installs without root.