欢迎来到 黑吧安全网 聚焦网络安全前沿资讯,精华内容,交流技术心得!

Ubuntu安装Mysql+Django+MySQLdb

来源:本站整理 作者:佚名 时间:2014-07-13 TAG:Ubuntu Mysql Django MySQLdb 我要投稿

 安装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成功
 
 
安装Django
 
pip install Django==1.6.5
安装MySQLdb
 
sudo apt-get install python-mysqldb
 
>>>import django
>>>import MySQLdb
没有报错说明安装成功
 
 
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
【声明】:黑吧安全网(http://www.myhack58.com)登载此文出于传递更多信息之目的,并不代表本站赞同其观点和对其真实性负责,仅适于网络安全技术爱好者学习研究使用,学习中请遵循国家相关法律法规。如有问题请联系我们,联系邮箱admin@myhack58.com,我们会在最短的时间内进行处理。
  • 最新更新
    • 相关阅读
      • 本类热门
        • 最近下载