【发布时间】:2010-11-27 05:18:55
【问题描述】:
当我尝试使用 DBI 连接时出现以下错误
DBI connect('database=chaosLRdb;host=192.168.0.1;port=5433','postgres',...) 失败:致命:主机“192.168.0.1”、用户“postgres”、数据库“chaosLRdb”、SSL 关闭没有 pg_hba.conf 条目这是我的 pg_hba.conf 文件:
# "local" is for Unix domain socket connections only
local all all md5
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 md5
host all postgres 127.0.0.1/32 trust
host all postgres 192.168.0.1/32 trust
host all all 192.168.0.1/32 trust
host all all 192.168.0.1/128 trust
host all all 192.168.0.1/32 md5
host chaosLRdb postgres 192.168.0.1/32 md5
local all all 192.168.0.1/32 trust
我的 perl 代码是
#!/usr/bin/perl-w
use DBI;
use FileHandle;
print "Start connecting to the DB...\n";
@ary = DBI->available_drivers(true);
%drivers = DBI->installed_drivers();
my $dbh = DBI->connect("DBI:PgPP:database=chaosLRdb;host=192.168.0.1;port=5433", "postgres", "chaos123");
我可以知道我在这里想念什么吗?
【问题讨论】:
标签: postgresql