How does mysql know where to look for the files you moved? Your perl sounds fine, but mysql can't find the files that make up your database.
1) Set up a database through mysql, instead of moving files around. 2) Modify the vars in your script to use that database. 3) Run the new script It will probably run peachy then. You also may want to run that exact same query form the mysql command line and I'll bet you get the same error. Again, because you're asking for a database/table that translates into : /mysql/database/path/database/table.Isd /mysql/database/path/database/table2.Isd Etcc But it really is in /you/path/that/mysql/doesnot/lookin/table.ISD etc Dan > > 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, 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 >
