How To Install python3-PyMySQL on Rocky Linux 8

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

Introduction

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

What is python3-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 python3-PyMySQL on Rocky Linux 8. In this tutorial we discuss both methods but you only need to choose one of method to install python3-PyMySQL.

Install python3-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 python3-PyMySQL using dnf by running the following command:

sudo dnf -y install python3-PyMySQL

Install python3-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 python3-PyMySQL using yum by running the following command:

sudo yum -y install python3-PyMySQL

How To Uninstall python3-PyMySQL on Rocky Linux 8

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

sudo dnf remove python3-PyMySQL

python3-PyMySQL Package Contents on Rocky Linux 8

/usr/lib/python3.6/site-packages/PyMySQL-0.10.1-py3.6.egg-info
/usr/lib/python3.6/site-packages/PyMySQL-0.10.1-py3.6.egg-info/PKG-INFO
/usr/lib/python3.6/site-packages/PyMySQL-0.10.1-py3.6.egg-info/SOURCES.txt
/usr/lib/python3.6/site-packages/PyMySQL-0.10.1-py3.6.egg-info/dependency_links.txt
/usr/lib/python3.6/site-packages/PyMySQL-0.10.1-py3.6.egg-info/requires.txt
/usr/lib/python3.6/site-packages/PyMySQL-0.10.1-py3.6.egg-info/top_level.txt
/usr/lib/python3.6/site-packages/pymysql
/usr/lib/python3.6/site-packages/pymysql/__init__.py
/usr/lib/python3.6/site-packages/pymysql/__pycache__
/usr/lib/python3.6/site-packages/pymysql/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/__pycache__/__init__.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/__pycache__/_auth.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/__pycache__/_auth.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/__pycache__/_compat.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/__pycache__/_compat.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/__pycache__/_socketio.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/__pycache__/_socketio.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/__pycache__/charset.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/__pycache__/charset.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/__pycache__/connections.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/__pycache__/connections.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/__pycache__/converters.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/__pycache__/converters.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/__pycache__/cursors.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/__pycache__/cursors.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/__pycache__/err.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/__pycache__/err.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/__pycache__/optionfile.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/__pycache__/optionfile.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/__pycache__/protocol.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/__pycache__/protocol.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/__pycache__/times.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/__pycache__/times.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/__pycache__/util.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/__pycache__/util.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/_auth.py
/usr/lib/python3.6/site-packages/pymysql/_compat.py
/usr/lib/python3.6/site-packages/pymysql/_socketio.py
/usr/lib/python3.6/site-packages/pymysql/charset.py
/usr/lib/python3.6/site-packages/pymysql/connections.py
/usr/lib/python3.6/site-packages/pymysql/constants
/usr/lib/python3.6/site-packages/pymysql/constants/CLIENT.py
/usr/lib/python3.6/site-packages/pymysql/constants/COMMAND.py
/usr/lib/python3.6/site-packages/pymysql/constants/CR.py
/usr/lib/python3.6/site-packages/pymysql/constants/ER.py
/usr/lib/python3.6/site-packages/pymysql/constants/FIELD_TYPE.py
/usr/lib/python3.6/site-packages/pymysql/constants/FLAG.py
/usr/lib/python3.6/site-packages/pymysql/constants/SERVER_STATUS.py
/usr/lib/python3.6/site-packages/pymysql/constants/__init__.py
/usr/lib/python3.6/site-packages/pymysql/constants/__pycache__
/usr/lib/python3.6/site-packages/pymysql/constants/__pycache__/CLIENT.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/constants/__pycache__/CLIENT.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/constants/__pycache__/COMMAND.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/constants/__pycache__/COMMAND.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/constants/__pycache__/CR.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/constants/__pycache__/CR.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/constants/__pycache__/ER.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/constants/__pycache__/ER.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/constants/__pycache__/FIELD_TYPE.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/constants/__pycache__/FIELD_TYPE.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/constants/__pycache__/FLAG.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/constants/__pycache__/FLAG.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/constants/__pycache__/SERVER_STATUS.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/constants/__pycache__/SERVER_STATUS.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/constants/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/constants/__pycache__/__init__.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/converters.py
/usr/lib/python3.6/site-packages/pymysql/cursors.py
/usr/lib/python3.6/site-packages/pymysql/err.py
/usr/lib/python3.6/site-packages/pymysql/optionfile.py
/usr/lib/python3.6/site-packages/pymysql/protocol.py
/usr/lib/python3.6/site-packages/pymysql/times.py
/usr/lib/python3.6/site-packages/pymysql/util.py
/usr/share/doc/python3-PyMySQL
/usr/share/doc/python3-PyMySQL/README.rst
/usr/share/licenses/python3-PyMySQL
/usr/share/licenses/python3-PyMySQL/LICENSE
/usr/lib/python3.6/site-packages/PyMySQL-0.8.0-py3.6.egg-info
/usr/lib/python3.6/site-packages/PyMySQL-0.8.0-py3.6.egg-info/PKG-INFO
/usr/lib/python3.6/site-packages/PyMySQL-0.8.0-py3.6.egg-info/SOURCES.txt
/usr/lib/python3.6/site-packages/PyMySQL-0.8.0-py3.6.egg-info/dependency_links.txt
/usr/lib/python3.6/site-packages/PyMySQL-0.8.0-py3.6.egg-info/top_level.txt
/usr/lib/python3.6/site-packages/pymysql
/usr/lib/python3.6/site-packages/pymysql/__init__.py
/usr/lib/python3.6/site-packages/pymysql/__pycache__
/usr/lib/python3.6/site-packages/pymysql/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/__pycache__/__init__.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/__pycache__/_compat.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/__pycache__/_compat.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/__pycache__/_socketio.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/__pycache__/_socketio.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/__pycache__/charset.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/__pycache__/charset.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/__pycache__/connections.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/__pycache__/connections.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/__pycache__/converters.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/__pycache__/converters.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/__pycache__/cursors.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/__pycache__/cursors.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/__pycache__/err.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/__pycache__/err.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/__pycache__/optionfile.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/__pycache__/optionfile.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/__pycache__/times.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/__pycache__/times.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/__pycache__/util.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/__pycache__/util.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/_compat.py
/usr/lib/python3.6/site-packages/pymysql/_socketio.py
/usr/lib/python3.6/site-packages/pymysql/charset.py
/usr/lib/python3.6/site-packages/pymysql/connections.py
/usr/lib/python3.6/site-packages/pymysql/constants
/usr/lib/python3.6/site-packages/pymysql/constants/CLIENT.py
/usr/lib/python3.6/site-packages/pymysql/constants/COMMAND.py
/usr/lib/python3.6/site-packages/pymysql/constants/CR.py
/usr/lib/python3.6/site-packages/pymysql/constants/ER.py
/usr/lib/python3.6/site-packages/pymysql/constants/FIELD_TYPE.py
/usr/lib/python3.6/site-packages/pymysql/constants/FLAG.py
/usr/lib/python3.6/site-packages/pymysql/constants/SERVER_STATUS.py
/usr/lib/python3.6/site-packages/pymysql/constants/__init__.py
/usr/lib/python3.6/site-packages/pymysql/constants/__pycache__
/usr/lib/python3.6/site-packages/pymysql/constants/__pycache__/CLIENT.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/constants/__pycache__/CLIENT.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/constants/__pycache__/COMMAND.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/constants/__pycache__/COMMAND.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/constants/__pycache__/CR.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/constants/__pycache__/CR.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/constants/__pycache__/ER.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/constants/__pycache__/ER.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/constants/__pycache__/FIELD_TYPE.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/constants/__pycache__/FIELD_TYPE.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/constants/__pycache__/FLAG.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/constants/__pycache__/FLAG.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/constants/__pycache__/SERVER_STATUS.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/constants/__pycache__/SERVER_STATUS.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/constants/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/constants/__pycache__/__init__.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/converters.py
/usr/lib/python3.6/site-packages/pymysql/cursors.py
/usr/lib/python3.6/site-packages/pymysql/err.py
/usr/lib/python3.6/site-packages/pymysql/optionfile.py
/usr/lib/python3.6/site-packages/pymysql/tests
/usr/lib/python3.6/site-packages/pymysql/tests/__init__.py
/usr/lib/python3.6/site-packages/pymysql/tests/__pycache__
/usr/lib/python3.6/site-packages/pymysql/tests/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/tests/__pycache__/__init__.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/tests/__pycache__/base.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/tests/__pycache__/base.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/tests/__pycache__/test_DictCursor.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/tests/__pycache__/test_DictCursor.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/tests/__pycache__/test_SSCursor.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/tests/__pycache__/test_SSCursor.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/tests/__pycache__/test_basic.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/tests/__pycache__/test_basic.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/tests/__pycache__/test_connection.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/tests/__pycache__/test_connection.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/tests/__pycache__/test_converters.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/tests/__pycache__/test_converters.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/tests/__pycache__/test_cursor.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/tests/__pycache__/test_cursor.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/tests/__pycache__/test_err.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/tests/__pycache__/test_err.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/tests/__pycache__/test_issues.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/tests/__pycache__/test_issues.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/tests/__pycache__/test_load_local.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/tests/__pycache__/test_load_local.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/tests/__pycache__/test_nextset.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/tests/__pycache__/test_nextset.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/tests/__pycache__/test_optionfile.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/tests/__pycache__/test_optionfile.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/tests/base.py
/usr/lib/python3.6/site-packages/pymysql/tests/test_DictCursor.py
/usr/lib/python3.6/site-packages/pymysql/tests/test_SSCursor.py
/usr/lib/python3.6/site-packages/pymysql/tests/test_basic.py
/usr/lib/python3.6/site-packages/pymysql/tests/test_connection.py
/usr/lib/python3.6/site-packages/pymysql/tests/test_converters.py
/usr/lib/python3.6/site-packages/pymysql/tests/test_cursor.py
/usr/lib/python3.6/site-packages/pymysql/tests/test_err.py
/usr/lib/python3.6/site-packages/pymysql/tests/test_issues.py
/usr/lib/python3.6/site-packages/pymysql/tests/test_load_local.py
/usr/lib/python3.6/site-packages/pymysql/tests/test_nextset.py
/usr/lib/python3.6/site-packages/pymysql/tests/test_optionfile.py
/usr/lib/python3.6/site-packages/pymysql/tests/thirdparty
/usr/lib/python3.6/site-packages/pymysql/tests/thirdparty/__init__.py
/usr/lib/python3.6/site-packages/pymysql/tests/thirdparty/__pycache__
/usr/lib/python3.6/site-packages/pymysql/tests/thirdparty/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/tests/thirdparty/__pycache__/__init__.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/tests/thirdparty/test_MySQLdb
/usr/lib/python3.6/site-packages/pymysql/tests/thirdparty/test_MySQLdb/__init__.py
/usr/lib/python3.6/site-packages/pymysql/tests/thirdparty/test_MySQLdb/__pycache__
/usr/lib/python3.6/site-packages/pymysql/tests/thirdparty/test_MySQLdb/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/tests/thirdparty/test_MySQLdb/__pycache__/__init__.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/tests/thirdparty/test_MySQLdb/__pycache__/capabilities.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/tests/thirdparty/test_MySQLdb/__pycache__/capabilities.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/tests/thirdparty/test_MySQLdb/__pycache__/dbapi20.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/tests/thirdparty/test_MySQLdb/__pycache__/dbapi20.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/tests/thirdparty/test_MySQLdb/__pycache__/test_MySQLdb_capabilities.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/tests/thirdparty/test_MySQLdb/__pycache__/test_MySQLdb_capabilities.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/tests/thirdparty/test_MySQLdb/__pycache__/test_MySQLdb_dbapi20.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/tests/thirdparty/test_MySQLdb/__pycache__/test_MySQLdb_dbapi20.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/tests/thirdparty/test_MySQLdb/__pycache__/test_MySQLdb_nonstandard.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pymysql/tests/thirdparty/test_MySQLdb/__pycache__/test_MySQLdb_nonstandard.cpython-36.pyc
/usr/lib/python3.6/site-packages/pymysql/tests/thirdparty/test_MySQLdb/capabilities.py
/usr/lib/python3.6/site-packages/pymysql/tests/thirdparty/test_MySQLdb/dbapi20.py
/usr/lib/python3.6/site-packages/pymysql/tests/thirdparty/test_MySQLdb/test_MySQLdb_capabilities.py
/usr/lib/python3.6/site-packages/pymysql/tests/thirdparty/test_MySQLdb/test_MySQLdb_dbapi20.py
/usr/lib/python3.6/site-packages/pymysql/tests/thirdparty/test_MySQLdb/test_MySQLdb_nonstandard.py
/usr/lib/python3.6/site-packages/pymysql/times.py
/usr/lib/python3.6/site-packages/pymysql/util.py
/usr/share/doc/python3-PyMySQL
/usr/share/doc/python3-PyMySQL/README.rst
/usr/share/licenses/python3-PyMySQL
/usr/share/licenses/python3-PyMySQL/LICENSE

References

Summary

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