Install MYSQLDB in DJANGO in centos

Source: Internet
Author: User
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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.