当前位置:网站首页>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 
边栏推荐
- Design and implementation of general interface open platform - (44) log processing of API services
- 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!
- 奠定少儿编程成为基础学科的原理
- [C language] Dynamic Planning --- from entry to standing up
- How to modify data file path in DM database
- Message mechanism -- message processing
- Research on the security of ognl and El expressions and memory horse
- DJB Hash
- Precipitate yourself and stay up late to sort out 100 knowledge points of interface testing professional literacy
- 06 装饰(Decorator)模式
猜你喜欢

Markdown编辑语法

One click generation and conversion of markdown directory to word format

Orthogonal test method and function diagram method for test case design

数学问题(数论)试除法做质数的判断、分解质因数,筛质数
![[C language] basic learning notes](/img/d2/1aeb2d37d97b9cfe4b21aa3ac37645.png)
[C language] basic learning notes

AcrelEMS高速公路微电网能效管理平台与智能照明解决方案智慧点亮隧道

Realize the function of data uploading

How to recover deleted data in disk

Interview question: do you know the difference between deep copy and shallow copy? What is a reference copy?

06 decorator mode
随机推荐
Its appearance makes competitors tremble. Interpretation of Sony vision-s 02 products
Summary of common string processing functions in C language
Knowledge arrangement about steam Education
Detailed process of DC-1 range construction and penetration practice (DC range Series)
【毕业季·进击的技术er】年少有梦,何惧彷徨
Virtual machine installation deepin system
Thinkphp内核工单系统源码商业开源版 多用户+多客服+短信+邮件通知
Use of typescript classes
The solution to the complexity brought by lambda expression
Interview question: do you know the difference between deep copy and shallow copy? What is a reference copy?
Leetcode merge sort linked list
Solution of DM database unable to open graphical interface
Three years of experience in Android development interview (I regret that I didn't get n+1, Android bottom development tutorial
TypeScript类的使用
Social media search engine optimization and its importance
LeetCode-归并排序链表
Analyze the space occupied by the table according to segments, clusters and pages
How to write a client-side technical solution
Binary tree problem solving (2)
缓存一致性解决方案——改数据时如何保证缓存和数据库中数据的一致性