List:General Discussion« Previous MessageNext Message »
From:Gerald Preston Date:January 22 2005 9:28pm
Subject:RE: MySQL & Perl
View as plain text  
Hi!

I am totally lost here and I know this is a no brinier.  I do not know what
I am doing wrong:

I can access from the command line by "mysql -u gjw -p" then "use club" and
I can do anything I want.

I am trying to access by Perl:

# line 6 following
my $dbh=DBI->connect( 'DBI:mysql:gjw:club', 'gjw', 'password' ) or die
"$DBI::errstr\n";

I get the following error: "DBI connect<'gjw:club','gjw'...> failed: Unknown
MySQL server Host 'club' <11001> at line 6";

How do I find out my server HOST name is?  What else is wrong?

I have done this many times working with Oracle and never had this problem!

Thanks,

Jerry

-----Original Message-----
From: Gerald Preston [mailto:jwp@stripped] 
Sent: Friday, January 14, 2005 12:56 AM
To: mysql@stripped
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



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