errror while installing DBD::MYSQL.





Hi Gurus,



I have installed DBI and when I run the following perl script;



------SCRIPT

use strict;

use warnings;

use DBI;

my $DSN="DBI:mysql:database=faculte;host=localhost;port=3306";

my $DB_OBJ=DBI->connect($DSN, "root", "sqlroot123");

#my @dr=DBI->installed_drivers;

#print "@dr\n";

my $sql="select * from fac_class";



$DB_OBJ->prepare($sql);

my $data=$DB_OBJ->execute($sql);

print "$data\n";



--SCRIPT.



I got the below error.

----------------------------------------------------------------------------
-----------------------------------------------------

install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC
contains:

C:/Perl/site/lib C:/Perl/lib .) at (eval 4) line 3.

Perhaps the DBD::mysql perl module hasn't been fully installed,

or perhaps the capitalisation of 'mysql' isn't right.

Available drivers: DBM, ExampleP, File, Gofer, Proxy, SQLite, Sponge.

at db_interac.pl line 7





so I downloaded perl DBD::MYSQL and tried installing the module with no
luck.



I used the following command to run the MAKEFile.pl on windows



perl makefile.pl --cflags=-IC:\"Program Files"\MySQL\MySQL Server
5.0\include



The above paths are correct.



I got the following error.



----------------------------------------------------------------------------
--------------------------------

Failed to determine directory of mysqlclient.lib. Use

perl Makefile.PL "--libs=-L<dir> -lmysqlclient -lz -lm -lcrypt -lnsl"

to set this directory. For details see the INSTALL.html file,

section "Linker flags" or type

perl Makefile.PL --help





I tried to run the mysql_config -cflags with no luck got the below error



'mysql_config' is not recognized as an internal or external command,

operable program or batch file.







Can anybody help me to resolve the abov problem.





GIF image



Relevant Pages

  • ANNOUNCE: UnixODBC 0.31
    ... UnixODBC provides a toolkit for writing Perl ODBC clients. ... - Installing and Configuring the Bridge Server ... UnixODBC.pm provides Perl programs with a subset of the X/Open ... Bridge Server," below. ...
    (comp.lang.perl.modules)
  • Re: Unix commands
    ... might have a problem or two with installing some CPAN modules as well. ... Skilled programmers are able to see the ... Then their problem already starts with using Perl on Windows (for ... Most external tools have switches that enable / disable features. ...
    (comp.lang.perl.misc)
  • Source Code Control and Naming ThingiePoo was Re: Starting Perl
    ... > I need to fix them). ... why not treat your 'perl code' like as if it were RealCode? ... Makefile.PL that will simplify installing the Perl Module in the ...
    (perl.beginners)
  • Re: Win32::TieRegistry problem
    ... Not only am I limited by the perl ... >> installing a CPAN module is not allowed by my client (meaning the ... >> writing is a script to verify the installation of Rational Clearcase ...
    (comp.lang.perl.modules)
  • Re: Broken Perl
    ... my ISP insisted that I backup up my data and they then ... I started installing all the perl modules that I needed (like DBI, ...
    (comp.lang.perl.modules)