首页 > 代码库 > Ubuntu安装Mysql+Django+MySQLdb
Ubuntu安装Mysql+Django+MySQLdb
- 安装Mysql
sudo apt-get install mysql-server mysql-client
root@IdeaPad:/# mysql -u root -pEnter password: Welcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 36Server 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 itsaffiliates. Other names may be trademarks of their respectiveowners.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 runserverValidating models...0 errors foundJune 27, 2014 - 10:12:26Django 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
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。