postgres 拒绝工作。我正在使用 9.2 和一个新手。
我创建了一个数据库。我列出,它不在那里?没有错误!它去哪儿了?它曾经被创造过吗?
postgres-# creatdb test
postgres-# \list
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-----------+----------+----------+-------------+-------------+-----------------------
postgres | postgres | UTF8 | en_PH.UTF-8 | en_PH.UTF-8 |
template0 | postgres | UTF8 | en_PH.UTF-8 | en_PH.UTF-8 | =c/postgres +
| | | | | postgres=CTc/postgres
template1 | postgres | UTF8 | en_PH.UTF-8 | en_PH.UTF-8 | =c/postgres +
| | | | | postgres=CTc/postgres
(3 rows)
postgres-#
postgres@ubuntu:/home/ubuntu$ psql -h 127.0.0.1 -U postgres -d test
Password for user postgres:
psql: FATAL: database "test" does not exist