Andy | 15 Nov 2010 19:01
Picon
Picon
Favicon

DBD::MySQL

I have installed DBD:MySQL 4.0.18 on Perl 5.10, Mac OS X 10.6.

Any ideas about what I might have done wrong? About what I need to do to
fix it?
The following test script produces the errors shown below:
#!/usr/bin/perl -w
use strict;
use warnings;

use DBI;
use DBD::MySQL;

my $GCdbSchemaName = "gfrm";
my $GCdbUn         = "gfrm";
my $GCdbPw         = "gfrm";

my $dbHandle = DBI->connect("DBI:mysql:database=$GCdbSchemaName", $GCdbUn,
$GCdbPw);
exit;

Errors:
====
Thomas:gfrm gnicastro$ perl -w testDBIandDBD.pl
Subroutine driver redefined at
/Library/Perl/5.10.0/darwin-thread-multi-2level/DBD/mysql.pm line 21.
Subroutine CLONE redefined at
/Library/Perl/5.10.0/darwin-thread-multi-2level/DBD/mysql.pm line 38.
Subroutine _OdbcParse redefined at
/Library/Perl/5.10.0/darwin-thread-multi-2level/DBD/mysql.pm line 42.
Subroutine _OdbcParseHost redefined at
(Continue reading)

Dave Howorth | 16 Nov 2010 11:33
Picon
Picon

Re: DBD::MySQL

Andy wrote:
> I have installed DBD:MySQL 4.0.18 on Perl 5.10, Mac OS X 10.6.
> 
> Any ideas about what I might have done wrong? About what I need to do to
> fix it?
> The following test script produces the errors shown below:
> #!/usr/bin/perl -w
> use strict;
> use warnings;
> 
> use DBI;
> use DBD::MySQL;
> 
> my $GCdbSchemaName = "gfrm";
> my $GCdbUn         = "gfrm";
> my $GCdbPw         = "gfrm";
> 
> my $dbHandle = DBI->connect("DBI:mysql:database=$GCdbSchemaName", $GCdbUn,
> $GCdbPw);
> exit;

Well on my machine that code says "Can't locate DBD/MySQL.pm". It says
that because the module is actually called DBD::mysql.

So I doubt you have shown us the actual code you ran. Or do you have
some other module?

And you don't need to use DBD::mysql because DBI will do that.

Cheers, Dave
(Continue reading)

Peter Pentchev | 16 Nov 2010 11:41
Gravatar

Re: DBD::MySQL

On Tue, Nov 16, 2010 at 10:33:47AM +0000, Dave Howorth wrote:
> Andy wrote:
> > I have installed DBD:MySQL 4.0.18 on Perl 5.10, Mac OS X 10.6.
> > 
> > Any ideas about what I might have done wrong? About what I need to do to
> > fix it?
> > The following test script produces the errors shown below:
> > #!/usr/bin/perl -w
> > use strict;
> > use warnings;
> > 
> > use DBI;
> > use DBD::MySQL;
> > 
> > my $GCdbSchemaName = "gfrm";
> > my $GCdbUn         = "gfrm";
> > my $GCdbPw         = "gfrm";
> > 
> > my $dbHandle = DBI->connect("DBI:mysql:database=$GCdbSchemaName", $GCdbUn,
> > $GCdbPw);
> > exit;
> 
> Well on my machine that code says "Can't locate DBD/MySQL.pm". It says
> that because the module is actually called DBD::mysql.
[snip]

...unless he's using it on a case-insensitive filesystem.

G'luck,
Peter
(Continue reading)

Peter Pentchev | 16 Nov 2010 11:45
Gravatar

Re: DBD::MySQL

On Tue, Nov 16, 2010 at 12:41:20PM +0200, Peter Pentchev wrote:
> On Tue, Nov 16, 2010 at 10:33:47AM +0000, Dave Howorth wrote:
> > Andy wrote:
> > > I have installed DBD:MySQL 4.0.18 on Perl 5.10, Mac OS X 10.6.
> > > 
> > > Any ideas about what I might have done wrong? About what I need to do to
> > > fix it?
> > > The following test script produces the errors shown below:
> > > #!/usr/bin/perl -w
> > > use strict;
> > > use warnings;
> > > 
> > > use DBI;
> > > use DBD::MySQL;
> > > 
> > > my $GCdbSchemaName = "gfrm";
> > > my $GCdbUn         = "gfrm";
> > > my $GCdbPw         = "gfrm";
> > > 
> > > my $dbHandle = DBI->connect("DBI:mysql:database=$GCdbSchemaName", $GCdbUn,
> > > $GCdbPw);
> > > exit;
> > 
> > Well on my machine that code says "Can't locate DBD/MySQL.pm". It says
> > that because the module is actually called DBD::mysql.
> [snip]
> 
> ...unless he's using it on a case-insensitive filesystem.

Okay, that was a bit poorly-phrased :)  Even if the original poster is
(Continue reading)


Gmane