SQL stands for Structured Query Language and is a widely used programming language for managing relational databases. Python can be used in database applications. One of the most popular databases is MySQL. Python needs a MySQL driver to access the MySQL database.
To be able to experiment with the code examples in this course, you should have MySQL installed on your computer.
You can download XAMPP a free MySQL database at https://www.apachefriends.org/download.html. After download the XAMPP Start Apache and MySQL Server.
import mysql.connector
Note: If the above code was executed with no errors, "MySQL Connector" is installed and ready to be used.
MySQL is a server-based database management system. One server might contain multiple databases. To interact with a database, you must first establish a connection with the server. The general workflow of a Python program that interacts with a MySQL-based database is as follows: