Home > Database > Mysql Tutorial > centos和ubuntu下安装mysql for django出现的问题

centos和ubuntu下安装mysql for django出现的问题

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 15:39:52
Original
1008 people have browsed it

命令为easy_install MySQL-python 首先是“error: Setup script exited with error: command 'gcc' failed with exit status 1” 具体原因是没有安装python-dev 但是在centos下python-dev的名字为python-devel 安装后即可成功安装 django setting.py文件中数

命令为easy_install MySQL-python

首先是“error: Setup script exited with error: command 'gcc' failed with exit status 1”

具体原因是没有安装python-dev

但是在centos下python-dev的名字为python-devel

安装后即可成功安装


django setting.py文件中数据库配置为

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME':   'db_name',
        'USER' :  'root',
        'PASSWORD':'password',
        'HOST'    :'localhost',
    }
}
Copy after login


Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template