英文:
Password authentication failed for user
问题
我在尝试在我的MacOs上运行psql时遇到了问题。psql命令返回以下错误:
psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: FATAL: password authentication failed for user "luicruz"
我该如何解决这个问题?
当终端要求我输入密码时,我尝试输入我的sudo
密码,但没有成功。唯一有效的密码是我在安装应用程序时为默认用户"postgres"设置的密码。
我不知道为什么用户'luicruz'会自动创建,我没有创建这个用户或为该用户设置密码。
现在我无法使用psql命令。
以下是显示Pg Admin 4的登录/组规则以及终端命令的返回的图像:
英文:
I am having a problem trying to run psql on my MacOs. The psql command returns the following error:
psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: FATAL: password authentication failed for user "luicruz"
How could I fix this?
I try to put my sudo
password when the terminal request me the password, but it didn't work. The only password that works is for the default user "postgres" that I set the password when I install the app on my system.
I don't know why the user 'luicruz' was automatically created, I didn't create this user or set a password for this user.
And now I can't use the psql command.
Below is an image showing the login/Group roules of the Pg Admin 4 and also the return of the commands in the terminal
答案1
得分: 0
问题在于需要在数据库名称之外使用 psql
命令,而我之前不知道这一点。在创建数据库后,我能够在 psql
命令之外使用该命令。
英文:
The problem is that the psql
command needs to be used in addition to the database name, and I didn't know that. After creating the database, I was able to use the command apart from the psql
command.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论