jason.hall
01-15-2004, 11:15 PM
This problem has been baffling me for days. I have a Perl script that accesses two MySQL tables - or at least it DID, until I moved my site from my home computer to HostRocket. Now all I get is table not found - even though I'm looking right at it in PHPMyAdmin from the Control Panel!
So, I tried it from scratch - create a test DB named test (which HostRocket prefixes with my username), put in a table with a few rows named TBL_POD, created a sample user called usr, and assigned usr permission to test. Then I wrote and ran this simple test script (partially copied from my original script that didn't work):
------------------
#!/usr/bin/perl -w
use DBI;
use strict;
my $dbh = DBI->connect("DBI:mysql:<username>_test:localhost","<username>_usr","<password>");
my $sth = $dbh -> prepare("SELECT * FROM TBL_POD");
$sth -> execute();
my $row = $sth -> fetchrow_hashref();
$sth->finish();
$dbh->disconnect;
exit;
------------------
I even copied-and-pasted the connect string from the MySQL Manager screen. But sure enough I get:
DBD::mysql::st execute failed: Table '<username>_test.TBL_POD' doesn't exist...'
Any ideas?
Thanks!!
So, I tried it from scratch - create a test DB named test (which HostRocket prefixes with my username), put in a table with a few rows named TBL_POD, created a sample user called usr, and assigned usr permission to test. Then I wrote and ran this simple test script (partially copied from my original script that didn't work):
------------------
#!/usr/bin/perl -w
use DBI;
use strict;
my $dbh = DBI->connect("DBI:mysql:<username>_test:localhost","<username>_usr","<password>");
my $sth = $dbh -> prepare("SELECT * FROM TBL_POD");
$sth -> execute();
my $row = $sth -> fetchrow_hashref();
$sth->finish();
$dbh->disconnect;
exit;
------------------
I even copied-and-pasted the connect string from the MySQL Manager screen. But sure enough I get:
DBD::mysql::st execute failed: Table '<username>_test.TBL_POD' doesn't exist...'
Any ideas?
Thanks!!