I need to copy over a large mysql database with myisam tables. The fastest way for me to do it is by copying over the mysql/data directory. The .MYI and .MYD files copy over smoothly. However, copying the .frm file is causing mysql to show an error when I query the database. :
#1033 - Incorrect information in file: 'mytable.frm'
When I did the copy I stopped the mysql server. Also, I made sure that the owner and permissions are set correctly. The repair table
command wouldn't work either because of the same aforementioned error. What am I doing wrong here?
(A possible solution would be to do a mysqldump of just the data structure which would be a fast process and then I would only need to copy over the .MYI and .MYD files. However, I would like to know what I am doing wrong with the copy before I go on a more complicated route)
Update
Following up on @RickJames comments - Here is a more detailed explanation of what I am doing:
I'm using cp command on a Linux server to copy files from one db to another db on the same server. The version that I am using mysql Ver 14.12 Distrib 5.0.77
did not work. Inspired by @RickJames comment, I tried doing the same operation on a different server with mysql Ver 14.14 Distrib 5.6.29
and it worked beautifully. That being said, I'm still intrigued as to why it doesn't work with the older version