Last Updated : 12 Jul, 2025
MySQL is a Relational Database Management System (RDBMS) whereas the structured Query Language (SQL) is the language used for handling the RDBMS using commands i.e Creating, Inserting, Updating and Deleting the data from the databases. A connector is employed when we have to use MySQL with other programming languages. The work of mysql-connector is to provide access to MySQL Driver to the required language. Thus, it generates a connection between the programming language and the MySQL Server.
Installation InstructionsTo install Python-mysql-connector module, one must have Python and PIP, preinstalled on their system. To check if our system already contains Python, go through the following instructions:
Step 1: Check if Python is InstalledOpen the Command line(search for cmd in the Run dialog(Windows + R). Now run the following command:
python --version
If Python is already installed, it will generate a message with the Python version available.
If Python is not present, go through How to install Python on Windows and Linux? and follow the instructions provided.
Step 2: Check if PIP is InstalledPIP is a package management system used to install and manage software packages/libraries written in Python. These files are stored in a large “on-line repository” termed as Python Package Index (PyPI). To check if PIP is already installed on our system, just go to the command line and execute the following command:
pip --version
Step 3: Install MySQL Connector for PythonIf PIP is not present, go through How to install PIP on Windows and Linux?
Once Python and PIP are installed, we can proceed with installing the MySQL Connector package for Python.
For Windowsmysql-connector
method can be installed on Windows with the use of following command:
For Linuxpip install mysql-connector-python
mysql-connector
method can be installed on Linux with the use of following command:
pip3 install mysql-connector
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4