Possible Duplicate:
Copying MySQL Database to another machine
I am doing a java project and want to copy my database from one machine to another but when i copy the folder having the .opt and .frm files only the table names are copied.Neither the data nor the columns are copied. Please help me out.The mysql dump command also does not work when i execute it in netbeans.
Take a look here for instructions how to do that.
Those are not the only files that you should copy. You should also copy
ibdatafiles, this is where your InnoDB data actually is (actually, check your my.ini to see where your data files are). Also, MyISAM databases are different…to copy MyISAM database, it is sufficient just to copy folder for that database (it contains .myd and .myi files, which are data and index file, respectivly).In the given link you should find all neccessary instructions, as well as some other ways to do that migration.