1 download mysql-Python 1.2.3
2. Execute sudo Python setup. py install. If the installation fails, the system prompts that setuptools cannot be found.
3) wget-Q http://peak.telecommunity.com/dist/ez_setup.py
2) sudo Python ez_setup.py
4. Execute 2. Failed. The error message "mysql_config" is not found because libmysqlclient is not installed.
5 1) Add "Deb http://security.ubuntu.com/ubuntu Maverick-security main" in/etc/APT/sources. List (quotes are not required)
2) Run sudo apt-Get install libmysqlclient-Dev.
6. Execute 2 and still fail. The system prompts that python. h cannot be found.
7 1) Add "Deb http://ubuntu.mirror.cambrium.nl/ubuntu/ maverick main" in/etc/APT/sources. List (quotes are not required)
2) Run sudo apt-Get install Python-Dev.
8. The execution continues. 2 is successful!
9. Execute Python-> Import mysqldb and import it successfully. installation is complete.