http://dev.mysql.com/doc/refman/5.1/en/server-options.html#option_mysqld _datadir
You can specify the data directory at runtime with the --datadir= option to mysqld (mysqld_safe). Cheers, A -----Original Message----- From: vegiv...@gmail.com [mailto:vegiv...@gmail.com] On Behalf Of Johan De Meersman Sent: 18 September 2009 10:30 To: Claudio Nanni Cc: manasi.s...@artificialmachines.com; mysql@lists.mysql.com Subject: Re: Mysql dynamic database location You can do that at runtime no problem, you just need to do OS calls for it. r...@soulcake-duck:/var/lib/mysql# *mysqlshow* +--------------------+ | Databases | +--------------------+ | information_schema | | mysql | +--------------------+ r...@soulcake-duck:/var/lib/mysql# *mkdir /tmp/remotedb* r...@soulcake-duck:/var/lib/mysql# *chown mysql:mysql /tmp/remotedb* r...@soulcake-duck:/var/lib/mysql# *ln -s /tmp/remotedb/* r...@soulcake-duck:/var/lib/mysql# *mysqlshow* +--------------------+ | Databases | +--------------------+ | information_schema | | mysql | | remotedb | +--------------------+ r...@soulcake-duck:/var/lib/mysql# *mysql remotedb* Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 39 Server version: 5.0.67-0ubuntu6 (Ubuntu) Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> *create table a (a int);* Query OK, 0 rows affected (0.00 sec) mysql> *show tables;* +--------------------+ | Tables_in_remotedb | +--------------------+ | a | +--------------------+ 1 row in set (0.00 sec) mysql> Bye r...@soulcake-duck:/var/lib/mysql# On Fri, Sep 18, 2009 at 10:54 AM, Claudio Nanni <claudio.na...@gmail.com> wrote: > As far as I know, you can't, > you can do it with symbolic linking but not at run time. > So if you have a clue you can (pre)build empty databases using symbolic > linking and switching to the right one at run time. > > > Cheers > > Claudio Nanni > > > 2009/9/18 Manasi Save <manasi.s...@artificialmachines.com> > >> Hi All, >> >> Is it possible to change or create any database on a specific location. >> I want to specify a db path at runtime. >> >> Thanks in advance. >> -- >> Regards, >> Manasi Save >> Artificial Machines Pvt Ltd. >> >> >> >> >> -- >> MySQL General Mailing List >> For list archives: http://lists.mysql.com/mysql >> To unsubscribe: >> http://lists.mysql.com/mysql?unsub=claudio.na...@gmail.com >> >> > > > -- > Claudio > -- That which does not kill you was simply not permitted to do so for the purposes of the plot. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=arch...@jab.org