Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DBI installation problem with Mysql 5

Status
Not open for further replies.

yourkeylady

Programmer
Jan 8, 2004
63
US
I've installed mysql and have a simple script to test the connection. It won't connect. So I reinstalled DBI. It complains of an error that I don't understand. Do I need to set an environment variable? I have XP and I don't know how to do that.

C:\Program Files\Apache Group\Apache2\cgi-bin>perl dbi.pl
eval{
$pkg::dbh = DBI->connect("dbi:mysql:test_db", $user,$pass, { RaiseError => 1, AutoCommit => 0 });
};
if($@){ print qq~Mysql failed , $@<BR><BR>~;}

Mysql failed , 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, Proxy, SQLite, Sponge.
at dbi.pl line 15
# reinstall try for DBI
C:\Program Files\Apache Group\Apache2\cgi-bin>cpan
Terminal does not support AddHistory.

cpan shell -- CPAN exploration and modules installation (v1.7602)
ReadLine support available (try 'install Bundle::CPAN')
cpan> install DBI
Running install for module DBI
Running make for T/TI/TIMB/DBI-1.53.tar.gz
CPAN: LWP::UserAgent loaded ok
Fetching with LWP:
[ppm.activestate.com]
CPAN: Digest::MD5 loaded ok
Fetching with LWP:
[ppm.activestate.com]
Checksum for C:\Perl\cpan\sources\authors\id\T\TI\TIMB\DBI-1.53.tar.gz ok
Scanning cache C:\Perl/cpan/build for sizes
CPAN: Archive::Tar loaded ok
DBI-1.53/
DBI-1.53/Changes
DBI-1.53/dbd_xsh.h
DBI-1.53/DBI.pm
DBI-1.53/DBI.xs
DBI-1.53/dbi_sql.h
DBI-1.53/dbipport.h
DBI-1.53/dbiprof.PL
DBI-1.53/dbiproxy.PL
DBI-1.53/dbivport.h
DBI-1.53/DBIXS.h
DBI-1.53/Driver.xst
DBI-1.53/Driver_xst.h
DBI-1.53/ex/
DBI-1.53/ex/perl_dbi_nulls_test.pl
DBI-1.53/ex/profile.pl
DBI-1.53/lib/
DBI-1.53/lib/Bundle/
DBI-1.53/lib/Bundle/DBI.pm
DBI-1.53/lib/DBD/
DBI-1.53/lib/DBD/DBM.pm
DBI-1.53/lib/DBD/ExampleP.pm
DBI-1.53/lib/DBD/File.pm
DBI-1.53/lib/DBD/NullP.pm
DBI-1.53/lib/DBD/Proxy.pm
DBI-1.53/lib/DBD/Sponge.pm
DBI-1.53/lib/DBI/
DBI-1.53/lib/DBI/Const/
DBI-1.53/lib/DBI/Const/GetInfo/
DBI-1.53/lib/DBI/Const/GetInfo/ANSI.pm
DBI-1.53/lib/DBI/Const/GetInfo/ODBC.pm
DBI-1.53/lib/DBI/Const/GetInfoReturn.pm
DBI-1.53/lib/DBI/Const/GetInfoType.pm
DBI-1.53/lib/DBI/DBD/
DBI-1.53/lib/DBI/DBD/Metadata.pm
DBI-1.53/lib/DBI/DBD.pm
DBI-1.53/lib/DBI/FAQ.pm
DBI-1.53/lib/DBI/Profile.pm
DBI-1.53/lib/DBI/ProfileData.pm
DBI-1.53/lib/DBI/ProfileDumper/
DBI-1.53/lib/DBI/ProfileDumper/Apache.pm
DBI-1.53/lib/DBI/ProfileDumper.pm
DBI-1.53/lib/DBI/ProfileSubs.pm
DBI-1.53/lib/DBI/ProxyServer.pm
DBI-1.53/lib/DBI/PurePerl.pm
DBI-1.53/lib/DBI/SQL/
DBI-1.53/lib/DBI/SQL/Nano.pm
DBI-1.53/lib/DBI/W32ODBC.pm
DBI-1.53/lib/Win32/
DBI-1.53/lib/Win32/DBIODBC.pm
DBI-1.53/Makefile.PL
DBI-1.53/MANIFEST
DBI-1.53/META.yml
DBI-1.53/Perl.xs
DBI-1.53/README
DBI-1.53/Roadmap.pod
DBI-1.53/t/
DBI-1.53/t/01basics.t
DBI-1.53/t/02dbidrv.t
DBI-1.53/t/03handle.t
DBI-1.53/t/04mods.t
DBI-1.53/t/05thrclone.t
DBI-1.53/t/06attrs.t
DBI-1.53/t/07kids.t
DBI-1.53/t/08keeperr.t
DBI-1.53/t/09trace.t
DBI-1.53/t/10examp.t
DBI-1.53/t/11fetch.t
DBI-1.53/t/14utf8.t
DBI-1.53/t/15array.t
DBI-1.53/t/20meta.t
DBI-1.53/t/30subclass.t
DBI-1.53/t/40profile.t
DBI-1.53/t/41prof_dump.t
DBI-1.53/t/42prof_data.t
DBI-1.53/t/43prof_env.t
DBI-1.53/t/50dbm.t
DBI-1.53/t/60preparse.t
DBI-1.53/t/70callbacks.t
DBI-1.53/t/72childhandles.t
DBI-1.53/t/80proxy.t
DBI-1.53/t/pod.t
DBI-1.53/TASKS.pod
DBI-1.53/test.pl
DBI-1.53/TODO_2005.txt
DBI-1.53/typemap

