PostgreSQL 操作错误:无法连接到服务器 [英] PostgreSQL OperationalError: could not connect to server

查看:98
本文介绍了PostgreSQL 操作错误:无法连接到服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

今天我第一次遇到这个错误:

For the first time today I ran into this error:

无法连接到服务器:没有那个文件或目录服务器是否在本地运行并接受Unix 域套接字/tmp/.s.PGSQL.5432"上的连接?

could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

我正在使用 PostgreSQL 在本地运行一个简单的 Django 博客.

I am running a simple Django blog, locally using PostgreSQL.

当我跑步时:

ps 辅助 |grep postgres

ps auxw | grep postgres

我得到以下信息:

Chris    3260    0.5   0.0  2432768    620 s000  R+   11:37AM   0:00.00 grep postgres

我最后一次能够成功使用 PostgreSQL 是在昨晚.从那以后我没有改变任何东西,所以这可能与我的电脑有关吗?

The last time I was able to successfully use PostgreSQL was last night. I have not changed anything since then, so it might be something to do with my computer maybe?

如果您需要更多信息,请询问我 :) 感谢您的帮助!

If you need anymore info, just ask me :) Thanks for your help!

推荐答案

问题与我关闭计算机的方式有关.简单的重启解决了我的问题.

The problem had to do with the way I shut down my computer. A simple restart fixed my problem.

这篇关于PostgreSQL 操作错误:无法连接到服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