Search Postgresql Archives

Re: pg_dumpall: could not connect to database "template1": FATAL:

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/13/2016 08:51 AM, aws backup wrote:
Hi Adrian,

I assume that the postgres database password is the one which is shown
in the DaVinci connect database window.

user: postgres
password: DaVinci

But if I work in the Terminal and change the user "sudo su - postgres" I
have to use my admin password.

Two different users:

The first instance is the database user postgres

The second is the system user postgres.

When you run command line commands against the Postgres database and they ask for the user and password that is the database user postgres and its associated password, so when you do something like:

psql -d template1 -U postgres

the password you will be prompted for is DaVinci

Now the above also depends on what is set in pg_hba.conf for the various combinations of host, database, user and auth_method. For more information see:

https://www.postgresql.org/docs/9.5/static/client-authentication.html

From the DaVinci manual:

• Make sure you log in as a user with Admin privileges, then open the
Terminal application, located in the /Applications/Utilities folder,
and open up the postgres environment for editing by typing:

sudo su - postgres

• At the prompt, type that computer’s administrator password and press
return.

• When the “postgres$” prompt appears, you’ll create a backup of the
“pg_hba.conf” setup

le for safety by typing:


Therefore I assumed that the postgres user has the same password as my
admin account. But maybe I am wrong with these assumptions.

That is optional and I sort of doubt the application using one.

You think DaVinci is not using any password … ?

Thank you.
Robert



On 13 Nov 2016, at 17:57, Adrian Klaver <adrian.klaver@xxxxxxxxxxx
<mailto:adrian.klaver@xxxxxxxxxxx>> wrote:

On 11/13/2016 05:51 AM, aws backup wrote:
Hi Adrian,

thank you for the answer.
There is one password for the postgres database and one for the
postgres user.

How are you determining this?

More to the point are you talking about the application(DaVinci
Resolve) or the database itself?

Both are not working somehow. Is there a way to look up the
passwords? I saw in the documentation that there is a .pgpass file.
But I can't find it.

That is optional and I sort of doubt the application using one.


I changed the auth method to trust for all users. This worked for now.
Thank you.

Best Regards,
Robert


On 12 Nov 2016, at 23:31, Adrian Klaver <adrian.klaver@xxxxxxxxxxx
<mailto:adrian.klaver@xxxxxxxxxxx>> wrote:

On 11/12/2016 01:20 PM, aws backup wrote:
Hi,

I try to make pg_dumpall backups from a PostgreSQL 9.5 server which
is part of the DaVinci Resolve 12.5.3 App on a Mac OS X 10.11.6 system.

Unfortunately I get following failure message:

pg_dumpall: could not connect to database "template1": FATAL:
password authentication failed for user "postgres"

Maybe you can help me to solve this problem.

Two choices:

1) Determine what the password is for the postgres user and provide
it when you connect.

2) If you have access to the pg_hba.conf file create a access line
that uses trust as the auth method for user postgres connect that way.

https://www.postgresql.org/docs/9.5/static/auth-methods.html#AUTH-TRUST


Thank you.

Best Regards,
Robert






--
Adrian Klaver
adrian.klaver@xxxxxxxxxxx


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




--
Adrian Klaver
adrian.klaver@xxxxxxxxxxx <mailto:adrian.klaver@xxxxxxxxxxx>



--
Adrian Klaver
adrian.klaver@xxxxxxxxxxx


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux