Re: Transfer db from one port to another - Mailing list pgsql-general

From John R Pierce
Subject Re: Transfer db from one port to another
Date
Msg-id 567A793C.5070805@hogranch.com
Whole thread Raw
In response to Re: Transfer db from one port to another  (Killian Driscoll <killiandriscoll@gmail.com>)
Responses Re: Transfer db from one port to another  (Killian Driscoll <killiandriscoll@gmail.com>)
List pgsql-general
On 12/23/2015 2:25 AM, Killian Driscoll wrote:
Sorry, forgot to add: once I get the warning that the Pg_dump can't be found there is then a password prompt; I tried the db password and the pc password but both fail:

Password:
pg_dump: [archiver (db)] connection to database "irll_project" failed: FATAL:  p
assword authentication failed for user "killian"

note that databases don't have passwords, database USERS have passwords.  'killian' probably doesn't have a database user, and since you didn't specify a user, it defaulted to your system username (expecting that user to have been created in postgres, and wanting that probably non-existant postgres users passsword)

so, ok, try the command with -U postgres, as
pg_dump -Fc -p 5432 -U postgres irll_project | pg_restore -U postgres -p 5532
if/when it prompts for a password, thats the password of the 'postgres' database user, as configured in the postgres servers.

note it will prompt for the password a couple times,  once for postgres on port 5432, and again for postgres on port 5532, at least if both database services are configured to require passwords for local connections.


-- 
john r pierce, recycling bits in santa cruz

pgsql-general by date:

Previous
From: "Charles Clavadetscher"
Date:
Subject: Re: Transfer db from one port to another
Next
From: Alberto Cabello Sánchez
Date:
Subject: Re: Secret Santa List