How To Install python39-PyMySQL on Rocky Linux 8

In this tutorial we learn how to install python39-PyMySQL on Rocky Linux 8. python39-PyMySQL is Pure-Python MySQL client library

Introduction

In this tutorial we learn how to install python39-PyMySQL on Rocky Linux 8.

What is python39-PyMySQL

This package contains a pure-Python MySQL client library. The goal of PyMySQL is to be a drop-in replacement for MySQLdb and work on CPython, PyPy, IronPython and Jython.

We can use yum or dnf to install python39-PyMySQL on Rocky Linux 8. In this tutorial we discuss both methods but you only need to choose one of method to install python39-PyMySQL.

Install python39-PyMySQL on Rocky Linux 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

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

sudo dnf -y install python39-PyMySQL

Install python39-PyMySQL on Rocky Linux 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

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

sudo yum -y install python39-PyMySQL

How To Uninstall python39-PyMySQL on Rocky Linux 8

To uninstall only the python39-PyMySQL package we can use the following command:

sudo dnf remove python39-PyMySQL

python39-PyMySQL Package Contents on Rocky Linux 8

/usr/lib/python3.9/site-packages/PyMySQL-0.10.1-py3.9.egg-info
/usr/lib/python3.9/site-packages/PyMySQL-0.10.1-py3.9.egg-info/PKG-INFO
/usr/lib/python3.9/site-packages/PyMySQL-0.10.1-py3.9.egg-info/SOURCES.txt
/usr/lib/python3.9/site-packages/PyMySQL-0.10.1-py3.9.egg-info/dependency_links.txt
/usr/lib/python3.9/site-packages/PyMySQL-0.10.1-py3.9.egg-info/requires.txt
/usr/lib/python3.9/site-packages/PyMySQL-0.10.1-py3.9.egg-info/top_level.txt
/usr/lib/python3.9/site-packages/pymysql
/usr/lib/python3.9/site-packages/pymysql/__init__.py
/usr/lib/python3.9/site-packages/pymysql/__pycache__
/usr/lib/python3.9/site-packages/pymysql/__pycache__/__init__.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/pymysql/__pycache__/__init__.cpython-39.pyc
/usr/lib/python3.9/site-packages/pymysql/__pycache__/_auth.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/pymysql/__pycache__/_auth.cpython-39.pyc
/usr/lib/python3.9/site-packages/pymysql/__pycache__/_compat.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/pymysql/__pycache__/_compat.cpython-39.pyc
/usr/lib/python3.9/site-packages/pymysql/__pycache__/_socketio.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/pymysql/__pycache__/_socketio.cpython-39.pyc
/usr/lib/python3.9/site-packages/pymysql/__pycache__/charset.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/pymysql/__pycache__/charset.cpython-39.pyc
/usr/lib/python3.9/site-packages/pymysql/__pycache__/connections.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/pymysql/__pycache__/connections.cpython-39.pyc
/usr/lib/python3.9/site-packages/pymysql/__pycache__/converters.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/pymysql/__pycache__/converters.cpython-39.pyc
/usr/lib/python3.9/site-packages/pymysql/__pycache__/cursors.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/pymysql/__pycache__/cursors.cpython-39.pyc
/usr/lib/python3.9/site-packages/pymysql/__pycache__/err.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/pymysql/__pycache__/err.cpython-39.pyc
/usr/lib/python3.9/site-packages/pymysql/__pycache__/optionfile.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/pymysql/__pycache__/optionfile.cpython-39.pyc
/usr/lib/python3.9/site-packages/pymysql/__pycache__/protocol.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/pymysql/__pycache__/protocol.cpython-39.pyc
/usr/lib/python3.9/site-packages/pymysql/__pycache__/times.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/pymysql/__pycache__/times.cpython-39.pyc
/usr/lib/python3.9/site-packages/pymysql/__pycache__/util.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/pymysql/__pycache__/util.cpython-39.pyc
/usr/lib/python3.9/site-packages/pymysql/_auth.py
/usr/lib/python3.9/site-packages/pymysql/_compat.py
/usr/lib/python3.9/site-packages/pymysql/_socketio.py
/usr/lib/python3.9/site-packages/pymysql/charset.py
/usr/lib/python3.9/site-packages/pymysql/connections.py
/usr/lib/python3.9/site-packages/pymysql/constants
/usr/lib/python3.9/site-packages/pymysql/constants/CLIENT.py
/usr/lib/python3.9/site-packages/pymysql/constants/COMMAND.py
/usr/lib/python3.9/site-packages/pymysql/constants/CR.py
/usr/lib/python3.9/site-packages/pymysql/constants/ER.py
/usr/lib/python3.9/site-packages/pymysql/constants/FIELD_TYPE.py
/usr/lib/python3.9/site-packages/pymysql/constants/FLAG.py
/usr/lib/python3.9/site-packages/pymysql/constants/SERVER_STATUS.py
/usr/lib/python3.9/site-packages/pymysql/constants/__init__.py
/usr/lib/python3.9/site-packages/pymysql/constants/__pycache__
/usr/lib/python3.9/site-packages/pymysql/constants/__pycache__/CLIENT.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/pymysql/constants/__pycache__/CLIENT.cpython-39.pyc
/usr/lib/python3.9/site-packages/pymysql/constants/__pycache__/COMMAND.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/pymysql/constants/__pycache__/COMMAND.cpython-39.pyc
/usr/lib/python3.9/site-packages/pymysql/constants/__pycache__/CR.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/pymysql/constants/__pycache__/CR.cpython-39.pyc
/usr/lib/python3.9/site-packages/pymysql/constants/__pycache__/ER.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/pymysql/constants/__pycache__/ER.cpython-39.pyc
/usr/lib/python3.9/site-packages/pymysql/constants/__pycache__/FIELD_TYPE.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/pymysql/constants/__pycache__/FIELD_TYPE.cpython-39.pyc
/usr/lib/python3.9/site-packages/pymysql/constants/__pycache__/FLAG.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/pymysql/constants/__pycache__/FLAG.cpython-39.pyc
/usr/lib/python3.9/site-packages/pymysql/constants/__pycache__/SERVER_STATUS.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/pymysql/constants/__pycache__/SERVER_STATUS.cpython-39.pyc
/usr/lib/python3.9/site-packages/pymysql/constants/__pycache__/__init__.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/pymysql/constants/__pycache__/__init__.cpython-39.pyc
/usr/lib/python3.9/site-packages/pymysql/converters.py
/usr/lib/python3.9/site-packages/pymysql/cursors.py
/usr/lib/python3.9/site-packages/pymysql/err.py
/usr/lib/python3.9/site-packages/pymysql/optionfile.py
/usr/lib/python3.9/site-packages/pymysql/protocol.py
/usr/lib/python3.9/site-packages/pymysql/times.py
/usr/lib/python3.9/site-packages/pymysql/util.py
/usr/share/doc/python39-PyMySQL
/usr/share/doc/python39-PyMySQL/README.rst
/usr/share/licenses/python39-PyMySQL
/usr/share/licenses/python39-PyMySQL/LICENSE

References

Summary

In this tutorial we learn how to install python39-PyMySQL on Rocky Linux 8 using yum and dnf.