sudo apt-get install python3-mysql.connector
or
pip3 install mysql-connector

this will install mysql.connector for python3 on ubuntu

Answer from Alok on askubuntu.com
🌐
PyPI
pypi.org › project › mysql-connector-python
mysql-connector-python · PyPI
# 3rd party packages to unleash the telemetry functionality are installed $ pip install mysql-connector-python[telemetry]
      » 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
shell> tar xzf mysqlx-connector-python-<version>.tar.gz shell> cd mysqlx-connector-python-<version>.tar.gz shell> python setup.py install --with-protobuf-include-dir=<protobuf-include-dir> --with-protobuf-lib-dir=<protobuf-lib-dir> --with-protoc=<protoc-binary>
🌐
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
🌐
Anaconda.org
anaconda.org › anaconda › mysql-connector-python
mysql-connector-python - anaconda | Anaconda.org
2 weeks ago - Install mysql-connector-python with Anaconda.org. Python driver for communicating with MySQL servers
Find elsewhere
🌐
MySQL
dev.mysql.com › downloads › connector › python
MySQL :: Download Connector/Python
MySQL Connector/Python Installation Instructions · Documentation · MySQL Connector/Python X DevAPI Reference · Change History · The latest MySQL Connector/Python version is recommended for use with MySQL Server version 8.0 and higher. Please report any bugs or inconsistencies you observe to our Bugs Database.
🌐
MySQL
dev.mysql.com › doc › connector-python › en › connector-python-installation.html
MySQL :: MySQL Connector/Python Developer Guide :: 4 Connector/Python Installation
For Microsoft Windows, a Python installer is available at the Python Download website or via the Microsoft Store. Also make sure Python in your system path. Connector/Python includes the classic and X DevAPI APIs, which are installed separately.
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-mysql
Python MySQL - GeeksforGeeks
To install the Python-mysql-connector module, one must have Python and PIP, preinstalled on their system.
Published   May 22, 2026
🌐
OverIQ
overiq.com › mysql-connector-python-101 › installing-mysql-connector-python › index.html
Installing MySQL Connector Python - MySQL Connector/Python Tutorial - OverIQ.com
The easiest way to install Connector/Python on most platforms is via the pip command. ... Another way to install MySQL Connector/Python is to download it directly from the official site.
🌐
Anthropic
anthropic.com › news › model-context-protocol
Introducing the Model Context Protocol \ Anthropic
Instead of maintaining separate connectors for each data source, developers can now build against a standard protocol.
🌐
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
🌐
Raspberry Pi Forums
forums.raspberrypi.com › board index › using the raspberry pi › beginners
Installation of Mysql connector on Pi - Raspberry Pi Forums
sudo apt-get install mysql-python sudo apt-get install python-mysql.connector suso apt-get install pymysql sudo apt-get install mysqldb
🌐
Python.org
discuss.python.org › python help
How to install mysql-connector-python-8.4.0.zip it does not have setup.py - Python Help - Discussions on Python.org
May 7, 2024 - How to install mysql-connector-python-8.4.0.zip it does not have setup.py. Checked also: mysql-connector-python-8.4.0.tar.gz
🌐
CopyAssignment
copyassignment.com › python-mysql-connector-example-pip-install
Python MySQL Connector example, pip, install, and ...
Disclaimer: References to any specific company, product or services on this Site are not controlled by GoDaddy.com LLC and do not constitute or imply its association with or endorsement of third party advertisers
🌐
Generalist Programmer
generalistprogrammer.com › home › tutorials › python packages › mysql connector python: database library guide 2025
mysql-connector-python Python Guide [2025] | PyPI Tutorial
November 16, 2025 - Include mysql-connector-python in your Dockerfile: FROM python:3.11-slim WORKDIR /app COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt COPY .
🌐
Scribd
scribd.com › document › 871302606 › scrib2
Install MySQL Connector in Python | PDF | My Sql
March 25, 2025 - JavaScript is disabled in your browser · Please enable JavaScript to proceed · A required part of this site couldn’t load. This may be due to a browser extension, network issues, or browser settings. Please check your connection, disable any ad blockers, or try using a different browser
🌐
Scribd
scribd.com › document › 940263279 › Connectivity-Steps
Download and Install MySQL Connector Guide | PDF
JavaScript is disabled in your browser · Please enable JavaScript to proceed · A required part of this site couldn’t load. This may be due to a browser extension, network issues, or browser settings. Please check your connection, disable any ad blockers, or try using a different browser
🌐
Scribd
scribd.com › document › 788075252 › Python-MySQL-and-MySQL-Connector-Installations
Installing MySQL Connector for Python | PDF
JavaScript is disabled in your browser · Please enable JavaScript to proceed · A required part of this site couldn’t load. This may be due to a browser extension, network issues, or browser settings. Please check your connection, disable any ad blockers, or try using a different browser