I prefer the mysqldump utility for transfering data. Its pretty fast (if
your tables are not huge gigabytes in size).. and preserves you tables/data
just as they were when you moved them. As far as I know, copying data on the
filesystem level in mysql does not work. You cannot copy data files
somewhere else and change the path and expect it to work. Use mysqldump or
somthing similar to recreate your tables and move them. HTH.

-phpninja


-----Original Message-----

From: Dan Buettner
[*mailto:[EMAIL PROTECTED]<[EMAIL PROTECTED]>]


Sent: Wednesday, June 14, 2006 8:12 AM

To: murthy gandikota

Cc: mysql@lists.mysql.com

Subject: Re: ERROR 1016 (HY000): Can't open file: 'agent.ibd' (errno: 1)

Murthy, doing some quick reading on InnoDB table definitions, it appears
that MySQL itself keeps some info in the .frm file, while InnoDB keeps some
info within the tablespace.

While you can easily move MyISAM table files about amongst MySQL database
directories (mind you stop the server and that MySQL access permissions
won't follow), the same appears to not be true for InnoDB.

I'm not sure what the best way to move or copy an InnoDB table or tables
from one database to another is ... anyone?

Dan





murthy gandikota wrote:

Hi Dan

The table was never dropped. I removed the agent.frm file and tried. Here
is the output:

mysql> desc agent;

ERROR 1146 (42S02): Table 'sfgn.agent' doesn't exist





Dan Buettner <[EMAIL PROTECTED]> wrote:

Is the 'agent' table a current table, or one that got dropped at some
point?



See

*http://dev.mysql.com/doc/refman/5.0/en/innodb-troubleshooting-datadict*<http://dev.mysql.com/doc/refman/5.0/en/innodb-troubleshooting-datadict>

.html The last half seems relevant - it's pointing you to removing the

.frm file manually. Personally, I'd mv it and not rm it.



Dan





murthy gandikota wrote:

Hi Dan

I've set the permissions to 777 for all the files and directories.

Basically I did chmod -R 777 sfgnew. Also changed the ownership to

mysql using chown -R mysql:mysql sfgnew.



Thanks!



*/Dan Buettner /* wrote:



Murthy, do you have appropriate permissions (777 works, or 775/770 if

owned by mysql user) on your new directory ('sfgnew')? If you don't

have execute permission for the mysql user on that dir, MySQL can't

list the contents ...



Dan



murthy gandikota wrote:

I'm getting the following error

ERROR 1016 (HY000): Can't open file: 'agent.ibd' (errno: 1)



This is the output from mysqld



060613 19:59:34 InnoDB error:

Cannot find table sfgnew/agent from the internal data dictionary of

InnoDB though the .frm file for the table exists. Maybe you have

deleted and recreated InnoDB data files but have forgotten to delete

the corresponding .frm files of InnoDB tables, or you have moved

.frm files to another database?

Look from section 15.1 of
*http://www.innodb.com/ibman.html*<http://www.innodb.com/ibman.html>how
you

can resolve the problem





Can anyone please help me figure this out?

Here are some pertinent facts:

a) stopped mysqld

b) copied files from sfg to sfgnew in the var directory

c) set the permissions to 777 (read, write, execute) for all the

files in sfgnew

d) restarted mysqld



Murthy

--

MySQL General Mailing List

For list archives:
*http://lists.mysql.com/mysql*<http://lists.mysql.com/mysql>To
unsubscribe:

*http://lists.mysql.com/[EMAIL PROTECTED]<http://lists.mysql.com/[EMAIL 
PROTECTED]>





__________________________________________________

Do You Yahoo!?

Tired of spam? Yahoo! Mail has the best spam protection around

*http://mail.yahoo.com* <http://mail.yahoo.com/>







__________________________________________________

Do You Yahoo!?

Tired of spam? Yahoo! Mail has the best spam protection around

*http://mail.yahoo.com* <http://mail.yahoo.com/>

--

MySQL General Mailing List

For list archives: *http://lists.mysql.com/mysql*<http://lists.mysql.com/mysql>

Reply via email to