Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Man-wai Chang
March 8, 2007, 8:51 am
rate this thread
I have a *damaged* MyISAM stock_take_mst.frm in /var/lib/mysql/abc.
And I would like to move it to /var/lib/mysql/test and experiment with it.
Is there a MySQL command to detach and attach a table?
iTech Consulting Co., Ltd.
Expert of ePOS solutions
Website: http://www.itech.com.hk (IE only)
Tel: (852)2325 3883 Fax: (852)2325 8288
Re: [mysql 5] How could I move a table from one database to another?
No, but you can do this (for MyISAM tables):
1. Shut down the MySQL server.
2. Move the file to its location. You probably want to take
stock_take_mst.MYI and stock_take_mst.MYD along with
stock_take_mst.frm . Make sure the permissions are correct.
(Probably owner mysql:mysql and mode 660 for files and 770 for
3. Restart the MySQL server.
You may be able to replace steps 1 and 3 with a "flush tables" command if
you can keep other clients off the new or old table name.
- » Americanas.com SALDO de TVs Com at 80% de Desconto (29798)
- — Newest thread in » MySQL Database Forum