免安装版 postgresql 使用

1、首先使用 initdb 初始化数据目录
initdb --pgdata=data --encoding=UTF8 --locale=C

2、启动
postgres -D "data"
pg_ctl -D "data" -l logfile.log start
pg_ctl -D "data" -l logfile.log stop

3、创建用户和角色
createuser -P root 创建root用户

4、访问
使用pgAdmin3访问和管理数据库

5、远程访问权限
pg_hba.conf:在这里的最底下

6、配置
postgresql.conf:配置文件

上面的两个配置文件都在data目录里

注:联接选项 指连接某个数据库用的选项

相关文章:

  • 2021-11-20
  • 2021-11-20
  • 2021-11-20
  • 2021-11-05
  • 2022-01-02
  • 2022-02-08
  • 2022-12-23
猜你喜欢
  • 2021-08-11
  • 2021-05-23
  • 2022-03-10
  • 2018-04-25
  • 2021-06-13
  • 2021-12-07
  • 2021-04-23
相关资源
相似解决方案