One thing you didn't mention is rebuilding DBI - try rebuilding DBI and
*then* rebuilding DBD::mysql.  I prefer using CPAN, as I think you
said as well:

  CPAN> install Bundle::DBI
  CPAN> install DBD::mysql

It's been a while since I installed DBD::mysql, but I think(?) that
will work for DBD::mysql.

HTH.

-- 
Hardy Merrill
Mission Critical Linux, Inc.
http://www.missioncriticallinux.com

Stefan Antonowicz [[EMAIL PROTECTED]] wrote:
> Thanks, Ilya.  I tried doing a direct call rather than a data substitution,
> as you suggested, but no luck.  To be more precise, I converted
> ****
> my $db = '*****';
> my $host = 'localhost';
> my $id = '*****';
> my $pwd= '*****';
> 
> my $dbh = DBI->connect("DBI:mysql:$db:$host",$id,$pwd);
> *****
> 
> to
> 
> ****
> 
> my $dbh =
> DBI->connect("DBI:mysql:database=*****;host=localhost","*****","*****");
> 
> *****
> as you suggested (btw, in case it isn't clear, I am substituting the correct
> database, userid, and password for '*****', where appropriate).
> 
> I still get the same error message, unfortunately.  Any other ideas?
> 
> Thanks!
> 
> Stefan
> 
> 
> 
> 
> -----Original Message-----
> From: Sterin, Ilya [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 25, 2001 1:54 PM
> To: 'Stefan Antonowicz '; '[EMAIL PROTECTED] '
> Subject: RE: Problems running DBD::mysql
> 
> 
> Look at perldoc DBD::Mysql and see the proper way of connecting using host,
> database name, etc...  It's wrong in the script and don't think it ever
> worked.  You must specify "dbi::mysql:host=...;database=...", .....)
> 
> Ilya
> 
> -----Original Message-----
> From: Stefan Antonowicz
> To: [EMAIL PROTECTED]
> Sent: 06/25/2001 10:33 AM
> Subject: Problems running DBD::mysql
> 
> Hello All.
> 
> I've searched hi and low, and have come up with nada that can help me.
> I'm
> hoping someone out there might have an idea of what's wrong.
> 
> I inherited a RH 7 box running Perl 5, specifically a Perl script that
> is
> going to query a MySQL database and email users with updates.  I parsed
> the
> page down to the basic DBI function, so it looks like this:
> 
> ******
> #!/usr/bin/perl -w
> 
> use DBI;
> use strict;
> 
> my $db = '*****';
> my $host = 'localhost';
> my $id = '*****';
> my $pwd= '*****';
> 
> my $dbh = DBI->connect("DBI:mysql:$db:$host",$id,$pwd);
> 
> if(!defined $dbh) {
>     die "Can't connect: $DBI::errstr \n";
> }
> 
> print "Connected!!\n";
> 
> ******
> 
> I get this error message:
> ******
> DBD::mysql initialisation failed: Can't locate object method "driver"
> via
> package "DBD::mysql"  /usr/lib/perl5/site_perl/5.6.0/i386-linux/DBI.pm
> line
> 526.
> 
> Perhaps the capitalisation of DBD 'mysql' isn't right. at ./dbitest.pl
> line
> 11
> *****
> 
> 
> This is pissing me off to no end, because when I run:
> perl -MDBI -e 'print join("\n",DBI->available_drivers) . "\n";'
> 
> it kicks back this list:
> ADO
> ExampleP
> Multiplex
> Proxy
> mysql
> 
> So the driver is there, but it won't run!  I've tried changing the
> capitalisation of mysql all different ways, remade and reinstalled the
> Makefile.PL under Msql-Mysql-modules-1.2216 a bunch o' times, and tried
> running Bundle::DBI::mysql a handful of times, all with no luck.
> 
> Anyone have any ideas what the problem might be?
> 
> Thanks in advance!
> 
> ######
> Stefan Antonowicz
> [EMAIL PROTECTED]

Reply via email to