How To Install python2-PyMySQL on Rocky Linux 8

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

Introduction

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

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

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

sudo dnf -y install python2-PyMySQL

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

sudo yum -y install python2-PyMySQL

How To Uninstall python2-PyMySQL on Rocky Linux 8

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

sudo dnf remove python2-PyMySQL

python2-PyMySQL Package Contents on Rocky Linux 8

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

References

Summary

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