Search code examples
mysqlinnodb

How can move InnoDB table from one pc to another pc?



I've a table 'admin' and I want to move that with all data from one location to another. If I use MyISAM engine then I get 3 files 'admin.frm','admin.MYD' and 'admin.MYI' for 'admin' table in data folder, and I can copy and paste those files to another location and can run the table. but if I use InnoDB engine then I get only 'admin.frm' in data folder and when copy that file to another location then the table can't be run.

Anybody please tell me how can I move InnoDB table from one location to another ?

-Thanks.

Edit: (I need to transfer data and structure too(as entire table).I want it simple copy paste like MyISAM table files. is it possible ? and how ?)


Solution

  • If you just need to transfer data it may be simpler to use the built in tools, as so...

    Use mysqldump to get your table, a very simple example:

    mysqldump -u USERNAME -p DATABASE admin > admin.sql
    

    And then on the other computer:

    mysql -u USERNAME -p DATABASE < admin.sql