How To Install MySQL-python.x86_64 on Amazon Linux 2

In this tutorial we learn how to install MySQL-python.x86_64 in Amazon Linux 2. MySQL-python.x86_64 is An interface to MySQL

Introduction

In this tutorial we learn how to install MySQL-python.x86_64 on Amazon Linux 2.

What is MySQL-python.x86_64

Python interface to MySQL MySQLdb is an interface to the popular MySQL database server for Python. The design goals are - Compliance with Python database API version 2.0 - Thread-safety - Thread-friendliness (threads will not block each other) - Compatibility with MySQL 3.23 and up This module should be mostly compatible with an older interface written by Joe Skinner and others. However, the older version is a) not thread-friendly, b) written for MySQL 3.21, c) apparently not actively maintained. No code from that version is used in MySQLdb.

We can use yum to install MySQL-python.x86_64 on Amazon Linux 2. In this tutorial we discuss both methods but you only need to choose one of method to install MySQL-python.x86_64.

Install MySQL-python.x86_64 on Amazon Linux 2 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install MySQL-python.x86_64 using yum by running the following command:

sudo yum -y install MySQL-python.x86_64

How To Uninstall MySQL-python.x86_64 on Amazon Linux 2

To uninstall only the MySQL-python.x86_64 package we can use the following command:

sudo yum remove MySQL-python.x86_64

MySQL-python.x86_64 Package Contents on Amazon Linux 2

