SPUG: installing perl mysql DBD - need C compiler?

Aaron Salo aaron at activox.com
Mon Oct 21 19:18:40 CDT 2002


well, start from scratch. presuming you haven't set up any other users yet,
take this, change [rootpass] to the proper password (presuming you've set a
root password for mysql, otherwise leave password blank), save it, run from
the command line, and tell us what it says:

>>>>CUT>>>>>>
#!/usr/bin/perl

# fast in and out

use DBI;

# ===== db connection ===== #
my $host       = 'localhost';
my $port       = '3306';
my $driver     = 'mysql';
my $db         = 'mysql';
my $dbuser     = 'root';
my $dbpass     = '[rootpass]';
my $dsn        = "DBI:$driver:database=$db;host=$host;port=$port";
my $dbh = DBI->connect($dsn, $dbuser, $dbpass) or die "$DBI::errstr";

print qq(it looks like a good connect\n);

>>>CUT>>>>>>>

At 04:19 PM 10/21/2002 -0700, you wrote:
>10/21/02
>
>Greetings SPUGsters,
>
>I recently set up an Apache Web server on Red Hat Linux and I'm hoping
>someone can help me with some advice on how to get Perl and MySQL to
>work together on it.  



 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
      Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
  Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
 For daily traffic, use spug-list for LIST ;  for weekly, spug-list-digest
     Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org




More information about the spug-list mailing list