Just download a Python library named "connector/python" by Oracle from here and there're no binaries to install.
For connecting Python to MySQL database these are the following steps you need to follow:-
The first thing is you need to install MySQL driver because Python needs this to access its database. For that you need to open your command prompt and write the following command:
python -m pip install mysql-connector
After completing the above-mentioned step you would have downloaded and installed MySQL in your system.
To check whether the installation is successful or not you need to test MySQL connector by using the following piece of code.
Now start creating connections to the database by using the username and password of the MySQL database that you would have set at the time of installation. Following is the code you can use:-
import mysql.connectormydb = mysql.connector.connect(host="localhost",user="yourusername",passwd="yourpassword")print(mydb)
mydb = mysql.connector.connect(
You can use the following video tutorials to clear all your doubts:-