Skip to content Skip to sidebar Skip to footer

Connect The Python App To A Database Using Centos 7

I am new to all this I have apython app already helo.mysql.py and need to Connect the python app to a database. I am using centos 7 and have it installed on a ec2 instance if anyo

Solution 1:

In order to connect to any database from Python app, first we need to install the respective db driver package.

pip install MySQLdb

Then import this module in your Python code, connect to database and perform CRUD operations.

Post a Comment for "Connect The Python App To A Database Using Centos 7"