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: