我试图使用pg_dump命令导出PostgreSQL数据库(db name ari_company):
C:\Program Files (x86)\PostgreSQL\10\bin>pg_dump --no-owner -U postgres ari_company> dump.sql
然后我收到了这个错误:
pg_dump: [archiver (db)] connection to database "ari_company" failed: FATAL: database "ari_company" does not exist
但是当我运行默认数据库(postgres)时,它可以工作并创建dump.sql。用命令
psql\li checked which db exist and there is postgres and my created ari_company. what im doing wrong here ?
问题是我有两个已安装的服务器,但连接到没有命名数据库的错误服务器。数据库postgres在两台服务器上都会退出,因为它是自动创建的,其名称与您为用户名设置的名称相同