skillfed

MySQL-python

Python interface to MySQL

mysql-python v1.2.5 148.4K downloads/30d#11,033 on PyPI662
Copyleft license GPL Abandoned released

What it is and what it does

MySQL-python is a database adapter that lets Python 2 applications connect to and query MySQL databases. It implements the Python Database API version 2.0 standard, meaning code written against it follows a common interface shared with other database drivers. The package is a thin wrapper around the MySQL C client library, providing thread-safe access to MySQL 3.23 through 5.5.

This package is effectively obsolete. It was last released in 2014 and does not support Python 3. The repository shows minimal activity since 2020. For any new project, modern alternatives are the correct choice.

Use it for:

  • Maintaining legacy Python 2 applications that already depend on MySQL-python and cannot be migrated
  • Running existing codebases frozen at Python 2.7 that interact with MySQL databases
  • Educational purposes to understand how Python database adapters implement the Database API standard

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

MySQL-python provides a Python 2 interface to MySQL databases, implementing the Python Database API specification for executing queries and managing connections.

No. Do not install for new projects—Python 2 reached end-of-life years ago, and MySQL-python has been abandoned since 2014. If you must maintain legacy Python 2 code already using MySQL-python, keep the existing version pinned. For any new work, use a maintained alternative.

Install

mysql-python on PyPI

pip

pip install mysql-python

uv

uv add mysql-python

poetry

poetry add mysql-python

Installing MySQL-python

Before you install

Installation requires compilation against MySQL client libraries, creating high friction on most systems. The package is abandoned—last release was 2014-01-02 and last commit 2020-10-26—making it unsuitable for new projects.

License in practice

Licensed under GPL (copyleft), which requires any derivative work or linked application to also be GPL-licensed. This creates legal constraints for proprietary software.

Quickstart

pip install MySQL-python==1.2.5
# Then in Python code:
conn = connect(host='localhost', user='user', passwd='password', db='database')
cursor = conn.cursor()
cursor.execute('SELECT * FROM table')
results = cursor.fetchall()

Requires MySQL client development libraries (libmysqlclient-dev on Linux) and a C compiler; Python 2.7 only (Python 3 not supported).

Verify before relying

  • Whether MySQL client development headers are available on the target system
  • Current compatibility with modern MySQL server versions beyond 5.5
  • Whether the package works reliably on current Python 2.7 patch releases
  • Availability of maintained forks or alternative packages for Python 3 migration

Package facts

License GPL (copyleft)
Python support not specified
Install friction high — source build required
Runtime dependencies none
Maintenance abandoned — 4,607 days since the last release
Last repo commit
First released
Downloads 148,447/month — #11,033 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: MySQL-python-1.2.5.win32-py2.7.exe; MySQL-python-1.2.5.zip

Development Status :: 5 - Production/StableEnvironment :: Other EnvironmentLicense :: OSI Approved :: GNU General Public License (GPL)Operating System :: MacOS :: MacOS XOperating System :: Microsoft :: Windows :: Windows NT/2000Operating System :: OS IndependentOperating System :: POSIXOperating System :: POSIX :: LinuxOperating System :: UnixProgramming Language :: CProgramming Language :: PythonTopic :: DatabaseTopic :: Database :: Database Engines/Servers

Tags

python mysql database drivermysql connector pythonpython mysql interfacemysql client library pythonrelational database access pythondatabase adapter python
legacypython2-onlyabandoned

More Database packages