List:General Discussion« Previous MessageNext Message »
From:O'K Web Design Date:January 14 2005 12:51pm
Subject:Re: MySQL & Perl
View as plain text  
Hi Gerald

     Looks like you need a username Jerry not gjw, here is the format I use
to connect.  Mike

$dsn = "DBI:mysql:host=$host_name;database=$db_name"
return (DBI->connect ($dsn, $username,$password,
       {PrintError => 0, RaiseError => 1}));

----- Original Message -----
From: "Gerald Preston" <jwp@stripped>
To: <mysql@stripped>
Sent: January 14, 2005 3:55 AM
Subject: MySQL & Perl


> 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
>
>


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


No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.6.10 - Release Date: 2005-01-10



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.6.10 - Release Date: 2005-01-10

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