- 论坛徽章:
- 0
|
from pyPgSQL import PgSQL
PgSQL.connect(host='jianguo',user='postgres',password='lzs643770',database='ShowRoom')
Traceback (most recent call last):
File "<pyshell#14>", line 1, in -toplevel-
PgSQL.connect(host='jianguo',user='postgres',password='lzs643770',database='ShowRoom',port='5432')
File "C:\Python24\Lib\site-packages\pyPgSQL\PgSQL.py", line 2355, in connect
return Connection(connInfo, client_encoding, unicode_results)
File "C:\Python24\Lib\site-packages\pyPgSQL\PgSQL.py", line 2510, in __init__
raise DatabaseError, m
DatabaseError: could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "jianguo" and accepting
TCP/IP connections on port 5432?
应该是连接上的,为什么说不行呢. |
|