Jeff Axelrod
Jeff Axelrod

Reputation: 28188

No postgresql user created after new Windows install

I'm trying to use postgresql with Rails so I can run locally before deploying to Heroku. I installed the latest version of postgresql (9.2.4) from enterprisedb.com.

When I try to double click the database in pgAdmin III, it asks for a postgresql password. There is no Windows postgresql account in the user settings. I did notice that during my subsequent uninstallation of the application, the uninstaller referenced a service user account "NetworkService."

If I try to run the command line psql command, it asks for a password, then it complains that authentication failed for (my windows login account name). I tried entering my usual Windows account password, and that didn't work.

What's going wrong here? I've read many posts of people running into password/account issues with this database.

Upvotes: 2

Views: 10000

Answers (2)

Craig Ringer
Craig Ringer

Reputation: 324455

There is no Windows postgresql account in the user settings.

The installer for 9.2 doesn't create a postgres Windows user account. People were having too many problems with the service account password, getting confused between the service account and the postgres database account, etc. It now installs and runs as NETWORKSERVICE by default.

You will have set a PostgreSQL database password when you installed. You must log in to PostgreSQL as the postgres user with the password you gave during installation.

Upvotes: 7

Jeff Axelrod
Jeff Axelrod

Reputation: 28188

With the help of bma, I was able to get my Rails application running on Windows by following these steps:

  1. Install postgresql for Windows.
  2. Open the pgAdmin III application from the Windows Start Menu.
  3. Click on the File menu, click Open pg_hba.conf
  4. Browse to C:\Program Files (x86)\PostgreSQL\9.2\data\pg_hba.conf.
  5. Double click each of the rows and change md5 to trust

Upvotes: 3

Related Questions