Django学习记录(三)
来源:互联网 发布:淘宝内部优惠券的软件 编辑:程序博客网 时间:2024/05/30 04:30
postgresql 的配置
安装postgresql在前面已经有了,再安装和python的接口包psycopg2,也在前面写了
psql (PostgreSQL) 8.4.18
我操作如下
service postgresql initdbservice postgresql startsu - postgrespsqlpostgres=#\password postgres #设置postgres的密码 createuser dbuser Shall the new role be a superuser? (y/n) ypsqlpostgres=#\password dbusercreatedb mydb -O dbuserexitvim /var/lib/pgsql/data/pg_hba.conf #修改一下cat /var/lib/pgsql/data/pg_hba.conf local all all trusthost all all 127.0.0.1/32 trusthost all all ::1/128 trust psql -U dbuser -d mydb -h 127.0.0.1 -p 5432/etc/init.d/postgresql reloadpsql -U dbuser -d mydb -h 127.0.0.1 -p 5432
这样我们就创建一个数据库用户dbuser,他的数据库是mydb
如下为参考:
http://www.cnblogs.com/terrysun/archive/2012/11/30/2796479.html
http://jingyan.baidu.com/article/3ea51489ec3cb452e71bba52.html
http://stackoverflow.com/questions/2942485/psql-fatal-ident-authentication-failed-for-user-postgres
0 0
- Django学习记录(三)
- web 框架 Django 学习记录 (三)一个实例
- django学习记录(二)
- Django学习笔记(三)--Django超链接
- Django学习笔记(三)
- django 学习文件记录
- django学习记录
- Django 学习记录
- django学习记录-RequestContext
- Django 1.10 学习记录
- Django学习记录
- 学习django问题记录
- django学习记录
- django学习笔记(三):Django的Hello world!
- Django学习随手记(三)
- django学习之路(三)
- Django学习(三)模板定制
- Django学习笔记(三)
- android的数字签名
- LPC NXP 设置管脚功能为GPIO且为输出的步骤
- Android界面间距适配的小技巧
- Hive深入浅出
- Android学习笔记——NDK中C++标准库、STL的配置;Include其他头文件
- Django学习记录(三)
- 关于量子遗传算法的理解
- 服务器响应HTTP的类型ContentType大全
- HDU1874_畅通工程续(Dijkstra最短路)
- 测试各个状态下的WIFI_STATE_CHANGED_ACTION广播
- OpenGL学习03
- 好不好
- --------------------JAVA UUID 生成
- DSP 之直接内存访问(DMA)介绍