root@localhost ~]#su

bash-4.2$ su Password: su: Authentication failure //这里切换的是系统用户,现在还不清楚为什么postgres成了我的系统用户 bash-4.2$ su Password: [root@localhost ~]#

 //qie huan yong  hu:

[root@localhost data]# psql -h 127.0.0.1 -U postgres -d postgres
Password for user postgres: 
psql (9.5.6)
Type "help" for help.

postgres=# 

 psql -h 127.0.0.1 -U postgres(yonghu) -d test1(shujuku)

[root@localhost data]# psql -h 127.0.0.1 -U postgres -d test1
Password for user postgres: 
psql (9.5.6)
Type "help" for help.

test1=# \q

 

相关文章:

  • 2021-12-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-22
  • 2021-08-16
  • 2022-02-15
  • 2022-12-23
猜你喜欢
  • 2021-05-16
  • 2022-12-23
  • 2021-12-14
  • 2022-12-23
  • 2021-05-24
  • 2022-12-23
相关资源
相似解决方案