Xyzzy
March 31st, 2001, 16:33
I uploaded this Perl script to my cgi-bin at Portland.co.uk:
#!/usr/bin/perl
use DBI;
use CGI qw/:standard/;
print header;
print "<html>Preparing request..";
my $db = DBI->connect('DBI:mysql:nes:localhost', 'username', 'secret');
if (!defined $db)
{
print "<p>Failed: $DBI::errstr\n</p>";
}
print "</html>";
When I run it, I get this output:
Preparing request..
Failed: Access denied for user: 'username@localhost' (Using password: YES)
I used the username and password I signed up with Portland with. Do I have to use a certain hostname? Portland's welcome e-mail didn't mention MySQL at all. Any help greatly appreciated.
#!/usr/bin/perl
use DBI;
use CGI qw/:standard/;
print header;
print "<html>Preparing request..";
my $db = DBI->connect('DBI:mysql:nes:localhost', 'username', 'secret');
if (!defined $db)
{
print "<p>Failed: $DBI::errstr\n</p>";
}
print "</html>";
When I run it, I get this output:
Preparing request..
Failed: Access denied for user: 'username@localhost' (Using password: YES)
I used the username and password I signed up with Portland with. Do I have to use a certain hostname? Portland's welcome e-mail didn't mention MySQL at all. Any help greatly appreciated.