Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: How can i connect to database on remote server

by jbrugger (Parson)
on Nov 07, 2005 at 12:38 UTC ( [id://506313]=note: print w/replies, xml ) Need Help??


in reply to How can i connect to database on remote server

Remember you need the server where the database is running to accept remote connections (eg 3306 for mysql).
my $mysql_server = 192.168.1.100; my $mysql_user = "mysqlUser"; my $mysql_password = "mysqlPass"; my $mysql_db = "yourDatabase"; $DBH::conn = DBI->connect("DBI:mysql:$mysql_db;$mysql_server",$mysql_u +ser,$mysql_password,{ PrintError => 1, RaiseError => 0,) || die $DBI: +:errstr; return $DBH::conn;
"We all agree on the necessity of compromise. We just can't agree on when it's necessary to compromise." - Larry Wall.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://506313]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (9)
As of 2024-04-23 18:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found