0

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.

1 Answer 1

0

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.

3
  • 1
    ..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, 2013 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?
    – ArtMat
    Feb 23, 2013 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: dev.mysql.com/doc/refman/5.0/en/multiple-data-directories.html
    – Jay
    Feb 23, 2013 at 18:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .