Обсуждение: accidentally deleted user --> postgres

Поиск
Список
Период
Сортировка

accidentally deleted user --> postgres

От
gf
Дата:
Hello all,
I was recently installing pg on a virtual machine. I also had pg installed
and working on my local machine.
On the vm I was having some issues installing a Drupal db so in searching
for a solution I found a recommendation of the following:
net user postgres /delete
and then reinstall pg.

I ran this command in what I thought was my newly built virtual machine's
dos window but it turned out to be the window for my localmachine which had
a fully functioning pg install with several dbs.
I was able to get my virtual machine up and running with pg and drupal as I
was easily able to reinstall pg.

The problem I have is I cannot connect to the postgres sql server database
using pgadmin III on my localmachine(the one I accidentally ran net user
postgres /delete on).

If I open up pgadmin and then in left column I have:
database
below this I have:
PostgreSQL Database Server 8.1(localhost:5432)...
If I right click on the above and select connect, I get the following error:
Server doesn't listen
The server doesn't accept connections: the connection library reports
could not connect to server: Connection refused (0x0000274D/10061) Is the
server running on host "127.0.0.1" and accepting TCP/IP connections on port
5432?


Any Ideas?
I am new to PG so perhaps it is a simple adduser statement(I hope)?
Thanks in advance.
--
View this message in context: http://www.nabble.com/accidentally-deleted-user---%3E-postgres-tf3161276.html#a8768443
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


Re: accidentally deleted user --> postgres

От
"Shoaib Mir"
Дата:
This error actually indicates that the host and port information you are providing for the PostgreSQL database server is incorrect or there is not database server running on that (or it might be the firewall settings too).

First of all what I will recommend is to check on your database server to see if the db server is running or not. You can do that using:

pg_ctl -D <data folder path> status

Once that gives a good status then you might have to tweak 'pg_hba.conf' file to allow for users connecting to the database.

--
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)

On 2/2/07, gf < gforty@gmail.com> wrote:

Hello all,
I was recently installing pg on a virtual machine. I also had pg installed
and working on my local machine.
On the vm I was having some issues installing a Drupal db so in searching
for a solution I found a recommendation of the following:
net user postgres /delete
and then reinstall pg.

I ran this command in what I thought was my newly built virtual machine's
dos window but it turned out to be the window for my localmachine which had
a fully functioning pg install with several dbs.
I was able to get my virtual machine up and running with pg and drupal as I
was easily able to reinstall pg.

The problem I have is I cannot connect to the postgres sql server database
using pgadmin III on my localmachine(the one I accidentally ran net user
postgres /delete on).

If I open up pgadmin and then in left column I have:
database
below this I have:
PostgreSQL Database Server 8.1(localhost:5432)...
If I right click on the above and select connect, I get the following error:
Server doesn't listen
The server doesn't accept connections: the connection library reports
could not connect to server: Connection refused (0x0000274D/10061) Is the
server running on host " 127.0.0.1" and accepting TCP/IP connections on port
5432?


Any Ideas?
I am new to PG so perhaps it is a simple adduser statement(I hope)?
Thanks in advance.
--
View this message in context: http://www.nabble.com/accidentally-deleted-user---%3E-postgres-tf3161276.html#a8768443
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo@postgresql.org so that your
       message can get through to the mailing list cleanly

Re: accidentally deleted user --> postgres

От
Shane Ambler
Дата:
gf wrote:
> Hello all,
> I was recently installing pg on a virtual machine. I also had pg installed
> and working on my local machine.
> On the vm I was having some issues installing a Drupal db so in searching
> for a solution I found a recommendation of the following:
> net user postgres /delete
> and then reinstall pg.

You will find that this is a standard system userid that was removed and
is normally setup/created when installing postgresql. You will need to
either reinstall postgresql on your local system or recreate the
postgres user on your local system (not your vm)

Part of the security of postgresql is that the user running the server
itself has limited privileges so that the database data is all that it
can access. Without this user account it will not run, if you create the
userid manually make sure it is not a member of the admin group and
check that the postgresql service is started with that userid.

> I ran this command in what I thought was my newly built virtual machine's
> dos window but it turned out to be the window for my localmachine which had
> a fully functioning pg install with several dbs.
> I was able to get my virtual machine up and running with pg and drupal as I
> was easily able to reinstall pg.
>
> The problem I have is I cannot connect to the postgres sql server database
> using pgadmin III on my localmachine(the one I accidentally ran net user
> postgres /delete on).
>
> If I open up pgadmin and then in left column I have:
> database
> below this I have:
> PostgreSQL Database Server 8.1(localhost:5432)...
> If I right click on the above and select connect, I get the following error:
> Server doesn't listen
> The server doesn't accept connections: the connection library reports
> could not connect to server: Connection refused (0x0000274D/10061) Is the
> server running on host "127.0.0.1" and accepting TCP/IP connections on port
> 5432?
>
>
> Any Ideas?
> I am new to PG so perhaps it is a simple adduser statement(I hope)?
> Thanks in advance.


--

Shane Ambler
pgSQL@007Marketing.com

Get Sheeky @ http://Sheeky.Biz

Re: accidentally deleted user --> postgres

От
Shane Ambler
Дата:
g f wrote:
> Shane,
> thanks for the advice.
> I created the user: net user postgres /add
> I still get the error. When I try to start the postgres service in
> windows-->services I get a "The service did not start due to logon failure"

As long as the postgres user account is not in the admin group check
that the postgresql service is set to Log on as user postgres.

Not sure of the command line but in the gui the service settings has a
'Log On' tab that allows you to set a specific user to run the service.
This is where you need to check that your postgres user is used to start
the service or maybe the password there doesn't match the new account.



--

Shane Ambler
pgSQL@007Marketing.com

Get Sheeky @ http://Sheeky.Biz