How do I connect to a MySQL database using a python program?
Just a modification in above answer. Simply run this command to install mysql for python
sudo yum install MySQL-python sudo apt-get install MySQL-python
remember! It is case sensitive.