我在服务器端的pg_hba.conf中添加了这一行:
host all all host_ip md5
但我仍然收到错误
DBI connect('database = databasename; host = server_host_ip','username',...)失败:致命:没有主机“host_ip”的pg_hba.conf条目,用户“username”,数据库“databasename”,SSL在/usr/local/share/perl/5.10.1/DBIx/DataStore.pm 1983年。左 [2012年8月24日星期五11:01:03] /usr/local/share/perl/5.10.1/DBIx/DataStore.pm,1029:验证与主数据库的连接失败!
死于/usr/local/share/perl/5.10.1/DBIx/DataStore.pm第1029行。
我错过了什么?
UPDATE
perl merge_infos.pl
DBI connect('database=diamas;host=67.23.10.243','dia',...) failed: FATAL: no pg_hba.conf entry for host "38.104.59.18", user "dia", database "diamas", SSL off at /usr/local/share/perl/5.10.1/DBIx/DataStore.pm line 1983.
pg_hba.conf(远程服务器)
host all all 38.104.59.18/32 trust
电话(本地机器)
(在脚本中)merge_infos.pl
use DBIx::DataStore ( config => 'yaml' );
my $olddb = DBIx::DataStore->new('www');
datastore.yml
www:
primary:
driver: Pg
database: diamas
user: dia
password: ***
host: 67.23.10.243
schemas:
- public
答案 0 :(得分:0)
我编辑了错误的pg_hba.conf文件