NYCPHP Meetup

NYPHP.org

[nycphp-talk] set datadir in mysql config

forest mars compustretch at gmail.com
Mon Jan 3 14:20:53 EST 2011


On Mon, Jan 3, 2011 at 1:38 PM, William Klein <willie at pdfsystems.com> wrote:

>  If it’s just the data path it’s very easy to just make a symbolic link to
> the new volume in the default directory.  That way you can even have
> different databases on different volumes.
>


   Ack. While that may be "easy" in some cases, you really need to know a
lot more about what it is you are doing. For starters not all systems have
support for this (though most modern Unixes do.) Nick is using Fedora which
does, but before you do that you might want to 'show variables like
'have_symlink' to confirm.


In this case it sounds like Nick wants to relocate the entire directory, and
not just the data files themselves, however even if it was just the data
file there are a number of caveats you would need to be aware of.


Just to mention a couple, you'd want to confirm that symlinks are supported
for the storage engines you are using. Some storage engines can so odd
things when they encounter symlinks there. (MyISAM does handle them
correctly for the data files.) And as William sort of implies, you don't
want to symlink other files such as db.frm, in fact I'm pretty sure that
will break mysql.


Not trying to be persnickety here, just pointing out that "easy" solutions
often have a plethora of gotchas that you need to know about of before you
set off down that road.


cheers,


~ Forest Mars





-- 
-- 
"In theory, theory and practice are exactly the same.
In practice, they're completely different."
------------------------------------------------------------------
This email is:
[   ]  private: do not forward
[ x ]  o.k. to forward
[   ]  o.k. to blog
[   ] ask first
-----BEGIN PGP SIGNATURE-----
Version: PGPsdk version 1.7.1 (C) 1997-1999 Network Associates, Inc. and its
affiliated companies. (Diffie-Helman/DSS-only version)

iQA/AwUBRkjTLDbz7LySoccvEQJDcQCguZZj4M4kOVOlOX4CtbgR0rppsdovAjra
3RRXIlkdzuYI0YJz4WyvKlTn
=MLhk
-----END PGP SIGNATURE-----
------------------------------------------------------------------
The New TLDs are Here!
Switch to Name.Space: http://namespace.org/switch
Support new domains & keep free media free! Register yours today!
https://secure.name-space.com/registry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20110103/696e951f/attachment.html>


More information about the talk mailing list