摘要:
pip install psycopg2 psycopg2-binary #!/usr/bin/python import psycopg2conn = psycopg2.connect(database="test", user="postgres", password="postgres", h 阅读全文
posted @ 2018-09-25 11:49 许爱琪 阅读(205) 评论(0) 推荐(0) 编辑
|
|
摘要:
pip install psycopg2 psycopg2-binary #!/usr/bin/python import psycopg2conn = psycopg2.connect(database="test", user="postgres", password="postgres", h 阅读全文
posted @ 2018-09-25 11:49 许爱琪 阅读(205) 评论(0) 推荐(0) 编辑
摘要:
(1)登录 peng@peng-virtual-machine:~$ sudo -u postgres psql 以用户postgres身份登录,postgres为用户名,可有多个用户,登录时会要求输入相应密码,之后就会进入psql环境了 (2)切换数据库 有时候需要在psql环境下切换数据库,此时 阅读全文
posted @ 2018-09-25 11:46 许爱琪 阅读(5199) 评论(0) 推荐(0) 编辑
摘要:
yum install zlib-devel gcc make #创建用户和组groupadd postgresuseradd -g postgres postgres mkdir -p /usr/local/postgresqlchown -R postgres:postgres /usr/loc 阅读全文
posted @ 2018-09-25 11:45 许爱琪 阅读(287) 评论(0) 推荐(0) 编辑 |
|