当前位置:网站首页>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
边栏推荐
- Use of typescript classes
- Vmware安装win10报错:operating system not found
- 6.30年终小结,学生时代结束
- 解决:代理抛出异常错误
- 数学知识(欧拉函数)
- Precipitate yourself and stay up late to sort out 100 knowledge points of interface testing professional literacy
- [C language] basic learning notes
- LeetCode-归并排序链表
- cs架构下抓包的几种方法
- Gin framework learning code
猜你喜欢
Summary of main account information of zhengdaliu 4
Getting started with pytest -- description of fixture parameters
[Yu Yue education] autumn 2021 reference materials of Tongji University
Its appearance makes competitors tremble. Interpretation of Sony vision-s 02 products
MySQL table insert Chinese change? Solution to the problem of No
奠定少儿编程成为基础学科的原理
How to write a client-side technical solution
Practical problem solving ability of steam Education
关于Steam 教育的知识整理
Thinkphp Kernel wo system source Commercial Open source multi - user + multi - Customer Service + SMS + email notification
随机推荐
DC-1靶场搭建及渗透实战详细过程(DC靶场系列)
How muddy is the water in the medical beauty industry with a market scale of 100 billion?
Oracle stored procedure and job task setting
Knowledge arrangement about steam Education
Rhcsa --- work on the fourth day
Free drawing software recommended - draw io
CorelDRAW graphics suite2022 free graphic design software
Record the bug of unity 2020.3.31f1 once
Ten thousand volumes are known to all, and one page of a book is always relevant. TVP reading club will take you through the reading puzzle!
Getting started with pytest ----- confitest Application of PY
Common errors of dmrman offline backup
Its appearance makes competitors tremble. Interpretation of Sony vision-s 02 products
My first experience of shadowless cloud computer
2022-003arts: recursive routine of binary tree
Federal learning: dividing non IID samples according to Dirichlet distribution
Yolov5 network modification tutorial (modify the backbone to efficientnet, mobilenet3, regnet, etc.)
Pit encountered in win11 pytorch GPU installation
[understand one article] FD_ Use of set
LeetCode-归并排序链表
How to modify data file path in DM database