Re: I lost my password

Поиск
Список
Период
Сортировка
От
Тема Re: I lost my password
Дата
Msg-id 6B286EA2B04A43B595886EA978569393@ArbolOnePC
обсуждение исходный текст
Ответ на Re: I lost my password  (Raymond O'Donnell <rod@iol.ie>)
Ответы Re: I lost my password  (Raymond O'Donnell <rod@iol.ie>)
Список pgsql-general
It worked!
Thanks kids, that was awesome!

One last question, is there a tutorial about accessing the back end using
c++
Again, thanks soooo much!

-----Original Message-----
From: Raymond O'Donnell
Sent: Monday, July 27, 2015 9:28 AM
To: papa@arbolone.ca ; Adrian Klaver ; PostGreSQL MailingList
Subject: Re: [GENERAL] I lost my password

On 27/07/2015 04:15, papa@arbolone.ca wrote:
> OK, I think I should tell you folks that I am a newbie. I am using
> postgresql to learn the SQL for the purpose of learning storing the data
> in my c++ application. I have near zero knowledge of SQL or PostgreSQL
> for that matter.
> When I type C:\pgsql, I am asked to entered a password, but I don't
> recall the any passwords I might've set up at installation time.

Hello there,

Adrian's advice about re-installing is probably the easiest way to do
it. However, here's another route, just for completeness (I'm assuming
that you're installing on your own laptop or similar, not a server):

Find the file pg_hba.conf in the data directory. Look for a "host" line
like this:

   host     all      all   127.0.0.1/32    md5

Change "md5" to "trust", save the file and re-start the PostgreSQL
service. You should then be able to connect without a password:

   psql -U postgres

NB - If you don't specify a Postgres user with -U, Postgres assumes that
you're connecting as the current operating system user.

You can then reset the password for the user "postgres" (or whatever
user you used to connect):

  alter role postgres with password 'whatever';

Don't forget to edit pg_hba.conf once again and set "trust" back to
"md5' (and re-start the service).

Finally, note that the "postgres" user is the super-user, so the usual
caveats apply... better to create another ordinary user for normal
connections.

I hope this helps,

Ray.

--
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie



В списке pgsql-general по дате отправления:

Предыдущее
От: Melvin Davidson
Дата:
Сообщение: Re: Connections closing due to "terminating connection due to administrator command"
Следующее
От: "Greg Sabino Mullane"
Дата:
Сообщение: Re: This utility can only upgrade to PostgreSQL version 9.4