MySQL and MariaDB are widely used for database management on Linux distributions like CentOS, Red Hat, and Fedora. Both systems offer powerful tools for managing relational databases and are essential for handling data in various environments.
While MySQL is a popular open-source database system, MariaDB was created as a compatible alternative with additional features. Installing the client version allows you to interact with a remote database server without the need to install the full server package. This setup is ideal for remote management and reduces resource consumption.
On systems like Fedora, Red Hat, and CentOS, installing the MySQL or MariaDB client can be done through package managers like yum and dnf. This enables efficient database management from the local machine without the overhead of running the full server.
Steps to install MySQL or MariaDB client on CentOS, Red Hat, or Fedora:
- Open a terminal on your system.
Ensure you have root or sudo privileges before proceeding.
- Update your system packages.
$ sudo dnf update -y
- Install the Extra Packages for Enterprise Linux (EPEL) repository on CentOS or Red Hat.
$ sudo dnf install epel-release -y
This repository provides additional software packages not included in the default repositories. This step is not needed on Fedora.
- Install the MySQL client or MariaDB client.
$ sudo yum install mysql-community-client $ sudo yum install MariaDB-client
Use either the MySQL or MariaDB client installation command depending on your preference.
- Verify the installation by checking the installed client version.
$ mysql --version $ mariadb --version

Mohd Shakir Zakaria is a cloud architect with deep roots in software development and open-source advocacy. Certified in AWS, Red Hat, VMware, ITIL, and Linux, he specializes in designing and managing robust cloud and on-premises infrastructures.
Comment anonymously. Login not required.