If loading via pip install mysql-connector and leads an error Unable to find Protobuf include directory then this would be useful pip install mysql-connector==2.1.4

mysql-connector is obsolete, so use pip install mysql-connector-python. Same here

Answer from Partha Sen on Stack Overflow
🌐
PyPI
pypi.org › project › mysql-connector-python
mysql-connector-python · PyPI
The recommended way to install Connector/Python is via pip, which relies on WHEEL packages. For such a reason, it is the installation procedure that is going to be described moving forward. Please, refer to the official MySQL documentation Connector/Python Installation to know more about installing from an RPM, or building and installing a WHEEL package from a source distribution.
      » pip install mysql-connector-python
    
Published   Apr 23, 2026
Version   9.7.0
🌐
MySQL
dev.mysql.com › doc › dev › connector-python › latest › installation.html
Installation — MySQL Connector/Python X DevAPI Reference 9.7.0 documentation
Or you can use the standalone pip installer. ... You must have the MySQL Yum repository on your system’s repository list. To make sure that your Yum repository is up-to-date, use this command: ... As of Connector/Python 2.2.3, source distributions include a C++ Extension, that interfaces with a MySQL server with the X Plugin enabled using Protobuf as data interchange format.
🌐
GeeksforGeeks
geeksforgeeks.org › python › how-to-install-mysql-connector-package-in-python
How to install MySQL Connector Package in Python - GeeksforGeeks
July 12, 2025 - To install Python-mysql-connector ... contains Python, go through the following instructions: Open the Command line(search for cmd in the Run dialog(Windows + R)....
🌐
MySQL
dev.mysql.com › doc › connector-python › en › connector-python-installation-source.html
MySQL :: MySQL Connector/Python Developer Guide :: 4.5 Installing Connector/Python from a Source Distribution
On Windows platforms: > ... the presence of libraries are sufficient · Perform the installation using this command: pip install ./mysql_connector_python-x.y.z.tar.gz ·...
🌐
PYnative
pynative.com › home › python › databases › install mysql connector python on windows, macos, linux, unix and ubuntu
Install MySQL Connector Python on Windows, MacOs, Linux, Unix and Ubuntu
March 9, 2021 - Install MySQL Connector Python on Windows, Linux, Unix, MacOs using PIP or using ZIP and TAR file. we can also install using MSI installer and RPM package.Prerequisites for installing MySQL Connector Python
🌐
MySQL
dev.mysql.com › doc › connector-python › en › ch04s04s01.html
MySQL :: MySQL Connector/Python Developer Guide :: 4.4.1 Installing Connector/Python with pip
# 3rd party packages to enable the telemetry functionality are installed $ pip install mysql-connector-python[telemetry]
🌐
Devart
docs.devart.com › python › mysql › install-the-connector-on-windows.htm
Install the connector on Windows - Python Connector for MySQL
You can install the connector from the Python Package Index (PyPI) or a wheel (.whl) file. Open Command Prompt. Verify that you have the pip package installer on your system using the py -m pip --version command.
Find elsewhere
🌐
MySQL Tutorial
mysqltutorial.org › home › python mysql › getting started with mysql connector/python
MySQL Connector/Python: Getting Started
January 6, 2024 - The MySQL Python Connector is available on pypi.org, therefore, you can install it using the pip command. First, open Command Prompt on Windows or Terminal on Unix-like systems.
🌐
MySQL
dev.mysql.com › doc › connectors › en › idm46074305203024.html
MySQL :: Connectors and APIs Manual :: 6.4.4.1 Installing Connector/Python with pip
# 3rd party packages to enable the telemetry functionality are installed $ pip install mysql-connector-python[telemetry]
🌐
MySQL
dev.mysql.com › doc › connector-python › en › connector-python-installation-binary.html
MySQL :: MySQL Connector/Python Developer Guide :: 4.4 Installing Connector/Python from a Binary Distribution
4.4.1 Installing Connector/Python with pip · 4.4.2 Installing by RPMs · Connector/Python includes the classic and X DevAPI connector APIs, which are installed separately. Each can be installed by a binary distribution. Binaries are distributed in the RPM and the wheel package formats.
🌐
pythontutorials
pythontutorials.net › blog › how-to-install-mysql-connector-via-pip
How to Install mysql-connector via pip for SQLAlchemy in Python: Step-by-Step Guide — pythontutorials.net
mysql-connector-python is the official MySQL driver for Python, maintained by Oracle. Install it via pip: ... pip list | grep mysql-connector-python # Linux/macOS # or pip list | findstr mysql-connector-python # Windows
🌐
MySQL
dev.mysql.com › doc › connector-python › en › connector-python-installation.html
MySQL :: MySQL Connector/Python Developer Guide :: 4 Connector/Python Installation
Connector/Python runs on any platform where Python is installed. Make sure Python is installed on your platform: Python comes preinstalled on most Unix and Unix-like systems, such as Linux, macOS, and FreeBSD. If your system does not have Python preinstalled for some reasons, use its software management system to install it. For Microsoft Windows...
🌐
w3resource
w3resource.com › python › pip-install-mysql-connector-python.php
pip install mysql-connector-python – Python MySQL Connector Guide
April 20, 2026 - One of the most reliable and beginner-friendly options is MySQL Connector/Python, which can be installed using the pip command.
🌐
OverIQ
overiq.com › mysql-connector-python-101 › installing-mysql-connector-python › index.html
Installing MySQL Connector Python - MySQL Connector/Python Tutorial - OverIQ.com
We are now ready to install MySQL Connector/Python. The easiest way to install Connector/Python on most platforms is via the pip command.
🌐
Stack Overflow
stackoverflow.com › questions › 46428848 › how-to-install-mysql-connector-for-python-on-windows-when-according-to-the-insta
How to install MySQL Connector for Python on Windows when according to the installation manager Python is not installed? - Stack Overflow
Edit: When I tried it with pip in command line with this statement: pip install MySQL-python, I got the following error message: Could not find a version that satisfies the requirement MySQL-python==2.1.7 (from versions: 1;2;4b5 ...
🌐
PyPI
pypi.org › project › mysql-connector
mysql-connector · PyPI
pip install mysql-connector Copy PIP instructions · Latest release · Released: Apr 1, 2019 · MySQL driver written in Python · These details have been verified by PyPI · mysql_re_team · These details have not been verified by PyPI · Homepage ...
      » pip install mysql-connector
    
Published   Apr 01, 2019
Version   2.2.9
🌐
W3Schools
w3schools.com › python › python_mysql_getstarted.asp
Python MySQL
C:\Users\Your Name\AppData\Local\Programs\Python\Python36-32\Scripts>python -m pip install mysql-connector-python
🌐
PlanetScale
planetscale.com › mysql for python developers › using mysql with python › installing mysql
Installing MySQL — MySQL for Python Developers — PlanetScale
November 8, 2023 - The former helps us in managing environment variables, and the latter allows us to interface with the PlanetScale database. To install these packages, run the following commands: pip install python-dotenv pip install mysql-connector-python