Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Postgresql perl dbi connect

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hello everybody !

My bad problem is perl module of postgresql. I use this line:
$dbh=DBI->connect("dbi:pg:dbname=mydatabase;host=myhost;port=5432;myname;mypasswd";

and this NOT work, why. I must connect other machine than my own so ?

This work if i erase host,port, This line is every homepage of internet and all use this. Is there postgresql same configuration file where this must access or ...?
 
I'm not sure I understand your question, but it looks like you are trying to connect to PostgreSQL remotely, using hostname and port. PostgreSQL by default does not allow remote connections, only starting with an initial configuration for "localhost" connections. Edit the pg_hba.conf file to allow for connections from specific IP addresses, or even from anywhere if you want. -------------------------------------------

"Now, this might cause some discomfort..."
(
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top