in reply to DBI connection from one mechine to another mechine in perl

Did you read the documentation? The first three lines of the synopsis are:
use DBI; $dsn = "DBI:mysql:database=$database;host=$hostname;port=$port"; $dbh = DBI->connect($dsn, $user, $password);
Also, you don't include what the error message, if any, was in your sample.

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.