postgresql报错:

  psql: 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"?

1.可能是服务没启动,以下3中启动方式:

  (1) postmaster -D /usr/local/pgsql/data/  (注意:这里的/usr/local/pgsql/data/ 是你的postgresql安装路径)

  (2)postmaster -D /usr/local/pgsql/data/ > logfile 2>&1 &

  (3)pg_ctl start -D /usr/local/pgsql/data/

2.可能是系统环境没加psql:

  用which psql回车找到psql路径,用echo $PATH查看PATH中有没有psql路径,没有的话就添加:方法如下:http://www.cnblogs.com/nightswatch/articles/4439776.html

3.还有问题的话:移步http://stackoverflow.com/questions/12472988/postgresql-error-could-not-connect-to-server-no-such-file-or-directory

  

psql: could not connect to server: No such file or directory的更多相关文章

  1. 问题解决:psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

    错误提示: psql: could not connect to server: No such file or directory Is the server running locally and ...

  2. psql: could not connect to server: No such file or directory&&PGHOST

    由于环境变量 PGHOST配置不当引起的 postgres@pgdb-> psql psql: could not connect to server: No such file or dire ...

  3. 问题解决:psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

    错误提示: psql: could not connect to server: No such file or directory Is the server running locally and ...

  4. docker 踩坑笔记之 psql: could not connect to server

    最近在用docker跑rails,也遇到了一些坑,这里记录一下. 首先build项目: docker-compose build 然后就开始报错了: psql: could not connect t ...

  5. “psql: could not connect to server: Connection refused” Error when connecting to remote database

    问题: I am trying to connect to a postgres database installed in a remote server using the following c ...

  6. postgresql connection failure:SQLSTATE[08006] [7] could not connect to server: Permission denied Is the server running on host "127.0.0.1" and accepting TCP/IP connections on port 5432?

    PHP 程序无法连接到 CentOS 上的PostgreSQL,但是在 CentOS 服务器上却能正常运行 psql, 操作如下:多次重启 PG 数据库后发现 CGI 脚本无法连接数据库,但是可以使用 ...

  7. SSH登录之后运行命令报错的解决办法-- Failed to connect to Mir: Failed to connect to server socket: No such file or directory

    问题描述: Failed to connect to Mir: Failed to connect to server socket: No such file or directory 解决方案: ...

  8. LoadRunner执行过程报错“Failed to connect to server "xxx.xxx.xxx.xxx:xx":[10060] connetion time out”

    执行性能测试过程中,LR报错: Action.c(6):Error -27796: Failed to connect to server "xxx.xxx.xxx.xxx:xx" ...

  9. MySQL忘记密码,或:root密码重置报错:mysqladmin: connect to server at 'localhost' failed的解决方案

    MySQL root密码重置报错:mysqladmin: connect to server at 'localhost' failed的解决方案   1  登陆失败,mysqladmin修改密码失败 ...

随机推荐

  1. vue回调接口

    1.微博回调接口 1.1oauth/urls.py 中添加路由 urlpatterns = [ path('weibo/callback/', views.OauthWeiboCallback.as_ ...

  2. 第10.9节 Python子包的导入方式介绍

    在<第10.8节 Python包的导入方式详解>详细介绍了包的导入方式,子包也是包,子包的导入与包的导入方法上没有本质区别,但二者还是有所不同.本节对照二者的方式介绍子包与包导入的关系: ...

  3. 第10.5节 使用__all__定义Python模块导入白名单

    一. 引言 <第10.4节 Python模块的弱封装机制>介绍了Python模块的的弱封装机制,除了使用弱封装机制来从一定程度上防止导入特定成员外,Python模块中还提供可另外一种类似白 ...

  4. 【.Net Core】开源项目源码--门户网站--精神科医院官网

    项目简介 此项目是一个实际开发招投标项目,汕头大学精神卫生中心.一个门户网站,因为没有投标上所以把源码公开出来分享. Github地址: https://github.com/simawenbo12/ ...

  5. EditPlus各个版本的注册码,亲测可用

    原文链接:https://www.cnblogs.com/shihaiming/p/6422441.html EditPlus4注册码 注册名:host1991    序列号:14F50-CD5C8- ...

  6. sqlplus、lsnrctl命令工具不可用(libclntsh.so.11.1)

    原因: libclntsh.so.11.1文件丢失了 解决方法: 在其他机器把这个文件拷贝到目标库安装目录底下的lib目录即可

  7. v-once

    v-once 使用了这个指令,那么这个值将只会渲染一次,后续将不会再被更改 初始运行结果: 在控制台中分别修改他们的值: 可以看到使用了v-once指令的插值没有被修改.

  8. get \post 接口代码及断言编写

    post 请求接口 import requests import json url_path = "http://www.baidu.com" data = {"user ...

  9. css 11-CSS3属性详解(一)

    11-CSS3属性详解(一) #前言 我们在上一篇文章中学习了CSS3的选择器,本文来学一下CSS3的一些属性. 本文主要内容: 文本 盒模型中的 box-sizing 属性 处理兼容性问题:私有前缀 ...

  10. 移动端 canvas基础1

    一.canvas画布 Canvas是HTML5中新出的一个元素,开发者可以通过JS脚本动态绘制图像. #1. 创建canvas画布 在页面中创建canvas标签,并设置其id和宽高 (不要通过css设 ...