su postgres: Sorry? [closed]

两盒软妹~` 提交于 2019-11-28 21:17:17

问题


i have a problem with my postgreSQL setup on my new Mac OSX Lion machine.

I can't seem to connect to the service

$ createuser -a -d _postgres
Password: 
createuser: could not connect to database postgres: FATAL:  password authentication failed for user 

I have no chance to find the correct password. Any idea what could that be. I have the default setup with a localhost server. The same happens when I try to connect via pgAdmin.

$ su postgres
Password:
su: Sorry

I have no chance to find out what's wrong?


回答1:


try this:

$ sudo su postgres

And specify your own password.




回答2:


Does this work?

First get root access

$ su - 
Password: RootPW
# su - postgres


来源:https://stackoverflow.com/questions/7765269/su-postgres-sorry

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