Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

DBI Help

by kjedwards (Initiate)
on Aug 05, 2001 at 00:06 UTC ( [id://102264]=perlquestion: print w/replies, xml ) Need Help??

kjedwards has asked for the wisdom of the Perl Monks concerning the following question:

Hi

many thanks to all who replied to my question about Perl IDE/Editors - much appreciated.

I have another question (sorry but I very new to this)

I have downloaded and installed Apache and Active Perl 5.6 and have them running ok under Win 2000 (much to my surprise and relief)

I want to be able to access a MySQL database.

When I tried use DBI; I get an error saying 'cannot find DBI.pm'. So I assume that the DBI doesn't come as part of the standard Active Perl installation

So my limited understanding tells me that I need the Perl DBI Module for MySQL installing.

Questions -

Where do I find the MySQL DBI Module for Win 2000 (tried Active State and CPAN but can only find a tar - whatever that is!!!)

Assuming one can find the MySQL DBI Module for Win 2000, how does one install it so it runs correctly on Apache/Win 2000?

Sorry if this is a silly question but I really need db access otherwise it is back to PHP

Many Thanks

Kevin

Edit kudra, 2001-08-06 Replaced CODE tag with some paragraph formatting

Replies are listed 'Best First'.
Re: DBI Help
by tachyon (Chancellor) on Aug 05, 2001 at 00:31 UTC

    OK. Use Internet Explorer to browse your way to (probably) c:\perl\html\index.html to find all the documentation from Active State that came with Perl. Have a look at PPM. This is the Perl Package Manager that will allow you to easily install DBI and the DBD driver for MySQL. Here is how to install DBI and DBD::Mysql using PPM.

    Connect to internet. Get a DOS prompt Type "PPM install DBI" Hit enter Wait Type "PPM install DBD::Mysql" Hit enter Wait some more You are Done!

    You can run PPM interactively too, just type PPM at the DOS prompt and then "help" for a list of commands. You can see all the packages available (precomiled binaries ready to rock) here http://www.activestate.com/PPMPackages/5.6/ For full details see the docs.

    The tar.gz format is a Tape ARchived GZipped format used commonly on Unix but can be unzipped by something like WinZip. When you unzip a tar.gz file it expands the files into a directory structure. You can then use the CPAN module which is part of the standard distro to install the module. PPM is easier. See Active State Perl docs or Super Search here for "installing Modules", "Module installation", "Modules and Win32".... for more details.

    cheers

    tachyon

    s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

      Absolutely BRILLIANT!!!! Going to the command prompt and typing 'PPM install DBI' 'PPM install DBD::Mysql' Seemed to work great!! I tested by connecting to a local mySQL database Seems to work ok. Many thanks Kevin
Re: DBI Help
by runrig (Abbot) on Aug 05, 2001 at 00:20 UTC
    You can find lots of useful modules like DBI and DBD::mysql (which is the driver you'll need to work with DBI) by searching on CPAN.

    Update: There I go again, not reading the whole thing, you found CPAN. I forget, does Winzip untar things? If not, you can get Unix utilities from cygwin. But I think those modules need to be compiled, so getting them from ActiveState is your best bet. Activestate does have DBI, I'm not sure about DBD::mysql. Search their site some more for their ppm files.

      <RANT>

      Sure, ActiveState has DBD::Mysql but, to my great frustration, they don't have DBD::Pg.

      <\RANT>

      adamsj

      They laughed at Joan of Arc, but she went right ahead and built it. --Gracie Allen

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://102264]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2025-03-21 07:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When you first encountered Perl, which feature amazed you the most?










    Results (63 votes). Check out past polls.