Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

perl module DBI:mysql installation issues

by Anonymous Monk
on Jul 07, 2008 at 11:06 UTC ( [id://695948]=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi perl greats,
When i try to connect the mysql database, i am getting the error message:
install_driver(mysql) failed: Can't locate loadable object for module +DBD::mysql in @INC (@INC contains: C:/Perl/site/lib C:/Perl/lib .) at + (eval 4) line 3 Compilation failed in require at (eval 4) line 3. Perhaps a module that DBD::mysql requires hasn't been fully installed
Could anyone tell me what are all the possiblities for this error? I tried the following to install the perl module. My operating system is Windows.
ppm install DBI::mysql
when i run the above command it is telling me as no missing packages to install. The code is:
use strict; use warnings; use DBI; my $dbname="test_development"; my $dbh=DBI->connect("DBI:mysql:$dbname","root") || die("connection fa +ilure"); my $sth=$dbh->prepare("select * from tables"); $sth->execute(); while(my @row=$sth->fetchrow_array()){ print "id".$row[0]; print "name".$row[1]; print "age".$row[2]; }
How should i proceed with the above issue? any thoughts or ideas will be of much helpful in this juncture.

Replies are listed 'Best First'.
Re: perl module DBI:mysql installation issues
by moritz (Cardinal) on Jul 07, 2008 at 11:08 UTC
    You need to install DBD::mysql, not DBI::mysql. The latter doesn't exist.

    Update: looks like a broken module installation. What's the output of perl -MDBD::mysql -e1 ? How did you install DBD::mysql in the first place?

      Hi,

      I installed DBD:mysql only not DBI:mysql. sorry it's typographic error.
      Hi,

      Thanks for your reply. I tried the following and getting the error messages.
      c:\>ppm remove DBD::mysql ppm remove failed: 'ppm remove DBD-mysql-informationschema' will unist +all package providing DBD::mysql c:\>ppm install DBD::mysql No missing packages to install c:\>perl -MDBD::mysql -el can't locate loadable object for module DBD::mysql in @INC<@INC contai +ns: c:/perl/site/lib c:/perl/lib.) at -e line 0 compilation failed in require. BEGIN failed compilation aborted .
      Could you please help me out to solve the above issue.

      Thanks
Re: perl module DBI:mysql installation issues
by syphilis (Archbishop) on Jul 07, 2008 at 12:42 UTC
    As moritz has noted, it's probably a botched install. First of all remove your existing DBD::mysql installation. (Running ppm remove DBD::mysql might achieve that.)
    Then, once you've got rid of that botched installation, try running ppm install DBD::mysql again.

    Cheers,
    Rob

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://695948]
Approved by moritz
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (3)
As of 2024-04-19 22:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found