postgresql错误处理

论坛 期权论坛 脚本     
匿名技术用户   2021-1-3 01:23   33   0

psql: 无法联接到服务器: 没有那个文件或目录
服务器是否在本地运行并且在 Unix 域套接字
"/var/run/postgresql/.s.PGSQL.5432"上准备接受联接?

ubuntu@dongyang-K46CB:/$ sudo service postgresql start
Failed to start postgresql.service: Unit postgresql.service is masked.
ubuntu@dongyang-K46CB:/$ sudo systemctl unmask postgresql
Removed symlink /etc/systemd/system/postgresql.service.

ubuntu@dongyang-K46CB:/$ sudo systemctl restart postgresql
ubuntu@dongyang-K46CB:/$ sudo service postgresql start
ubuntu@dongyang-K46CB:/$ service postgresql status
● postgresql.service - PostgreSQL RDBMS
Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor preset: enabled)
Active: active (exited) since 三 2017-04-05 23:40:24 CST; 20s ago
Process: 9895 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
Main PID: 9895 (code=exited, status=0/SUCCESS)

4月 05 23:40:24 dongyang-K46CB systemd[1]: Starting PostgreSQL RDBMS...
4月 05 23:40:24 dongyang-K46CB systemd[1]: Started PostgreSQL RDBMS.
4月 05 23:40:37 dongyang-K46CB systemd[1]: Started PostgreSQL RDBMS.

转载于:https://www.cnblogs.com/cdyboke/p/6671284.html

分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:7942463
帖子:1588486
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP