W
wes.tibular
Forgive me if this is not the appropriate forum for this question.
I have installed DBI, and DBD::mysqlpp (couln't get DBD::mysql to
compile) on my system (with the requisite Net::MySql). When i connect
to my local mysql database, things are fine.
When i attempt to connect to a remote mysql database, i get:
DBI connect('database=ossinv;host=remotehost','username',...) failed:
Access denied for user: '@localhost' (Using password: NO) at /usr/
perl5/site_perl/5.8.4/DBD/mysqlPP.pm line 109
at ./test2.pl line 9
cannot open ossinv: at ./test2.pl line 9.
The relevant code is:
#!/usr/bin/perl
#
# test.pl
#
#
use DBI;
$dbh_OSS = DBI->connect
('DBI:mysqlPP:database=ossinv;host=remotehost','username','password')
or die "cannot open ossinv:$!";
$SQL = "select samid, turnover_complete from iso where host like
'%73odsp%'";
# print "$SQL<BR>\n\n";
$sth_UE = $dbh_UE->prepare($SQL);
$sth_UE->execute();
while ((@row) = $sth_UE->fetchrow_array) {
print "$row[0]:\n";
foreach $item (@row) {
print "$item\t";
}
print "\n";
}
If i use mysql itself (mysql -h remotehost -u username) it connects
just fine, so i know the username and password work across my network.
I have verified that the username and password are being passed to
mysqlpp, which passes it in turn to Net:MySql, but the remote server
does not seem to receive either the username (Access denied for user:
'@localhost' ) or the password (Using password: NO). This same code
opens a local database just fine (with appropriate changes to the
host, username, and password values).
Aside from the -w, and strict stuff, what am i missing?
I have installed DBI, and DBD::mysqlpp (couln't get DBD::mysql to
compile) on my system (with the requisite Net::MySql). When i connect
to my local mysql database, things are fine.
When i attempt to connect to a remote mysql database, i get:
DBI connect('database=ossinv;host=remotehost','username',...) failed:
Access denied for user: '@localhost' (Using password: NO) at /usr/
perl5/site_perl/5.8.4/DBD/mysqlPP.pm line 109
at ./test2.pl line 9
cannot open ossinv: at ./test2.pl line 9.
The relevant code is:
#!/usr/bin/perl
#
# test.pl
#
#
use DBI;
$dbh_OSS = DBI->connect
('DBI:mysqlPP:database=ossinv;host=remotehost','username','password')
or die "cannot open ossinv:$!";
$SQL = "select samid, turnover_complete from iso where host like
'%73odsp%'";
# print "$SQL<BR>\n\n";
$sth_UE = $dbh_UE->prepare($SQL);
$sth_UE->execute();
while ((@row) = $sth_UE->fetchrow_array) {
print "$row[0]:\n";
foreach $item (@row) {
print "$item\t";
}
print "\n";
}
If i use mysql itself (mysql -h remotehost -u username) it connects
just fine, so i know the username and password work across my network.
I have verified that the username and password are being passed to
mysqlpp, which passes it in turn to Net:MySql, but the remote server
does not seem to receive either the username (Access denied for user:
'@localhost' ) or the password (Using password: NO). This same code
opens a local database just fine (with appropriate changes to the
host, username, and password values).
Aside from the -w, and strict stuff, what am i missing?