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.
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:
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:
mysql-connector method can be installed on Windows with the use of following command:
pip install mysql-connector-python
mysql-connector method can be installed on Linux with the use of following command:
pip3 install mysql-connector
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course.
- Connect MySQL database using MySQL-Connector Python
- MySQL-Connector-Python module in Python
- Extract Data from Database using MySQL-Connector and XAMPP in Python
- Install Python package using Jupyter Notebook
- How to Install SQLObject package on Windows and Linux?
- NetworkX : Python software package for study of complex networks
- Python | Plotting Google Map using gmplot package
- Create and Access a Python Package
- Python | Plotting Google Map using folium package
- Python | Adding markers to volcano locations using folium package
- Humanize Package in Python
- What is the difference between Python's Module, Package and Library?
- Python - Database Manager (dbm) package
- Snakebite Python Package For Hadoop HDFS
- Plotting Data on Google Map using Python's pygmaps package
- How to Publish Python package at PyPi using Twine module?
- Spikes package in Python
- How to download and install Python Latest Version on Windows
- Download and Install Python 3 Latest Version
- How to download and install Python Latest Version on Android
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.