[postgres9.6@db data]$ vi pg_hba.conf
# "local" is for Unix domain socket connections only
local all all md5
# IPv4 local connections:
host all all 127.0.0.1/32 md5
[postgres9.6@db data]$ pg_ctl stop
waiting for server to shut down.... done
server stopped
[postgres9.6@db data]$ pg_ctl start
server starting
[postgres9.6@db data]$ LOG: redirecting log output to logging collector process
HINT: Future log output will appear in directory "pg_log".
[postgres9.6@db data]$ psql -d test -U postgres9.6
Password for user postgres9.6: -----此时提示需要输入密码
Null display is "NULL".
Pager is always used.
Timing is on.
psql (9.6.1)
Type "help" for help.
postgres9.6@[local]:5432 test# \q
[postgres9.6@db data]$ vi pg_hba.conf
# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 trust
[postgres9.6@db data]$ pg_ctl stop
waiting for server to shut down.... done
server stopped
[postgres9.6@db data]$ pg_ctl start
server starting
[postgres9.6@db data]$ LOG: redirecting log output to logging collector process
HINT: Future log output will appear in directory "pg_log".
[postgres9.6@db data]$ psql -d test -U postgres9.6
Null display is "NULL".
Pager is always used.
Timing is on.
psql (9.6.1)
Type "help" for help.
postgres9.6@[local]:5432 test#
postgres9.6@[local]:5432 test# \dt
List of relations
Schema | Name | Type | Owner
--------+-------+-------+-------------
public | test | table | postgres9.6
public | testa | table | test
(2 rows)
postgres9.6@[local]:5432 test#
# "local" is for Unix domain socket connections only
local all all md5
# IPv4 local connections:
host all all 127.0.0.1/32 md5
[postgres9.6@db data]$ pg_ctl stop
waiting for server to shut down.... done
server stopped
[postgres9.6@db data]$ pg_ctl start
server starting
[postgres9.6@db data]$ LOG: redirecting log output to logging collector process
HINT: Future log output will appear in directory "pg_log".
[postgres9.6@db data]$ psql -d test -U postgres9.6
Password for user postgres9.6: -----此时提示需要输入密码
Null display is "NULL".
Pager is always used.
Timing is on.
psql (9.6.1)
Type "help" for help.
postgres9.6@[local]:5432 test# \q
[postgres9.6@db data]$ vi pg_hba.conf
# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 trust
[postgres9.6@db data]$ pg_ctl stop
waiting for server to shut down.... done
server stopped
[postgres9.6@db data]$ pg_ctl start
server starting
[postgres9.6@db data]$ LOG: redirecting log output to logging collector process
HINT: Future log output will appear in directory "pg_log".
[postgres9.6@db data]$ psql -d test -U postgres9.6
Null display is "NULL".
Pager is always used.
Timing is on.
psql (9.6.1)
Type "help" for help.
postgres9.6@[local]:5432 test#
postgres9.6@[local]:5432 test# \dt
List of relations
Schema | Name | Type | Owner
--------+-------+-------+-------------
public | test | table | postgres9.6
public | testa | table | test
(2 rows)
postgres9.6@[local]:5432 test#