码迷,mamicode.com
首页 > 数据库 > 详细

Ubuntu安装Mysql+Django+MySQLdb

时间:2014-07-10 00:41:54      阅读:334      评论:0      收藏:0      [点我收藏+]

标签:blog   http   2014   art   cti   for   

  1. 安装Mysql
    sudo apt-get install mysql-server mysql-client
    
    root@IdeaPad:/# mysql -u root -p
    Enter password: 
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 36
    Server version: 5.5.37-0ubuntu0.14.04.1 (Ubuntu)
    
    Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
    
    Oracle is a registered trademark of Oracle Corporation and/or its
    affiliates. Other names may be trademarks of their respective
    owners.
    
    Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement.
    
    mysql> ^Z
    [1]+  已停止               mysql -u root -p
    #说明安装Mysql成功
    

     

  2. 安装Django
    pip install Django==1.6.5
    
  3. 安装MySQLdb
    sudo apt-get install python-mysqldb
    
  4. >>>import django
    >>>import MySQLdb
    

    没有报错说明安装成功

  5. root@IdeaPad:/var/www/server# python manage.py runserver
    Validating models...
    
    0 errors found
    June 27, 2014 - 10:12:26
    Django version 1.6.5, using settings ‘server.settings‘
    Starting development server at http://127.0.0.1:8000/
    Quit the server with CONTROL-C.
    [27/Jun/2014 10:12:32] "GET / HTTP/1.1" 200 1757
    

    bubuko.com,布布扣

Ubuntu安装Mysql+Django+MySQLdb,布布扣,bubuko.com

Ubuntu安装Mysql+Django+MySQLdb

标签:blog   http   2014   art   cti   for   

原文地址:http://www.cnblogs.com/evilxr/p/3812469.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!