in reply to mysql.pm not found

Are you using DBD::Mysql directly? In that case, you probably mistyped - you wanted to say use Mysql; whereas it appears you said use mysql;.

If this is the case, consider switching to using DBI in conjuction with DBD::Mysql.

If this is not the case, could you post the relevant portion of your script, so we can have a better look at the problem.

CU
Robartes-

Replies are listed 'Best First'.
Re: Re: mysql
by Anonymous Monk on Apr 10, 2003 at 07:47 UTC
    here is the code
    #!/usr/bin/perl -w use Mysql; $Host = "Localhost"; $Database = "test"; $User = "user"; $Passwd = ""; $dbh = Mysql->connect($Host, $Database, $User, $Passwd); $sql_statement = "select * from TEST"; $sth = $dbh->query($sql_statement); if (!defined $sth) { warn($dbh->errmsg); } while ( @row = $sth->fetchrow_array ) { print "$row[0]\t$row[1]\n"; } exit 0;
      Ah, in that case you probably do not have the module installed. Try installing it with CPAN.pm:
      $ perl -MCPAN -e 'install Bundle::DBD::mysql'
      If that works (if it's the first time you use CPAN.pm, you will have to answer some configuration questions), you should be set to go. But, as said, do consider switching to DBI (which is installed with the bundle).

      CU
      Robartes-