1、
[root@ec-server root]# /etc/rc.d/init.d/postgresql start
Starting postgresql service: [ 确定 ]
[root@ec-server root]#
2、
[root@ec-server root]# su postgres
bash-2.05b$ psql -U cowboy -d test
欢迎来到 psql, PostgreSQL 的交互终端.键入: \copyright 获取发布信息
\h 获取 SQL 命令的帮助
\? 获取内部反斜扛命令的帮助
\g 或者以分号结尾执行查询
\q 退出test=>
[root@ec-server root]# /etc/rc.d/init.d/postgresql start
Starting postgresql service: [ 确定 ]
[root@ec-server root]#
2、
[root@ec-server root]# su postgres
bash-2.05b$ psql -U cowboy -d test
欢迎来到 psql, PostgreSQL 的交互终端.键入: \copyright 获取发布信息
\h 获取 SQL 命令的帮助
\? 获取内部反斜扛命令的帮助
\g 或者以分号结尾执行查询
\q 退出test=>
你这样做吧:
[root@ec-server root]# su postgres
bash-2.05b$ createuser notwin
Shall the new user be allowed to create databases? (y/n) y
Shall the new user be allowed to create more new users? (y/n) n
CREATE USER
bash-2.05b$ createdb notwin
CREATE DATABASE
bash-2.05b$ psql -U notwin -d notwin
欢迎来到 psql, PostgreSQL 的交互终端.键入: \copyright 获取发布信息
\h 获取 SQL 命令的帮助
\? 获取内部反斜扛命令的帮助
\g 或者以分号结尾执行查询
\q 退出notwin=>
--------------------------------------
Chen Zizhao
NEHC at TOM dot COM
psql:无法联接到服务器:No such file or directory
服务器是否在本地运行并且在Unix域套接字
“/tmp/.s.PGSQL.5432"上准备接受联接?
谢谢了