List:General Discussion« Previous MessageNext Message »
From:Peter Brawley Date:January 14 2005 2:06pm
Subject:Re: MySQL & Perl
View as plain text  
Gerald,

Your connect string needs to be DBI:mysql:<dbname>:<hostvar>.

PB

-----


Gerald Preston wrote:

>I am trying to get Perl to talk to MySQL that I have setup.  According to
>"WinMySQLAdmin1.4"
>
> 
>
>Local Host Name = GJW
>
> 
>
>Local User name = Jerry
>
> 
>
>Databases:
>
> 
>
>GJW
>
>   Club
>
>      bar
>
>   mysql
>
>   test
>
> 
>
>I am using the following code:
>
> 
>
>#!/perl
>
>use warnings;
>
>use strict;
>
>use DBI;
>
> 
>
>  my $dbh=DBI->connect( 'DBI:mysql:GJW:club:bar', 'gjw', 'password' ) or die
>"Cannot connect -> gjw!!<br>$DBI::errstr";
>
> 
>
>What am I missing?
>
> 
>
>Thanks,
>
> 
>
>Jerry
>
>
>  
>

Thread
MySQL & PerlGerald Preston14 Jan
  • Re: MySQL & PerlO'K Web Design14 Jan
  • Re: MySQL & PerlPeter Brawley14 Jan
  • RE: MySQL & PerlGerald Preston22 Jan
    • RE: MySQL & PerlPaul DuBois23 Jan