UPDATE: DBD::mysql will not install on mac or windows... this is my problem. Anyone have instructions on how to set up DBD::myssql on a mac (lion)? Folks, its been over 6 years since I coded perl and am having trouble with something so simple but cannot recall what I need to do a would appreciate someone to point me in the right direction. Please use simple terms too as my technical vocal has suffered :P
DBI connect('d60380940:192.168.1.3','HASH(0x238b3c)',...) failed: [Mic +rosoft][ODBC Driver Manager] Data source name not found and no defaul +t driver specified (SQL-IM002) at CRTDBTBL.pl line 46 Cannot connect to the database ERROR: 1 ([Microsoft][ODBC Driver Manager] Data source name not foun +d and no d efault driver specified (SQL-IM002))
I have the DB installed on windows, using 5.12. The password and users name I am using is root and the db and ip are correct - I use the same info on a mac client to connect to the db no problem (mac app, not command line). I am not even sure what data source name means. Sorry for the bad post, but I need to get something accomplished tonight and have already spent hours online trying to solve it. Thanks for your time, S
sub open_dbi { # Declare and initialize variables my $host = '192.168.1.3'; my $db = d60380940; my $db_user = root; my $db_password = root; # Connect to the requested server # my $dbh = DBI->connect("dbi:mysql:$db:$host", "$db_user", "$db_pa +ssword", {RaiseError => 0, PrintError => 0} ) or err_trap("Cannot con +nect to the database"); my $dbh = DBI->connect("dbi:ODBC:d60380940:192.168.1.3", {RaiseErr +or => 0, PrintError => 0} ) or err_trap("Cannot connect to the databa +se"); return $dbh; }

In reply to Lost over DBI in perl by sdyates

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.