Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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

share|improve this question
add comment

migrated from serverfault.com Jan 16 '13 at 21:39

This question came from our site for professional system and network administrators.

1 Answer

up vote 0 down vote accepted

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.

share|improve this answer
    
So it is safe at the schema level no matter what storage engine? –  Carson Reinke Jan 17 '13 at 20:08
    
Correct. Of course, you should stop the server before moving things around. –  Michael - sqlbot Jan 17 '13 at 21:04
add comment

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.