Skip site navigation (1) Skip section navigation (2)

Re: pg_dump/pg_dumpall

From: Alan Hodgson <ahodgson(at)simkin(dot)ca>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: pg_dump/pg_dumpall
Date: 2007-08-10 19:20:05
Message-ID: 200708101220.05343@hal.simkin.ca (view raw or flat)
Thread:
Lists: pgsql-novice
On Friday 10 August 2007 11:49, "Andrew C. Uselton" <acuselton(at)lbl(dot)gov> 
wrote:
> uselton]# pg_dumpall   > /tmp/osp5_pgsql.dump
> Password:
> pg_dumpall: could not connect to database "template1": FATAL: 
> Password authentication failed for user "root"
>
> If it really is asking for the 'root' password I am certainly giving
> it correctly.  I am root as I issue the command as well.  I've tried
> a few other guesses at what it might _really_ be wanting (including
> using an explicit '-h host -p port'), but with no better luck.  Any
> hints would be most appreciated. Cheers,

It is trying to connect as root, because you're logged in to your OS as 
root, but there probably isn't a root user in the database.

You need to connect as a database superuser to do a backup. The normal 
default superuser is "postgres".  Where it gets its password from or 
even if it requires one depends on your configuration.

-- 
"Democracies survive only until the voters discover that they can vote
themselves largesse from the public treasury ..." -- Alexander Tyler


In response to

Responses

pgsql-novice by date

Next:From: Marcin PorwitDate: 2007-08-10 19:58:16
Subject: Configuring Postgresql to use PAM
Previous:From: Richard Broersma JrDate: 2007-08-10 19:13:31
Subject: Re: pg_dump/pg_dumpall

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group