当前位置:网站首页>How to configure PostgreSQL 12.9 to allow remote connections
How to configure PostgreSQL 12.9 to allow remote connections
2022-07-02 04:49:00 【Spicy guy playing computer】
Huanjing :
Ubuntu 20.04.3-live-server
Postgresql 12.9
Problem description :
Postgresql 12.9 How to configure to allow remote connections
Solution :
1. modify postgresql.conf The configuration file
vim /etc/postgresql/12/main/postgresql.conf
listen_addresses = '*'
2. edit pg_hba.conf The configuration file
vim /etc/postgresql/12/main/pg_hba.conf
#ipv4 local connetions
host all all 0.0.0.0/0 md5
MD5 Indicates that password verification is required , Also optional trust, No password required 
3. Restart the database service
service postgresql restart
Check the status
service postgresql status
● postgresql.service - PostgreSQL RDBMS
Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor preset: enabled)
Active: active (exited) since Tue 2022-02-15 14:43:32 CST; 3s ago
Process: 1255 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
Main PID: 1255 (code=exited, status=0/SUCCESS)
4. Local connection test 
边栏推荐
- Pytorch-Yolov5從0運行Bug解决:
- Record the bug of unity 2020.3.31f1 once
- What data does the main account of Zhengda Meiou 4 pay attention to?
- Gin framework learning code
- Exposure X8 Standard Version picture post filter PS, LR and other software plug-ins
- Geotrust OV Multi - Domain Domain SSL Certificate rmb2100 per year contains several Domain names?
- 06 decorator mode
- [improvement class] st table to solve the interval maximum value problem [2]
- Practical problem solving ability of steam Education
- [graduation season · advanced technology Er] young people have dreams, why are they afraid of hesitation
猜你喜欢

Leetcode merge sort linked list

Thinkphp Kernel wo system source Commercial Open source multi - user + multi - Customer Service + SMS + email notification

The core idea of performance optimization, dry goods sharing
![[understand one article] FD_ Use of set](/img/57/276f5ef438adee2cba31dceeabb95c.jpg)
[understand one article] FD_ Use of set

Pytoch --- use pytoch to realize u-net semantic segmentation

Alibaba cloud polkit pkexec local rights lifting vulnerability

Social media search engine optimization and its importance

Several methods of capturing packets under CS framework

面试会问的 Promise.all()

Learn what definitelytyped is through the typescript development environment of SAP ui5
随机推荐
Online incremental migration of DM database
数学知识——快速幂的理解及例题
C language practice - number guessing game
There is no prompt for SQL in idea XML, and the dialect setting is useless.
One step implementation of yolox helmet detection (combined with oak intelligent depth camera)
Why can't you remember when reading? Why can't you remember- My technology learning methodology
Record the bug of unity 2020.3.31f1 once
cs架构下抓包的几种方法
Pytorch-Yolov5從0運行Bug解决:
【毕业季·进击的技术er】年少有梦,何惧彷徨
Message mechanism -- message processing
Ruby replaces gem Alibaba image
Alibaba cloud polkit pkexec local rights lifting vulnerability
How to recover deleted data in disk
Social media search engine optimization and its importance
geotrust ov多域名ssl证书一年两千一百元包含几个域名?
Design and implementation of general interface open platform - (44) log processing of API services
oracle 存储过程与job任务设置
数学知识(欧拉函数)
06 decorator mode