1

All mention of either using a symlink or data/index separate data directories state that MyISAM is the only supported (https://dev.mysql.com/doc/refman/5.5/en/symbolic-links.html). However, I found this bug report (http://bugs.mysql.com/bug.php?id=49808), that states "only supported for MyISAM and ARCHIVE tables". This also may be just for partitioning.

I believe just "testing" this is not an option, because the MySQL documentation mysteriously states "For files used by tables for other storage engines, you may get strange problems if you try to use symbolic links. "

Does the ARCHIVE storage engine support symlink or separate data directories?

UPDATE: Related question

1 Answer 1

0

All mention of either using a symlink or data/index separate data directories state that MyISAM is the only supported

Almost, but not quite "all."

There are three ways of symlinking in MySQL:

  • manually symlink the individual table files - only supported for MyISAM and even then the documentation says "as a last resort."
  • automatically symlink MyISAM MYD and MYI files with DATA DIRECTORY and INDEX DIRECTORY directives.
  • manually symlink a database (i.e. a single schema) directory to a directory in a different location

This last one is the one you want, and will work transparently with any of the normal storage engines.

Stop reading the page from the manual that you mentioned above before you get to section 8.11.3.1.2, and this will make more sense. Everything from that point forward is related to table files being symlinked, not directories. The information that follows is not relevant if your symlinks are done at the database directory level.

Though not directly related to your question, I'll point out that your entire /usr/local/mysql/data directory can also be a symlink to a directory elsewhere. I almost always do this instead of actually telling MySQL to use a different directory, so that it's obvious to any sysadmin looking at the server itself where the actual data lives.

2
  • So it is safe at the schema level no matter what storage engine? Commented Jan 17, 2013 at 20:08
  • Correct. Of course, you should stop the server before moving things around. Commented Jan 17, 2013 at 21:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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