简体   繁体   English

如何在 Mac 上查找 PostgresSQL 的用户名和密码?

[英]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 commanduser_name替换为您通过\du命令找到的用户名

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 用户“root”、postgresSQL 和 docker 的密码验证失败 - password authentication failed for user "root", postgresSQL and docker 如何在 PostgresSQL 中的文本数组中查找重叠 - How to find overlaps in text array in PostgresSQL 无法在 mac 上重新安装 postgressql - Unable to reinstall postgressql on mac 在 Mac 上的 PgAdmin 中更改用户密码 - Changing user password in PgAdmin on mac 如何使用PostgresSQL查询查找点是否为直线的顶点之一 - How to find if a point is one of the vertices of a line using postgresSQL query 尝试从数据库访问或获取数据时,用户的 PostgresSQL 密码身份验证失败的问题? - Problem with PostgresSQL password authentication failed for user when trying to access or fetch data from database? 如何要求用户在PostgresSQL / plpgsql中输入输入? - How can I ask user to enter the input in PostgresSQL/plpgsql? 在 Docker 中与 node/express 一起运行 PostgresSQL 的问题。 致命:启动数据包中未指定 PostgreSQL 用户名 - Problems with running PostgresSQL together with node/express in Docker. FATAL: no PostgreSQL user name specified in startup packet mac 上用户“postgres”的密码验证失败 - password authentication failed for user "postgres" on mac Mac上用户'postgres'的密码验证失败 - Failed Password Authentication for user 'postgres' on mac
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM