How To Install python3-mysqlclient on Fedora 36

In this tutorial we learn how to install python3-mysqlclient in Fedora 36. python3-mysqlclient is MySQL/mariaDB database connector for Python

Introduction

In this tutorial we learn how to install python3-mysqlclient on Fedora 36.

What is python3-mysqlclient

MySQLdb is an interface to the popular MySQL database server that provides the Python database API.

We can use yum or dnf to install python3-mysqlclient on Fedora 36. In this tutorial we discuss both methods but you only need to choose one of method to install python3-mysqlclient.

Install python3-mysqlclient on Fedora 36 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install python3-mysqlclient using dnf by running the following command:

sudo dnf -y install python3-mysqlclient

Install python3-mysqlclient on Fedora 36 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install python3-mysqlclient using yum by running the following command:

sudo yum -y install python3-mysqlclient

How To Uninstall python3-mysqlclient on Fedora 36

To uninstall only the python3-mysqlclient package we can use the following command:

sudo dnf remove python3-mysqlclient

python3-mysqlclient Package Contents on Fedora 36

/usr/lib/.build-id
/usr/lib/.build-id/47
/usr/lib/.build-id/47/f76b1f7e10d889e79ba015248732e094d1b9e0
/usr/lib64/python3.10/site-packages/MySQLdb
/usr/lib64/python3.10/site-packages/MySQLdb/__init__.py
/usr/lib64/python3.10/site-packages/MySQLdb/__pycache__
/usr/lib64/python3.10/site-packages/MySQLdb/__pycache__/__init__.cpython-310.opt-1.pyc
/usr/lib64/python3.10/site-packages/MySQLdb/__pycache__/__init__.cpython-310.pyc
/usr/lib64/python3.10/site-packages/MySQLdb/__pycache__/_exceptions.cpython-310.opt-1.pyc
/usr/lib64/python3.10/site-packages/MySQLdb/__pycache__/_exceptions.cpython-310.pyc
/usr/lib64/python3.10/site-packages/MySQLdb/__pycache__/connections.cpython-310.opt-1.pyc
/usr/lib64/python3.10/site-packages/MySQLdb/__pycache__/connections.cpython-310.pyc
/usr/lib64/python3.10/site-packages/MySQLdb/__pycache__/converters.cpython-310.opt-1.pyc
/usr/lib64/python3.10/site-packages/MySQLdb/__pycache__/converters.cpython-310.pyc
/usr/lib64/python3.10/site-packages/MySQLdb/__pycache__/cursors.cpython-310.opt-1.pyc
/usr/lib64/python3.10/site-packages/MySQLdb/__pycache__/cursors.cpython-310.pyc
/usr/lib64/python3.10/site-packages/MySQLdb/__pycache__/release.cpython-310.opt-1.pyc
/usr/lib64/python3.10/site-packages/MySQLdb/__pycache__/release.cpython-310.pyc
/usr/lib64/python3.10/site-packages/MySQLdb/__pycache__/times.cpython-310.opt-1.pyc
/usr/lib64/python3.10/site-packages/MySQLdb/__pycache__/times.cpython-310.pyc
/usr/lib64/python3.10/site-packages/MySQLdb/_exceptions.py
/usr/lib64/python3.10/site-packages/MySQLdb/_mysql.cpython-310-x86_64-linux-gnu.so
/usr/lib64/python3.10/site-packages/MySQLdb/connections.py
/usr/lib64/python3.10/site-packages/MySQLdb/constants
/usr/lib64/python3.10/site-packages/MySQLdb/constants/CLIENT.py
/usr/lib64/python3.10/site-packages/MySQLdb/constants/CR.py
/usr/lib64/python3.10/site-packages/MySQLdb/constants/ER.py
/usr/lib64/python3.10/site-packages/MySQLdb/constants/FIELD_TYPE.py
/usr/lib64/python3.10/site-packages/MySQLdb/constants/FLAG.py
/usr/lib64/python3.10/site-packages/MySQLdb/constants/__init__.py
/usr/lib64/python3.10/site-packages/MySQLdb/constants/__pycache__
/usr/lib64/python3.10/site-packages/MySQLdb/constants/__pycache__/CLIENT.cpython-310.opt-1.pyc
/usr/lib64/python3.10/site-packages/MySQLdb/constants/__pycache__/CLIENT.cpython-310.pyc
/usr/lib64/python3.10/site-packages/MySQLdb/constants/__pycache__/CR.cpython-310.opt-1.pyc
/usr/lib64/python3.10/site-packages/MySQLdb/constants/__pycache__/CR.cpython-310.pyc
/usr/lib64/python3.10/site-packages/MySQLdb/constants/__pycache__/ER.cpython-310.opt-1.pyc
/usr/lib64/python3.10/site-packages/MySQLdb/constants/__pycache__/ER.cpython-310.pyc
/usr/lib64/python3.10/site-packages/MySQLdb/constants/__pycache__/FIELD_TYPE.cpython-310.opt-1.pyc
/usr/lib64/python3.10/site-packages/MySQLdb/constants/__pycache__/FIELD_TYPE.cpython-310.pyc
/usr/lib64/python3.10/site-packages/MySQLdb/constants/__pycache__/FLAG.cpython-310.opt-1.pyc
/usr/lib64/python3.10/site-packages/MySQLdb/constants/__pycache__/FLAG.cpython-310.pyc
/usr/lib64/python3.10/site-packages/MySQLdb/constants/__pycache__/__init__.cpython-310.opt-1.pyc
/usr/lib64/python3.10/site-packages/MySQLdb/constants/__pycache__/__init__.cpython-310.pyc
/usr/lib64/python3.10/site-packages/MySQLdb/converters.py
/usr/lib64/python3.10/site-packages/MySQLdb/cursors.py
/usr/lib64/python3.10/site-packages/MySQLdb/release.py
/usr/lib64/python3.10/site-packages/MySQLdb/times.py
/usr/lib64/python3.10/site-packages/mysqlclient-2.0.3-py3.10.egg-info
/usr/lib64/python3.10/site-packages/mysqlclient-2.0.3-py3.10.egg-info/PKG-INFO
/usr/lib64/python3.10/site-packages/mysqlclient-2.0.3-py3.10.egg-info/SOURCES.txt
/usr/lib64/python3.10/site-packages/mysqlclient-2.0.3-py3.10.egg-info/dependency_links.txt
/usr/lib64/python3.10/site-packages/mysqlclient-2.0.3-py3.10.egg-info/top_level.txt
/usr/share/doc/python3-mysqlclient
/usr/share/doc/python3-mysqlclient/HISTORY.rst
/usr/share/doc/python3-mysqlclient/README.md
/usr/share/licenses/python3-mysqlclient
/usr/share/licenses/python3-mysqlclient/LICENSE

References

Summary

In this tutorial we learn how to install python3-mysqlclient on Fedora 36 using yum and [dnf]((/fedora/36/dnf/).