/usr/lib64/python2.7/site-packages/MySQL_python-1.2.5-py2.7.egg-info/PKG-INFO
/usr/lib64/python2.7/site-packages/MySQL_python-1.2.5-py2.7.egg-info/SOURCES.txt
/usr/lib64/python2.7/site-packages/MySQL_python-1.2.5-py2.7.egg-info/dependency_links.txt
/usr/lib64/python2.7/site-packages/MySQL_python-1.2.5-py2.7.egg-info/top_level.txt
/usr/lib64/python2.7/site-packages/MySQLdb
/usr/lib64/python2.7/site-packages/MySQLdb/__init__.py
/usr/lib64/python2.7/site-packages/MySQLdb/__init__.pyc
/usr/lib64/python2.7/site-packages/MySQLdb/__init__.pyo
/usr/lib64/python2.7/site-packages/MySQLdb/connections.py
/usr/lib64/python2.7/site-packages/MySQLdb/connections.pyc
/usr/lib64/python2.7/site-packages/MySQLdb/connections.pyo
/usr/lib64/python2.7/site-packages/MySQLdb/constants
/usr/lib64/python2.7/site-packages/MySQLdb/constants/CLIENT.py
/usr/lib64/python2.7/site-packages/MySQLdb/constants/CLIENT.pyc
/usr/lib64/python2.7/site-packages/MySQLdb/constants/CLIENT.pyo
/usr/lib64/python2.7/site-packages/MySQLdb/constants/CR.py
/usr/lib64/python2.7/site-packages/MySQLdb/constants/CR.pyc
/usr/lib64/python2.7/site-packages/MySQLdb/constants/CR.pyo
/usr/lib64/python2.7/site-packages/MySQLdb/constants/ER.py
/usr/lib64/python2.7/site-packages/MySQLdb/constants/ER.pyc
/usr/lib64/python2.7/site-packages/MySQLdb/constants/ER.pyo
/usr/lib64/python2.7/site-packages/MySQLdb/constants/FIELD_TYPE.py
/usr/lib64/python2.7/site-packages/MySQLdb/constants/FIELD_TYPE.pyc
/usr/lib64/python2.7/site-packages/MySQLdb/constants/FIELD_TYPE.pyo
/usr/lib64/python2.7/site-packages/MySQLdb/constants/FLAG.py
/usr/lib64/python2.7/site-packages/MySQLdb/constants/FLAG.pyc
/usr/lib64/python2.7/site-packages/MySQLdb/constants/FLAG.pyo
/usr/lib64/python2.7/site-packages/MySQLdb/constants/REFRESH.py
/usr/lib64/python2.7/site-packages/MySQLdb/constants/REFRESH.pyc
/usr/lib64/python2.7/site-packages/MySQLdb/constants/REFRESH.pyo
/usr/lib64/python2.7/site-packages/MySQLdb/constants/__init__.py
/usr/lib64/python2.7/site-packages/MySQLdb/constants/__init__.pyc
/usr/lib64/python2.7/site-packages/MySQLdb/constants/__init__.pyo
/usr/lib64/python2.7/site-packages/MySQLdb/converters.py
/usr/lib64/python2.7/site-packages/MySQLdb/converters.pyc
/usr/lib64/python2.7/site-packages/MySQLdb/converters.pyo
/usr/lib64/python2.7/site-packages/MySQLdb/cursors.py
/usr/lib64/python2.7/site-packages/MySQLdb/cursors.pyc
/usr/lib64/python2.7/site-packages/MySQLdb/cursors.pyo
/usr/lib64/python2.7/site-packages/MySQLdb/release.py
/usr/lib64/python2.7/site-packages/MySQLdb/release.pyc
/usr/lib64/python2.7/site-packages/MySQLdb/release.pyo
/usr/lib64/python2.7/site-packages/MySQLdb/times.py
/usr/lib64/python2.7/site-packages/MySQLdb/times.pyc
/usr/lib64/python2.7/site-packages/MySQLdb/times.pyo
/usr/lib64/python2.7/site-packages/_mysql.so
/usr/lib64/python2.7/site-packages/_mysql_exceptions.py
/usr/lib64/python2.7/site-packages/_mysql_exceptions.pyc
/usr/lib64/python2.7/site-packages/_mysql_exceptions.pyo
/usr/share/doc/MySQL-python-1.2.5
/usr/share/doc/MySQL-python-1.2.5/FAQ.rst
/usr/share/doc/MySQL-python-1.2.5/MySQLdb.constants.rst
/usr/share/doc/MySQL-python-1.2.5/MySQLdb.rst
/usr/share/doc/MySQL-python-1.2.5/README.md
/usr/share/doc/MySQL-python-1.2.5/_build
/usr/share/doc/MySQL-python-1.2.5/_build/_sources
/usr/share/doc/MySQL-python-1.2.5/_build/_sources/FAQ.txt
/usr/share/doc/MySQL-python-1.2.5/_build/_sources/MySQLdb.constants.txt
/usr/share/doc/MySQL-python-1.2.5/_build/_sources/MySQLdb.txt
/usr/share/doc/MySQL-python-1.2.5/_build/_sources/_mysql.txt
/usr/share/doc/MySQL-python-1.2.5/_build/_sources/_mysql_exceptions.txt
/usr/share/doc/MySQL-python-1.2.5/_build/_sources/distribute_setup.txt
/usr/share/doc/MySQL-python-1.2.5/_build/_sources/index.txt
/usr/share/doc/MySQL-python-1.2.5/_build/_sources/modules.txt
/usr/share/doc/MySQL-python-1.2.5/_build/_sources/setup.txt
/usr/share/doc/MySQL-python-1.2.5/_build/_sources/setup_common.txt
/usr/share/doc/MySQL-python-1.2.5/_build/_sources/setup_posix.txt
/usr/share/doc/MySQL-python-1.2.5/_build/_sources/setup_windows.txt
/usr/share/doc/MySQL-python-1.2.5/_build/_sources/user_guide.txt
/usr/share/doc/MySQL-python-1.2.5/_mysql.rst
/usr/share/doc/MySQL-python-1.2.5/_mysql_exceptions.rst
/usr/share/doc/MySQL-python-1.2.5/conf.py
/usr/share/doc/MySQL-python-1.2.5/index.rst
/usr/share/doc/MySQL-python-1.2.5/modules.rst
/usr/share/doc/MySQL-python-1.2.5/user_guide.rst

References

Summary

In this tutorial we learn how to install MySQL-python.x86_64 on Amazon Linux 2 using yum.