OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: question regarding mysql database location

From: nitin mehta (ntnmhtyahoo.com)
Date: Thu Nov 26 2009 - 04:36:10 CST


Is mysql the owner of the directories? ----- Original Message ---- From: Manasi Save <manasi.saveartificialmachines.com> To: Johan De Meersman <vegivamptuxera.be> Cc: Waynn Lue <waynnluegmail.com>; mysql <mysqllists.mysql.com> Sent: Wed, November 25, 2009 8:12:25 PM Subject: Re: question regarding mysql database location Dear Johan, Need your help again in understanding How mysql reads symlink. As you said below, I have created symlinks in default mysql directory. and try to read that symlink file as a database. But mysql is not reading that file as Database. Is there any settings which I need to change. Thanks in advance. -- Regards, Manasi Save Artificial Machines Pvt Ltd. > On Wed, Nov 25, 2009 at 11:55 AM, Manasi Save < > manasi.saveartificialmachines.com> wrote: > >> Hi Johan, >> >> I am Sorry. If I have complicated the senerio But, this still not fix my >> purpose. >> >> What I want is - From your example :- >> >> /data/disk1/mysql/db1 (directory) >>                /db2 (directory) >>                /db3 (directory) >>                /db4 (symlink to /data/disk2/mysql/db4) >>                /db5 (symlink to /data/disk2/mysql/db5) >>                /db6 (symlink to /data/disk2/mysql/db6) >> >> I dont want to create these directories here (/data/disk1/mysql/d4 >> /d5 >> /d6). > > > They're not directories, they're symlinks, which are (to the OS) a kind of > file, and thus not limited to 32000 per directory. They behave mostly > identical to a directory, though, so MySQL will pick them up seamlessly, > with the one hitch that you'll have to replace "create database" > statements > by mkdir and ln calls on the OS level. > > This is afaik the only way to do this on the MySQL level. It is impossible > to specify multiple base directories. > > Another possible option, but higher in complexity and most likely less > performant, would be to run two instances of MySQL on different ports with > different data directories, and use MySQL Proxy to redirect incoming > connections based on whatever criterion you could script into it - "use > database" statements, for example. This is however going to come with it's > very own set of catches and limitations. > > I'm not big on proxy, myself, so I'm afraid if the symlink option is not > acceptable to you, I can't help you any further. > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:    http://lists.mysql.com/mysql?unsub=ntnmhtyahoo.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql