Python MySQL (pymysql and Xampp Installation)

Python MySQL:

(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.

pip install pymysql

(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.

download Xampp

(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.

download xampp for windows

(7) Now the Xampp software is downloaded. Go to the folder where it is downloaded as shown below.

xampp software downloaded

(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.

warning message to download xampp
xampp setup interface opened

(9) Then again press Next as shown below.

select components xampp

(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.

xampp install on other drive

(11) In my case, I can install it on H drive as shown below and then press Next.

xampp install on h drive

(11) After that select language and then press Next as shown below.

xampp select language

(12) Then again press Next as shown below.

xampp ready to install

(13) Now it starts installing as shown below.

xampp installing

(14) During installation, a window security alert pops up. Press on Allow access as shown below.

window security alert

(15) After that click on the Finish button and your xampp installation is complete.

xampp installation finish

(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.

xampp-control open

(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.

xampp conrtol panel

(17) After pressing the start button, Apache and MySQL are highlighted in green color which means they start working as shown below.

apache and mysql start

(18) Now open your browser and type “http://localhost/phpmyadmin/“. The below interface is getting opened as shown below.

phypmyadmin localhost open

Tutorial MySQL
Tutorial Python
Artificial Intelligence (AI)
Procedure-Oriented Programming
Object-Oriented Programming (OOP)
World Wide Web (WWW)
Python (programming language)– Wikipedia

Comments (No)

Leave a Reply