script not able to connect

script not able to connect

am 14.08.2004 07:21:18 von Jeremy Morris

I am quite new at using perl and mysql. I just installed
the DBI and DBD packages, and was required to download the
header files to do so. Once all these things were
installed, I tried a simple script to see if it works.
Here is the code I tried:

#!/usr/bin/perl -w
use strict;
use DBI; (I also tried use DBD::mysql, same effect)

my $dsn = 'dbi:mysql:databasename:myhostname:3306';
my $user = 'myusername';
my $pswd = 'mypassword';

my $dbh = DBI->connect($dsn,$user,$pswd) or die 'try
again\n';

I get the follwing error message after running $> perl
filename.pl :
DBI
connect('databasename:myhostname:3306','myusername','...)
failed: Host 'myipaddress' is not allowed to connect to
this MySQL server at filename.pl line 9

So I went into webmin to see what was happening there;
whenever I try to look at something, I get the following
message:
HTTP/1.0 500 Perl execution failed Server: MiniServ/0.01
Date: Sat, 14 Aug 2004 05:22:14 GMT Content-type:
text/html Connection: close
Error - Perl execution failed

Can't use an undefined value as a HASH reference at
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/DBD/m ysql.pm
line 113.

Does anyone know what is going on?

Thank you,
Jeremy

--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org