This article describes how to install MySQL-python. The main function of MySQL-python is to access the MySQL database class library in python, in django, this class library is used by default to access MySQL.
1. Download
Wget http://downloads.sourceforge.net/project/MySQL-python/MySQL-python-test/1.2.3c1/MySQL-python-1.2.3c1.tar.gz? Use_mirror = ncu
2. Modify the site. cfg file
Modifying the site. cfg folder mainly tells the myslq-python module the path of the MySQL_config file. Note that it is not the my. cnf file.
Remove the following line of configuration comments from the file and change "/usr/local/bin/MySQL_config" to the path of the MySQL_conf file in your system.
- # mysql _config = /usr/local/bin/mysql_config
3. Install
- tar zxvf MySQL-python-1.2.3c1.tar.gz
- cd MySQL-python-1.2.3c1
- python setup.py install
The above content is an introduction to installing MySQL-python. I hope you will have some gains. We hope you will have some gains.
The above content describes how to install MySQL-python. I hope it will help you in this regard.