I have a script that has worked for years, but now it's throwing an error, pointing to the line that attempts to connect to my database.
line 3: use DBI; ... line 20: my $dbh = DBI->connect('DBI:mysql:database_name1;host=localho +st;port=3306', 'username', 'password') or die "Couldn't open database: $DBI::errstr; stopped"; line 22: my $dbh2 = DBI->connect('DBI:mysql:database_name2;host=localh +ost;port=3306', 'username', 'password') or die "Couldn't open database: $DBI::errstr; stopped";

the error message is as follows:

install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC contains: /home/domainname/public_html/cgi-bin/ //perl5/lib/perl +5 //perl5/lib/perl5/x86_64-linux-thread-multi //perl/usr/local/lib64/per +l5 //perl/usr/local/share/perl5 //perl/usr/lib64/perl5/vendor_perl //perl/usr/share/perl5/vendor_perl //perl/usr/lib64/perl5 //perl/usr/share/perl5 /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/p +erl5 /usr/share/perl5 .) at (eval 18) line 3. Perhaps the DBD::mysql perl module hasn't been fully installed, or perhaps the capitalisation of 'mysql' isn't right. Available drivers: DBM, ExampleP, File, Gofer, Mem, Proxy, SQLite, Spo +nge. at /home/domainname/public_html/cgi-bin/events_db_embed.pl line 20.

should I replace DBI with one of the following? DBM, ExampleP, File, Gofer, Mem, Proxy, SQLite, Sponge.

just as an addendum, I search for DBI as an available module, and it's not listed on my host


In reply to replacement for DBI? by jck

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.