【发布时间】:2010-09-27 21:09:53
【问题描述】:
我相信我已经正确设置了 Pg,但我的脚本似乎没有连接到数据库。我正在测试:
$database="networkem"; $user="postgres"; $密码=""; $host="本地主机"; $dbh = DBI->connect("DBI:Pg:dbname=$dbname;host=$host", $user, $password);我的 pg_hba 读取:
托管所有 postgres 127.0.0.1 255.255.255.255 信任我可以通过命令行很好地使用psql,并且已经使用 -i 选项启动了 postmaster。我错过了什么?
我还尝试了另一个通过 psql 正常工作的用户:
$user="jimbo"; $password="p2ssw0rd";使用 pg_hba 读取:
托管所有 jimbo 127.0.0.1 255.255.255.255 信任【问题讨论】:
标签: perl postgresql tcp dbi