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. springsecurity+springsocial资料收集

    https://blog.csdn.net/tryandfight/article/details/80524573 https://niocoder.com/2018/01/09/Spring-Se ...

  2. PyQt(Python+Qt)学习随笔:MoviePy视频转GIF动图相关方法介绍

    专栏:Python基础教程目录 专栏:使用PyQt开发图形界面Python应用 专栏:PyQt入门学习 老猿Python博文目录 MoviePy能处理的视频是ffmpeg格式的,老猿理解支持的文件类型 ...

  3. Python中使用f字符串进行字符串格式化的方法

    在<第3.10节 Python强大的字符串格式化新功能:使用format字符串格式化>介绍了使用format进行字符串格式化的方法,在Python 3.6中,如果格式化字符串中的关键字参数 ...

  4. XSS挑战赛(3)

    查看关键代码: <?php ini_set("display_errors", 0); $str = $_GET["keyword"]; $str00 = ...

  5. Java 8 中的方法引用,轻松减少代码量,提升可读性!

    1. 引言 Java8中最受广大开发中喜欢的变化之一是因为引入了 lambda 表达式,因为这些表达式允许我们放弃匿名类,从而大大减少了样板代码,并提高了可读性. 方法引用是lambda表达式的一种特 ...

  6. 小心使用 Task.Run 续篇

    关于前两天发布的文章:为什么要小心使用 Task.Run,对文中演示的示例到底会不会导致内存泄露,给很多人带来了疑惑.这点我必须向大家道歉,是我对导致内存泄漏的原因没描述和解释清楚,也没用实际的示例证 ...

  7. vue中监视对象内部变化的三种方法

    一,对整个对象监视 watch:{ obj:{ handler(newV,oldV){ console.log('obj changed') }, deep: true,//深度遍历 immediat ...

  8. PHash从0到1

    背景 在重复图识别领域,对于识别肉眼相同图片,PHash是很有用的,而且算法复杂度很低.它抓住了 " 人眼对于细节信息不是很敏感 " 的特性,利用DCT变换把高频信息去掉,再加上合 ...

  9. js 导出div 中的类容为 word 文件

    //引入包 <script src="/FileSaver.js"></script>  <script src="/jquery.word ...

  10. 总括订单Blanket order

    总括订单Blanket order是客户向其供应方发出的采购订单,但其中包含一段时间内的多个交货日期,通常使用谈判时的预定价格.大多数情况下,它用于对消耗性商品有经常性需求的情况.总括订单通常用于客户 ...