in reply to Lost over DBI in perl

The error you pasted is caused by the 2nd connect statement (the one using ODBC). It would appear the first one (using dbi:mysql) just works.
Have you checked if $dbh is undef after the first DBI->connect call?

Edit: My bad. The first call was commented :P
The error you're getting now (Datasource not found) is because ODBC requires you to register database-connections with the system.
The connectionstring for ODBC is this:

$dbh = DBI->connect("dbi:ODBC:$DSN", $username, $password, $hr_options +) or die $DBI::errstr;
$DSN is the name of the datasource you registered with the system. Under *nix, this is /etc/odbc.ini. I have no idea what file is used in lion.

Replies are listed 'Best First'.
Re^2: Lost over DBI in perl
by sdyates (Scribe) on Aug 22, 2011 at 20:42 UTC
    Thanks for the several error you all pointed out. Many of those were made trying to figure out what was networking. The real cause was that the DBD::mysql was not installing properly. Thanks all!