Re: DBD::MySQL
Dave Howorth <[email protected]> Tue, 16 Nov 2010 10:33:47 +0000
| Newsgroups | gmane.comp.db.mysql.perl |
|---|---|
| Organization | MRC Centre for Protein Engineering |
| Message-ID | <[email protected]> |
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
PS You don't need -w on the shebang line and on the command line and use
warnings as well! perl will get the hint with just one of them :)
--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/[email protected]