The other day while trying to move a schema from one MySQL server to another, I encountered a very odd issue. The schema to be moved contained both MyISAM and InnoDB tables, so the only option I had was to dump the schema using mysqldump on the source server and import it on the destination server. The dump on the source server went fine with absolutely no issues but it failed to import into the second server, and the error message was:
Can't create/write to file ‘/disk1/activity.MYI’ (Errcode: 2)
This was an extremely odd message as the data directory on the
destination server was properly setup in terms of ownership and
permission. The source and destination MySQL servers have been
running without issues for months. Prior to the error, four
tables in the dump file were imported into the destination server
without any issues whatsoever. Furthermore the source and
destination server have the exact same operating system …