Default password for my user in postgresql

旧巷老猫 提交于 2019-12-08 17:26:07

问题


I installed postgresql on my Mac through homebrew. It said it didn't create a postgres account, but is using an account with my username instead. However, running the command psql fails because when I type in my password, it says it's wrong. I've retried it to make sure I'm not typing it wrong. So what's the password it gave me?


回答1:


There are two different "accounts" here:

  1. The OS X user that owns the PostgreSQL files and processes. When you installed PostgreSQL, you used your own user account for that.

  2. The PostgreSQL user that can log in to the PostgreSQL database. By default, that user is internal to your PostgreSQL instance and has nothing to do with any OS X user.

For psql, you need #2. Immediately after installation, there should be a user named "postgres" with no password that has full administrative privileges - try logging in with those credentials (and change the password to something secure ASAP).



来源:https://stackoverflow.com/questions/23769579/default-password-for-my-user-in-postgresql

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!