How to install mysql client on Fedora Linux

I am using Fedora Linux for testing and I was wondering is there a any way to only install the mysql client on Fedora desktop?

Fedora uses MariaDB by default instead of mysql from Oracle.

Installing mysql client on Fedora Linux

You can search it as follows:

sudo dnf list mariadb
sudo dnf search mariadb

Getting information about the mariadb

sudo dnf info mariadb
Last metadata expiration check: 0:23:59 ago on Wednesday 15 September 2021 12:43:51 PM.
Installed Packages
Name         : mariadb
Epoch        : 3
Version      : 10.5.12
Release      : 1.fc34
Architecture : x86_64
Size         : 38 M
Source       : mariadb-10.5.12-1.fc34.src.rpm
Repository   : @System
From repo    : updates
Summary      : A very fast and robust SQL database server
URL          : http://mariadb.org
License      : GPLv2 and LGPLv2
Description  : MariaDB is a community developed fork from MySQL - a multi-user, multi-threaded
             : SQL database server. It is a client/server implementation consisting of
             : a server daemon (mariadbd) and many different client programs and libraries.
             : The base package contains the standard MariaDB/MySQL client programs and
             : utilities.

The server part is in mariadb-server package:

sudo dnf info mariadb-server

Installation

So to install mysql client on your Fedora Linux system, run:

sudo dnf install mariadb

A note about Oracle MySQL 8 client

If you need Oracle mysql client then

sudo dnf search mysql | grep client
# get info
sudo dnf info community-mysql
Last metadata expiration check: 0:00:50 ago on Wednesday 15 September 2021 01:09:19 PM.
Available Packages
Name         : community-mysql
Version      : 8.0.26
Release      : 1.fc34
Architecture : x86_64
Size         : 2.5 M
Source       : community-mysql-8.0.26-1.fc34.src.rpm
Repository   : updates
Summary      : MySQL client programs and shared libraries
URL          : http://www.mysql.com
License      : GPLv2 with exceptions and LGPLv2 and BSD
Description  : MySQL is a multi-user, multi-threaded SQL database server. MySQL is a
             : client/server implementation consisting of a server daemon (mysqld)
             : and many different client programs and libraries. The base package
             : contains the standard MySQL client programs and generic MySQL files.

Install Oracle MySQL 8 client:

sudo dnf install community-mysql

I was trying mysql-client like Debian and no wonder the dnf said, not found. Such weird choice for package naming.


Linux sysadmin blog - Linux/Unix Howtos and Tutorials - Linux bash shell scripting wiki