Prerequisite: Python Language Introduction
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:
To install Python-mysql-connector module, one must have Python and PIP, preinstalled on their system. To check if your system already contains Python, go through the following instructions:
Open the Command line(search for cmd in the Run dialog( + 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.
PIP 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 your system, just go to the command line and execute the following command:
pip -V

If PIP is not present, go through How to install PIP on Windows and Linux?
Windows
mysql-connector method can be installed on Windows with the use of following command:
pip install mysql-connector-python

Linux
mysql-connector method can be installed on Linux with the use of following command:
pip3 install mysql-connector

Don't miss your chance to ride the wave of the data revolution! Every industry is scaling new heights by tapping into the power of data. Sharpen your skills and become a part of the hottest trend in the 21st century.
Dive into the future of technology - explore the Complete Machine Learning and Data Science Program by GeeksforGeeks and stay ahead of the curve.
Last Updated :
26 Mar, 2020
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...