Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

As I read here: http://bytes.com/topic/mysql/answers/450774-copying-table-one-schema-another

Will it work for version 5.1 ? Can I do so while MySQL is running ?

By the way I can only see *.frm, are others hidden ?

share|improve this question

3 Answers 3

I would recommend writing a script to run mysqldump with the -d flag to backup schema.

If you want to show the schema, you can run show create table table\G.

share|improve this answer

This is a bad idea for a number of reasons. Your best bet is to use the mysqldump tool. It's very easy and produces a flexible backup file that contains all the sql necessary to re-create your database.

share|improve this answer

FRM files only include table definition,

For MyISAM, data are on MYD files,

For InnoDB, on IDB files of on the ibdata tablespaces (on the root of your data directory)

But does not do backup by copying the files, that will be unusable.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.