[英]How to find user name and password for PostgresSQL on mac?
How to find user name and password for PostgresSQL on mac?如何在 Mac 上查找 PostgresSQL 的用户名和密码? I did not remember that I have set a password and username.
我不记得我设置了密码和用户名。 How to find the default username and password on mac?
如何在mac上找到默认的用户名和密码?
To log in without a password:不使用密码登录:
sudo -u postgres psql postgres
To know the username要知道用户名
\du
To reset the password:重置密码:
ALTER USER user_name WITH PASSWORD 'new_password';
replace user_name
with your username you found by \du
command将
user_name
替换为您通过\du
命令找到的用户名
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.