如何进入pg

九月课程 2024-05-01 20:00:51

作为新手,安装好pg后,如何进入数据库?

直接在 root 用户下输入psql,结果报错了:

[root@localhost run]# psql

psql: FATAL: role "root" does not exist

原来需要切换到 pg的专用用户下去执行。

[root@localhost run]# su - postgres

[postgres@localhost ~]$ psql

psql (11.3)

Type "help" for help.

postgres=#

0 阅读:0

九月课程

简介:感谢大家的关注