查一下postmaster的帮助 启动postgresql server的时候简单加上-i参数就可以了bash-2.05b# postmaster --help postmaster is the PostgreSQL server.Usage: postmaster [OPTION]...Options: -B NBUFFERS number of shared buffers -c NAME=VALUE set run-time parameter -d 1-5 debugging level -D DATADIR database directory -F turn fsync off -h HOSTNAME host name or IP address to listen on +++++++++++++++++++++++++++++++++++++++++++++++ -i enable TCP/IP connections + +++++++++++++++++++++++++++++++++++++++++++++++ -k DIRECTORY Unix-domain socket location -l enable SSL connections -N MAX-CONNECT maximum number of allowed connections -o OPTIONS pass "OPTIONS" to each server process -p PORT port number to listen on -S silent mode (start in background without l ogging output) --help show this help, then exit --version output version information, then exitDeveloper options: -n do not reinitialize shared memory after ab normal exit -s send SIGSTOP to all backend servers if one dies
输入了下面的命令: postmaster -D "data" -h 202.61.11.116 -p 5432 -i出现的错误信息是; Warning: pg_connect(): Unable to connect to PostgreSQL server: could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "202.61.11.116" and accepting TCP/IP connections on port 5432? in C:\apache\Apache2\htdocs\test\test.php on line 10我已经在pg_hba.conf里添加: host all all 202.61.11.116 255.0.0.0 trust 请大家帮我解决一下
postmaster is the PostgreSQL server.Usage:
postmaster [OPTION]...Options:
-B NBUFFERS number of shared buffers
-c NAME=VALUE set run-time parameter
-d 1-5 debugging level
-D DATADIR database directory
-F turn fsync off
-h HOSTNAME host name or IP address to listen on
+++++++++++++++++++++++++++++++++++++++++++++++
-i enable TCP/IP connections +
+++++++++++++++++++++++++++++++++++++++++++++++
-k DIRECTORY Unix-domain socket location
-l enable SSL connections
-N MAX-CONNECT maximum number of allowed connections
-o OPTIONS pass "OPTIONS" to each server process
-p PORT port number to listen on
-S silent mode (start in background without l
ogging output)
--help show this help, then exit
--version output version information, then exitDeveloper options:
-n do not reinitialize shared memory after ab
normal exit
-s send SIGSTOP to all backend servers if one
dies
postmaster -D "data" -h 202.61.11.116 -p 5432 -i出现的错误信息是;
Warning: pg_connect(): Unable to connect to PostgreSQL server: could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "202.61.11.116" and accepting TCP/IP connections on port 5432? in C:\apache\Apache2\htdocs\test\test.php on line 10我已经在pg_hba.conf里添加:
host all all 202.61.11.116 255.0.0.0 trust
请大家帮我解决一下
postmaster -i -D "数据库目录" & 启动数据库,不知道你用什么开发的项目,象tomcat做WEB服务器的一般多用连接池连接数据库的,配置一下就可以了,C语言的用PQsetdb()之类的函数就可以连接。