First, download the kernel (at least in CentOS, in/usr/bin/, find it like this: ls/usr/bin/| grep & ldquo; mysql & rdquo ;) then add the path of mysql_config to the site in the MySQLdb folder. cfg
First Download: http://sourceforge.net/projects/mysql-python/
Decompress the package and find the location of mysql_config (at least in CentOS, in/usr/bin/, so that you can find the location: ls/usr/bin/| grep "mysql ")
Then, add the path of mysql_config to the site. cfg file in the MySQLdb folder, as shown below:
Mysql_config =/usr/bin/mysql_config
Install setuptools
Http://pypi.python.org/pypi/setuptools#files
Http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz
Decompress the package and go to the setuptools directory to install
Python setup. py build
Python setup. py install
Install MySQLdb
Python setup. py build
Python setup. py install
Reprinted note (LINUXQQ)