CPAN.pm: Going to build T/TI/TIMB/DBI-1.53.tar.gz


*** You are using a perl configured with threading enabled.
*** You should be aware that using multiple threads is
*** not recommended for production environments.

*** Note:
The optional PlRPC-modules (RPC::plServer etc) are not installed.
If you want to use the DBD::proxy driver and DBI::proxyServer
modules, then you'll need to install the RPC::plServer, RPC::plClient,
Storable and Net::Daemon modules. The CPAN Bundle::DBI may help you.
You can install them any time after installing the DBI.
You do *not* need these modules for typical DBI usage.

Optional modules are available from any CPAN mirror, in particular
[search.cpan.org]
[www.perl.com]
[www.perl.org]
[ftp.funet.fi]

*** You're using Microsoft Visual C++ compiler or similar but
the LIB and INCLUDE environment variables are not both set.

You need to run the VCVARS32.BAT batch file that was supplied
with the compiler before you can use it.

A copy of vcvars32.bat can typically be found in the following
directories under your Visual Studio install directory:
Visual C++ 6.0: vc98\bin
Visual Studio .NET: vc7\bin

Find it, run it, then retry this.

If you think this error is not correct then just set the LIB and
INCLUDE environment variables to some value to disable the check.
Running make test
Make had some problems, maybe interrupted? Won't test
Running make install
Make had some problems, maybe interrupted? Won't install

cpan> exit
Terminal does not support GetHistory.
Lockfile removed.

C:\Program Files\Apache Group\Apache2\cgi-bin>perl -v

This is perl, v5.8.8 built for MSWin32-x86-multi-thread
(with 31 registered patches, see perl -V for more detail)

Copyright 1987-2006, Larry Wall

Binary build 817.91 [265828] provided by ActiveState [www.ActiveState.com]
Built Jul 17 2006 14:54:14

_________________________

I searched for the bat file but no results



Thanks
Tricia
 
Mysql failed , install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC contains: /home/synop1/ /home/synoptic/ C:/Program Files/Apache Group/Apache2/cgi-bin/bulgar/cron_requires C:/Perl/site/lib C:/Perl/lib .) at (eval 13) 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, Oracle, Proxy, SQLite, Sponge. at C:/Program Files/Apache Group/Apache2/cgi-bin/bulgar//dbi.pl line 22

This is the error shown by DBI module

Thanks
Tricia
 
Right, the problem was I posted the wrong traces. Was in a hurry. Sorry. I meant to post the trace where the DBD::mysql installation failed.

I searched the web for info and found a post where another person had the same problem with cpan. And the ppm interface was suggested. So did that, and the install went fine. Plus it has a nice interface instead of the prompt.



Thanks
Tricia
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top