I got Postgres 8.4 installed on my mac with Snow Leopard. I know the 'postgres' user was created but I have no idea what the default password is. How should I login to the database?
2 Answers
http://archives.postgresql.org/pgsql-admin/2001-10/msg00192.php and similar internet resources may answer your question. Supposedly, there is no password by default.
2 Comments
analyticsPierce
Thanks for the info. I think the problem was caused by a previous installation. I have been working with the pg_hba.conf and am close to getting it working.
Reinderien
Once you do get it working, would you like to post your configuration file(s)? This will help out future users.
For future readers...
I had a similar problem. After installing Postgres 9.1, the password I supplied to the installer didn't allow me to connect to the database using pgadmin 3. This is what I had to do to fix it:
Configure so you can log in without a password:
- Stop the postgres server (launch daemon):
- sudo launchctl unload /Library/LaunchDaemons/com.edb.launchd.postgresql-9.1.plist
- Edit data/pg_hba.conf and change 'md5' to 'trust' in the 'local' '127.0.0.1/32' line.
- Start the daemon
- sudo launchctl load /Library/LaunchDaemons/com.edb.launchd.postgresql-9.1.plist
- Stop the postgres server (launch daemon):
Connect using pgadmin 3 and re-set the password
- Start pgadmin 3 and connect to the database (right click 'Connect' on the Postgres 9.1 server).
- Under Login roles, right-click the 'posgres' user, select 'Properties...' and reset the password on the 'Definition' tab panel.
- Then disconnect pgadmin 3 from the database (right-click 'Disconnect' on the Postgres 9.1 server).
Configure the server so it requires a password again:
- Stop the daemon (as per step 1.1).
- Edit data/pg_hba.conf and change 'trust' back to 'md5' in the 'local' '127.0.0.1/32' line.
- Start the daemon (as per step 1.3).