LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 3139|回复: 3

SSH到服务器创建用户出错

[复制链接]
发表于 2009-9-27 14:01:04 | 显示全部楼层 |阅读模式
这是怎么回事?
postgres@debian:/$ createuser ssssjk
Shall the new role be a superuser? (y/n) n
Shall the new role be allowed to create databases? (y/n) y
Shall the new role be allowed to create more new roles? (y/n) n
createuser: 无法联接到数据库 postgres: could not connect to server: 没有那个文件或目录
        Is the server running locally and accepting
        connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
 楼主| 发表于 2009-9-27 14:06:09 | 显示全部楼层
postgres@debian:/$ psql
psql: could not connect to server: 没有那个文件或目录
        Is the server running locally and accepting
        connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?


debian:/var/run/postgresql# ls -a
.  ..
回复 支持 反对

使用道具 举报

发表于 2009-9-29 00:54:10 | 显示全部楼层
把createuser ssssjk改成
createuser ssssjk -hlocalhost -U<pg admin user>
注意把<pg admin user>替换成你的具有admin权限的用户名,-U后面不要跟空格
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-9-29 16:57:23 | 显示全部楼层
我把postgresql卸载后重装就正常了
估计还是安装系统是选择安装数据库服务器时系统有些东西没有自动安装上
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表