How do I host the PostgreSQL server locally? It won't let me run as SuperUser, and it won't let me log out of SuperUser

0

I've spent all day working on a Database project to try and teach myself how to use SQL and PHP. When I finally went to go and try to host it, the command prompt kept closing really quickly. I took a screenshot and it says that I can't run the server as the super user because it can be abused and everything.

I've been looking for answers online for over an hour, all I find are little bits and pieces of information. My system is Windows 7 x64 and I am using PostgreSQL 9.4. At first I thought it meant a non-administrator on my computer so I made a new regular user account, but I can't install PostgreSQL without administrator rights.

So, I figured that meant I need to make a regular user on the pgAdmin III program that isn't the default "postgres" super admin. So I made a new user, but now I can't find any way to log out of the postgres account. When I start up the program it prompts me for the server password for 'postgres' which then automatically logs me into that user account. I don't see a way for me to host the server locally from my regular user there.

This is so frustrating I've seriously spent over an hour on it and haven't gotten close to figuring out how to do this.

Is there a step by step guide somewhere that explains this? Any command prompt commands I need to enter? Or something?

All I am wanting to do is host the server locally so I can see if my code works and see if I am able to do the things I want to do. Nothing fancy. I've never had this much of a problem starting a local server before (I am able to start Node.js servers in a few seconds).

What am I doing wrong? Am I completely missing something?

a8d9add11bff124c0fbddd7a6607

Posted 2015-04-11T21:08:15.183

Reputation: 1

Please show the exact error message(s) you get, and the exact command(s) you ran to get them. Generally on Windows you should be letting the installer set up PostgreSQL as a service; check in the Services control panel (Start->Run->services.msc) to see if you have a postgresql-9.4-x64 service listed there. – Craig Ringer – 2015-04-12T12:20:35.937

Answers

0

You should use the EnterpriseDB installer. It makes life easy:

http://www.enterprisedb.com/downloads/postgres-postgresql-downloads

You can install PG with you logged in as an admin (Windows admin user), but it can't run as an admin. Mostly because running it as admin is a terrible idea.

On my Win 7 64 system, it runs as Network Service.

Neil McGuigan

Posted 2015-04-11T21:08:15.183

Reputation: 339