Search Postgresql Archives

Re: DBeaver postgres localhost access

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

 



On 5/20/23 07:09, Pedro Gonçalves wrote:
Hi.

Good afternoon.

I’m having dificulties with localhost DBeaver postgres training account.

Had access to it and changed password, that presently don’t remember.

What can I do to get access again?

 From DBeaver I was told to address this request to PostgreSQL.


1) Find the pg_hba.conf file for the server and change the auth method to trust for local connections, where local means socket connection. This is shown in example here:

https://www.postgresql.org/docs/current/auth-pg-hba-conf.html

Example 21.1. Example pg_hba.conf Entries.

2) Reload/restart server

3) Using psql connect with

psql -d <db_name> -U <user_name> -p <port_no>

Once you are connected you can use ALTER USER <user_name> WITH PASSWORD 'some_pwd';

This assumes the <user_name> you connect as has sufficient privileges to do the the ALTER. One way to ensure that is use the postgres user.

4) Once you have a new password set and shown to work then decide whether you want local to remain set at trust or change it to something more secure. If you change it then you will need to repeat 2).



Kind Regards,

Pedro Gonçalves


--
Adrian Klaver
adrian.klaver@xxxxxxxxxxx






[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 Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux