PostgreSql: 安装与链接
阅读原文时间:2023年10月18日阅读:1

环境介绍

使用宝塔面板,在阿里云中安装PostgreSql,并使用DataGrip在本地进行链接

postgresql 配置

在宝塔中安装postgresql 管理器

在此处点击安装postgresql , 我安装的是14.2。各位可以自行选择

之后等待安装完成即可

修改postgresql.conf

修改pg_hba.conf

阿里云服务器

firewall-cmd --zone=public --add-port=5432/tcp --permanent  // 通过防火墙
firewall-cmd --reload  // 重启防火墙

DataGrip

使用DataGrip,选择postgresql进行链接。需要注意的点如下:

  • 默认数据库: postgres
  • port: 5432
  • 默认用户名: postgres
  • 默认密码: postgres

参考链接

https://blog.csdn.net/u011677255/article/details/105487288

https://www.jianshu.com/p/f246dc45e6dc