Hi,
When perl wants to connect to databases (any database) perl uses a database driver. 
This db driver is called DBI. Each DBI has an interface to each vendors database 
called the DBD modules. So depending on the kind of database you are planning to use, 
you will HAVE to install
 
 1) DBI
 2) DBD for MYSQL, ORACLE, etc.....
 
 depending on the OS you are using, you can go to cpan.org and search for the modules 
and download and install the DBI and DBD modules.
 
 Then you can use the code below to test your db connection with perl.
 Hope that helps.
 
 Radhika
> 
> 
> On Fri, 31 Oct 2003 11:06:47 -0800
> David O'Dell <[EMAIL PROTECTED]> wrote:
> 
> > First make sure you can connect to the database
> > #!/usr/local/bin/perl -w
> > 
> > use DBI;
> > $dbh = DBI->connect("DBI:mysql:database_name", "username", "password")
> > or die "failed to connect";
> > print $dbh;
> > 
> > 
> > 
> > 
> > On Fri, 2003-10-31 at 10:03, radhika sambamurti wrote:
> > 
> > > A good resource was 
> > >  perldoc DBD::mysql and perldoc DBI
> > > 
> > > 
> > > 
> > > On Thu, 30 Oct 2003 23:48:30 -0700
> > > Bryan Harris <[EMAIL PROTECTED]> wrote:
> > > 
> > > > 
> > > > 
> > > > I've been enjoying perl for almost 2 years now, and I think I'm ready to
> > > > step into interacting with a database.  (big step!)
> > > > 
> > > > I have mysql, and I have some simple tables.  Now I want to be able to
> > > > access those tables from perl.  Can anyone offer a simple tutorial on how to
> > > > do this?
> > > > 
> > > > Thanks!!!
> > > > 
> > > > - Bryan
> > > > 
> > > > 
> > > > -- 
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > 
> > 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to