At 11:42 -0500 1/22/03, Tay, William wrote:
Hi,

I am developing a Web application that invokes a Perl script, which in turn
access a mysql database.

I have copied a sample database named books to the directory
/usr/local/mysql/data of a Linux machine,
Bzzzzzzzt!!

That will *not* work unless the tables are of a type that is binary
portable between machines.  You're using ISAM tables (as indicated by
your references to .isd, .ism, and .ISD below), which are machine dependent.
And because you use .isd and .ism (lowercase), I'm guessing you copied them
from a Windows box, where filenames are not case sensitive.

Your MySQL server is looking for .ISD and .ISM files (case sensitive).
You could get it to find the files by renaming them to have uppercase
extensions, but if you *did* copy them from a Windows box, it still won't
work due to the machine-dependent nature of ISAM table storage.

Use this command on the Windows box to dump the database:

mysqldump --opt books > books.sql

Then copy books.sql to the Linux box and run this command:

mysql books < books.sql

That will create the database correctly.

None of this has anything to do with Perl, of course. :-)
But you're not having a Perl problem.


 where I have also installed an
Apache Web server, mysql, DBI module and a DBD::mysql driver. A table named
Authors is in the books database. Within /usr/local/mysql/data/books, 3
files (Authors.frm, authors.isd, authors.ism) belonging to the Authors table
are located.

For testing purpose, I tried to execute the perl script on the command line
(perl -w test1.pl). The connection to the books database seemed to work
fine. However, executing the SELECT statement that follows gives the
following errors:

DBD::mysql::st execute failed: Can't find file: 'Authors.ISD' (errno: 2) at
test1.pl line 30.
DBD::mysql::st execute failed: Can't find file: 'Authors.ISD' (errno: 2) at
test1.pl line 30.

Would appreciate any comment on what could have happened and suggestions for
the solution. Thanks.

Will



Reply via email to