PostgreSQL9 connection information to the database

Source: Internet
Author: User

PostgreSQL9 connection information to the database

To connect to the database, sql9 must provide the following parameters:

Host or host address, port number, database instance name, user name, and user password.

When you log on to the server, you can use commands to view these parameters.

For example:

Select inet_server_addr (), inet_server_port (), current_database (), current_user, version ();

Output: "127.0.0.1"; 5432; "s"; "postgres"; "PostgreSQL 9.4.2 on x86_64-RedHat-linux-gnu, compiled by gcc (GCC) 5.1.1 20150422 (Red Hat 5.1.1-1 ), 64-bit"

PostgreSQL disables remote login by default. You can modify the configuration file postgresql. conf to listen_addresses = '*' (if multiple NICs are configured on the machine, all the IP addresses of the NICS are used ),

And pg_cmd.conf (database role access control), allowing all remote users to connect to all databases through an encrypted password.

Content:

# Type database user CIDR-ADDRESS METHOD

Host all 0.0.0.0/0 md5

If the type is host, it indicates a remote connection,

The preceding two files may vary depending on the directories you have installed. If you do not know, find the file or other file search commands.

Because Fedora22 is installed, you can run the dnf install command to install it online.

Default Configuration File directory:

/Var/lib/pgsql/data/postgresql. conf
/Var/lib/pgsql/data/pg_cmd.conf

------------------------------------ Lili split line ------------------------------------

Install PostgreSQL 6.3 on yum in CentOS 9.3

PostgreSQL cache details

Compiling PostgreSQL on Windows

Configuration and installation of LAPP (Linux + Apache + PostgreSQL + PHP) Environment in Ubuntu

Install and configure phppgAdmin on Ubuntu

Install PostgreSQL9.3 on CentOS

Configure a Streaming Replication cluster in PostgreSQL

How to install PostgreSQL 7/6 and phpPgAdmin in CentOS 5/6. 4

------------------------------------ Lili split line ------------------------------------

PostgreSQL details: click here
PostgreSQL: click here

This article permanently updates the link address:

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.