导航

2018年9月25日

摘要: 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) 编辑

摘要: 系统版本: CentOS Linux release 7.5.1804 (Core) 数据库 psql (PostgreSQL) 10.5 2台机器ip : 172.17.0.3 /172.17.0.4 具体步骤: 一. 首先先在这两台机器上把postgres这2个机器的基础数据库都装好。具体就不解 阅读全文

posted @ 2018-09-25 11:44 许爱琪 阅读(641) 评论(0) 推荐(0) 编辑