(1) MySQL is a fast, open-source, and easy-to-use relational or tabular database. It is suitable for small and large business applications. It is very friendly with database-driven web development applications.
(2) In order to use Python with MySQL we need to do two things. First, we have to install the pymysql package in python, and Second, we have to install Xampp.
(3) To install pymysql in Python, we open the command prompt and type the command pip install pymysql as shown below. The only function of this package is that it allows us to use MySQL with Python.
(4) Now we install Xampp. It is third-party software that gives us the option to run MySQL.
(5) In order to install Xampp, go to your browser and type Xampp download as shown below.
(6) You can also directly go to the official website by clicking here “Download XAMPP“. We click on the download option to download the Xampp software as shown below.
(7) Now the Xampp software is downloaded. Go to the folder where it is downloaded as shown below.
(8) Now double-click on the Xampp software. The computer asks “Do you want to allow this app to make changes to your device?” Click on Yes. You also receive a warning message, press Ok. Then below interface is getting opened and click on the Next button.
(9) Then again press Next as shown below.
(10) You can install it on any drive. By default, it shows C drive where xampp folder is created. If you want to install it on any other drive then create a folder in that drive and install them in that folder as shown below.
(11) In my case, I can install it on H drive as shown below and then press Next.
(11) After that select language and then press Next as shown below.
(12) Then again press Next as shown below.
(13) Now it starts installing as shown below.
(14) During installation, a window security alert pops up. Press on Allow access as shown below.
(15) After that click on the Finish button and your xampp installation is complete.
(16) Now opened the “Xampp” by searching in the windows search bar as shown below.
(17) You can also open it by clicking on the xampp-control.exe which is available in the drive where you have installed the Xampp software as shown below.
(18) Now Xampp Control Panel is open. Remember if you want to use Python with MySQL, you always have to press the start button of Apache and MySQL in Xampp as shown below. If a window security pop-up appears, allow access to the app.
(17) After pressing the start button, Apache and MySQL are highlighted in green color which means they start working as shown below.
(18) Now open your browser and type “http://localhost/phpmyadmin/“. The below interface is getting opened as shown below.