0

I've followed some questions for uninstalling postgres sql on mac and can't figure out how to deal with not being able to delete the data directory. My issue is I installed it a while back but don't remember the password and the thinking is to uninstall it unless someone can tell me how to reset the password. I see a mac user account for postgres was created and after resetting the password through mac preferences I sill cannot get access to the db or connect via JDBC. Please help!

2

1 Answer 1

1

You can't access your db as system user is not the same user as user in postgresql.

It is hard to tell where is data directory, while not knowing how you have installed it in first place. It is possible that you have PGDATA environment variable set. You can check it by running following command in the console:

echo $PGDATA

If it is empty you can check possible data directory locations i.e. with find command:

sudo find / -name PG_VERSION

It is file that should be in postgresql database directory according to postgres documentation: http://www.postgresql.org/docs/8.4/static/storage-file-layout.html

You can also check this answer, if you don't want to uninstall and remove data directory: How do I reset the postgresql 9.2 default user (usually 'postgres') password on mac os x 10.8.2?

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.