1500字范文,内容丰富有趣,写作好帮手!
1500字范文 > postgresql出现Is the server running locally and accepting connections on Unix domain socket /tmp/.s.

postgresql出现Is the server running locally and accepting connections on Unix domain socket /tmp/.s.

时间:2019-05-19 02:11:13

相关推荐

postgresql出现Is the server running locally and accepting 	connections on Unix domain socket /tmp/.s.

在psql进入数据库出现以下错误[postgres@pg data]$ psqlpsql: could not connect to server: No such file or directoryIs the server running locally and acceptingconnections on Unix domain socket "/tmp/.s.PGSQL.5432"?可能出现的原因1:tmp目录的全权限被修改过[root@pg ~]# chown -R postgres:postgres /tmp可能原因2:修改过以下参数unix_socket_directories = '/home/postgres/' # comma-separated list of directories# (change requires restart)unix_socket_group = '' # (change requires restart)unix_socket_permissions = 0777 # begin with 0 to use octal notation更改过存放文件的位置目录(默认是tmp)重启数据库后psql进入数据库出现开始的错误这是我们有几个方法进入数据库一个是指定文件的位置[postgres@pg data]$ psql -h /home/postgres/psql (9.4.4)Type "help" for help.postgres=# 另一个是指定主机[postgres@pg data]$ psql -h 127.0.0.1psql (9.4.4)Type "help" for help.postgres=# 有时候如果你不小心删除了wal日志,导致数据库无法读取wal日志也会出现这种错误,这时候如果你开启了归档还好办,没有话,只能重装数据库了。

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。