http://www.perlmonks.org?node_id=1073037


in reply to connect to DBD::MYSQL

Think you are missing the port 3306.

my $port1='3306'; my $host1="localhost"; my $service1="test2"; my $userid1="xxx"; my $passwd1="yyy"; my $connectionInfo1="DBI:mysql:database=$service1:host=$host1:$port1";