Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

So, where can be stored the MySQL data directory?

I mean the type of destination location: is outside BASEDIR ok? should be same partition? same disk? maybe a temporary RAM partition is also fine? NFS partition? symlinked to one of these? etc.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

Anywhere that the mysql user can access it is fine. It's just a directory with files, that are read and written normally - there is nothing special about them. It can be a different partition, or even a different disk (e.g. SSD is a good idea). NFS will work, but make sure it's quick (for obvious reasons, really). Symlinks are also perfectly acceptable.

I have run MySQL from a ramdisk before, and it worked perfectly.

share|improve this answer
..with the caveat that selinux or apparmor rules may need to be modified to allow mysql to read/write to the new location. – EEAA Feb 23 '13 at 16:33
@Jay: There are different pieces of software or APIs that have some restrictions (to be same partition, etc.) and probably the reasons are subtile. Well, if MySQL has no such restriction, this is a good news, thanks. BTW, is this subject described somewhere in the official docs? – ArtM Feb 23 '13 at 17:40
That may well be true, but just answering the question with "no" would not have been very useful, so I elaborated. You can probably start here: – Jay Feb 23 '13 at 18:22

Your Answer


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.