creating databases in different folders
creating databases in different folders
am 02.06.2009 05:00:28 von Foo JH
Hi all,
I'm using MySQL 5.0 on Windows 2003.
Problem background: We use the same server for different applications.
All the applications share the same server as the database server. Each
application uses their own database. In MSSQL we put each database in
the corresponding application folder so that the application root folder
contains everything (including the database).
Now we're trying to do the same for MySQL as well, but I'm not sure how
I can specify that a database should be created in a particular
directory (and it's almost always not in C:\Program Files\MySQL Server).
Can anyone advise? Thanks.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org
AW: creating databases in different folders
am 02.06.2009 09:12:48 von Benedikt Schackenberg
You can configure it in the my.cnf file: there you can set the data
directory.=20
-----Ursprüngliche Nachricht-----
Von: Foo JH [mailto:jhfoo-ml@extracktor.com]=20
Gesendet: Dienstag, 2. Juni 2009 05:00
An: mysql@lists.mysql.com
Betreff: creating databases in different folders
Hi all,
I'm using MySQL 5.0 on Windows 2003.
Problem background: We use the same server for different applications.
All the applications share the same server as the database server. Each
application uses their own database. In MSSQL we put each database in
the corresponding application folder so that the application root folder
contains everything (including the database).
Now we're trying to do the same for MySQL as well, but I'm not sure how
I can specify that a database should be created in a particular
directory (and it's almost always not in C:\Program Files\MySQL Server).
Can anyone advise? Thanks.
--=20
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/mysql?unsub=3Dschackenberg@termindoc. de
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg
Re: AW: creating databases in different folders
am 02.06.2009 11:48:58 von Foo JH
Benedikt Schackenberg wrote:
> You can configure it in the my.cnf file: there you can set the data
> directory.
Thanks for the quick reply.
My concern is that setting the data directory puts ALL databases in that
folder. What I plan to do is to put databases in separate folders.
Is that possible?
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org
Re: AW: creating databases in different folders
am 02.06.2009 11:56:23 von Martijn Tonies
Hi,
> Benedikt Schackenberg wrote:
>> You can configure it in the my.cnf file: there you can set the data
>> directory.
> Thanks for the quick reply.
>
> My concern is that setting the data directory puts ALL databases in that
> folder. What I plan to do is to put databases in separate folders.
>
> Is that possible?
If you don't use InnoDB, then a "database" IS a folder.
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!
Database questions? Check the forum:
http://www.databasedevelopmentforum.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org
AW: AW: creating databases in different folders
am 02.06.2009 12:15:31 von Benedikt Schackenberg
I think, that will not work with one database daemon. Then you have to
install for every database one daemon ;)
-----Ursprüngliche Nachricht-----
Von: Foo JH [mailto:jhfoo-ml@extracktor.com]=20
Gesendet: Dienstag, 2. Juni 2009 11:49
An: schackenberg@termindoc.de
Cc: mysql@lists.mysql.com
Betreff: Re: AW: creating databases in different folders
Benedikt Schackenberg wrote:
> You can configure it in the my.cnf file: there you can set the data
> directory.=20
Thanks for the quick reply.
My concern is that setting the data directory puts ALL databases in that
folder. What I plan to do is to put databases in separate folders.
Is that possible?
--=20
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/mysql?unsub=3Dschackenberg@termindoc. de
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg
Re: creating databases in different folders
am 02.06.2009 12:24:15 von Walter Heck
You might try and hack something together using NTFS juction points.
Unadvisable though, and probably unsupported.
Walter
On Mon, Jun 1, 2009 at 9:00 PM, Foo JH wrote:
> Hi all,
>
> I'm using MySQL 5.0 on Windows 2003.
>
> Problem background: We use the same server for different applications.
> All the applications share the same server as the database server. Each
> application uses their own database. In MSSQL we put each database in
> the corresponding application folder so that the application root folder
> contains everything (including the database).
>
> Now we're trying to do the same for MySQL as well, but I'm not sure how
> I can specify that a database should be created in a particular
> directory (and it's almost always not in C:\Program Files\MySQL Server).
>
> Can anyone advise? Thanks.
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: Â Â http://lists.mysql.com/mysql?unsub=3Dlists@o=
lindata.com
>
>
--=20
Walter Heck, Consultant @ Open Query (http://openquery.com)
Affordable Training and ProActive Support for MySQL & related technologies
Follow our blog at http://openquery.com/blog/
OurDelta: free enhanced builds for MySQL @ http://ourdelta.org
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg
Re: AW: creating databases in different folders
am 02.06.2009 12:30:18 von John Daisley
MySQL represents each database by means of a database directory located
within the data directory. You can move a database directory to a location
outside the datadirectory and replace it with a symlink.
Moving a database directory is very simple. Just follow these steps. (I
think you said you were using windows, if you are using *nix give me a
shout back, the procedure is different.)
1. Stop the server
2. Move the database directory from the data directory to its new location
3. In the data directory create a file that has a name that is the same as
the database name with an extension of .sym This file should contain the
full pathname to the database directory location.
4. Restart the server ensuring the --skip-symbolic-links option is not used.
Hope this is what you are after. Let me know how much success yoou have
with this on Windows. We use symlinking on Linux to distribute load but I
have never tried it on Windows.
Regards
John Daisley
----------------------------------------
MySQL 5 Certified Database Administrator (CMDBA)
MySQL 5 Certified Developer (CMDEV)
MySQL Certified Associate (CMA)
Telephone +44 (0)1283 537111
Mobile +44 (0)7812 451238
Email john.daisley@butterflysystems.co.uk
> Benedikt Schackenberg wrote:
>> You can configure it in the my.cnf file: there you can set the data
>> directory.
> Thanks for the quick reply.
>
> My concern is that setting the data directory puts ALL databases in that
> folder. What I plan to do is to put databases in separate folders.
>
> Is that possible?
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/mysql?unsub=john.daisley@butterflysys tems.co.uk
>
>
> ______________________________________________
> This email has been scanned by Netintelligence
> http://www.netintelligence.com/email
>
>
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org
Re: AW: creating databases in different folders
am 02.06.2009 13:53:00 von Foo JH
John Daisley wrote:
> MySQL represents each database by means of a database directory located
> within the data directory. You can move a database directory to a location
> outside the datadirectory and replace it with a symlink.
Thanks for the tip John, esp. the detailed steps to take. It sounds
scary (I did some reading and there's some concerns about deleting stuff
via Windows Explorer), but I'd give it a shot and update you on the success.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org
Re: AW: AW: creating databases in different folders
am 02.06.2009 13:56:38 von Foo JH
From the sound of things, apart from using symbolic links, all MySQL
databases MUST reside within the same data root folder.
Some further questions:
1. On the *NIX, *BSD platform, do you guys locate the databases in diff
folders and link it back to the data root on production systems?
2. If I were to use Innodb, there is NO way to separate the files used
by different databases?
Benedikt Schackenberg wrote:
> I think, that will not work with one database daemon. Then you have to
> install for every database one daemon ;)
>
>
> -----Ursprüngliche Nachricht-----
> Von: Foo JH [mailto:jhfoo-ml@extracktor.com]
> Gesendet: Dienstag, 2. Juni 2009 11:49
> An: schackenberg@termindoc.de
> Cc: mysql@lists.mysql.com
> Betreff: Re: AW: creating databases in different folders
>
> Benedikt Schackenberg wrote:
>> You can configure it in the my.cnf file: there you can set the data
>> directory.
> Thanks for the quick reply.
>
> My concern is that setting the data directory puts ALL databases in that
> folder. What I plan to do is to put databases in separate folders.
>
> Is that possible?
>
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org
RE: AW: AW: creating databases in different folders
am 02.06.2009 13:57:27 von Martin Gainty
--_1b6655cd-9d0f-4031-b8e9-36a09b46ecfe_
Content-Type: text/plain; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
Guten Tag
http://dev.mysql.com/doc/refman/5.0/en/recovery-from-backups .html
Das heißt=2C können wir den Bediener mit a anstellen
--Maschinenbordbuchsortierfach Wahl=2C die eine Position auf einer
anderen körperlichen Vorrichtung von der spezifiziert=2C auf der das
Datenverzeichnis liegt. So=2C die Maschinenbordbücher sind sicher=2C selb=
st
wenn die Vorrichtung=2C die das Verzeichnis enthält=2C verloren ist.
arbeitet dieses nicht für Nichtdämon?
(raten Sie bitte)
Martin Gainty=20
______________________________________________=20
Verzicht und Vertraulichkeitanmerkung
=20
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaeng=
er sein=2C so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiter=
leitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient l=
ediglich dem Austausch von Informationen und entfaltet keine rechtliche Bin=
dungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen w=
ir keine Haftung fuer den Inhalt uebernehmen.
> From: schackenberg@termindoc.de
> To: jhfoo-ml@extracktor.com
> CC: mysql@lists.mysql.com
> Subject: AW: AW: creating databases in different folders
> Date: Tue=2C 2 Jun 2009 12:15:31 +0200
>=20
> I think=2C that will not work with one database daemon. Then you have to
> install for every database one daemon =3B)
>=20
>=20
> -----Ursprüngliche Nachricht-----
> Von: Foo JH [mailto:jhfoo-ml@extracktor.com]=20
> Gesendet: Dienstag=2C 2. Juni 2009 11:49
> An: schackenberg@termindoc.de
> Cc: mysql@lists.mysql.com
> Betreff: Re: AW: creating databases in different folders
>=20
> Benedikt Schackenberg wrote:
> > You can configure it in the my.cnf file: there you can set the data
> > directory.=20
> Thanks for the quick reply.
>=20
> My concern is that setting the data directory puts ALL databases in that
> folder. What I plan to do is to put databases in separate folders.
>=20
> Is that possible?
>=20
> --=20
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/mysql?unsub=3Dschackenberg@termindoc. de
>=20
>=20
> --=20
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dmgainty@hotmail.c=
om
>=20
____________________________________________________________ _____
Windows Live=99 SkyDrive=99: Get 25 GB of free online storage.
http://windowslive.com/online/skydrive?ocid=3DTXT_TAGLM_WL_S D_25GB_062009=
--_1b6655cd-9d0f-4031-b8e9-36a09b46ecfe_--
RE: AW: creating databases in different folders
am 02.06.2009 16:34:54 von Jerry Schwartz
>-----Original Message-----
>From: John Daisley [mailto:john.daisley@mypostoffice.co.uk]
>Sent: Tuesday, June 02, 2009 6:30 AM
>To: Foo JH
>Cc: schackenberg@termindoc.de; mysql@lists.mysql.com
>Subject: Re: AW: creating databases in different folders
>
>MySQL represents each database by means of a database directory located
>within the data directory. You can move a database directory to a
>location
>outside the datadirectory and replace it with a symlink.
>
>Moving a database directory is very simple. Just follow these steps. (I
>think you said you were using windows, if you are using *nix give me a
>shout back, the procedure is different.)
[JS] So far as I know, Windows supports mount points but not symbolic links.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org
RE: AW: creating databases in different folders
am 02.06.2009 17:10:15 von John Daisley
>
>
>>-----Original Message-----
>>From: John Daisley [mailto:john.daisley@mypostoffice.co.uk]
>>Sent: Tuesday, June 02, 2009 6:30 AM
>>To: Foo JH
>>Cc: schackenberg@termindoc.de; mysql@lists.mysql.com
>>Subject: Re: AW: creating databases in different folders
>>
>>MySQL represents each database by means of a database directory located
>>within the data directory. You can move a database directory to a
>>location
>>outside the datadirectory and replace it with a symlink.
>>
>>Moving a database directory is very simple. Just follow these steps. (I
>>think you said you were using windows, if you are using *nix give me a
>>shout back, the procedure is different.)
> [JS] So far as I know, Windows supports mount points but not symbolic
> links.
You are correct Jerry, Windows does not support symbolic links but for
MySQL purposes you can create an .sym file containing the full path to the
new location and MySQL will read the file and look in the specified path
for the database files.
The procedure is covered in the documentation here
http://dev.mysql.com/doc/refman/5.0/en/windows-symbolic-link s.html
>
>
>
>
> ______________________________________________
> This email has been scanned by Netintelligence
> http://www.netintelligence.com/email
>
>
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org
AW: AW: creating databases in different folders
am 02.06.2009 17:18:01 von Benedikt Schackenberg
Thx john !! i can use this :)
-----Ursprüngliche Nachricht-----
Von: John Daisley [mailto:john.daisley@mypostoffice.co.uk]=20
Gesendet: Dienstag, 2. Juni 2009 17:10
An: Jerry Schwartz
Cc: john.daisley@butterflysystems.co.uk; 'Foo JH';
schackenberg@termindoc.de; mysql@lists.mysql.com
Betreff: RE: AW: creating databases in different folders
>
>
>>-----Original Message-----
>>From: John Daisley [mailto:john.daisley@mypostoffice.co.uk]
>>Sent: Tuesday, June 02, 2009 6:30 AM
>>To: Foo JH
>>Cc: schackenberg@termindoc.de; mysql@lists.mysql.com
>>Subject: Re: AW: creating databases in different folders
>>
>>MySQL represents each database by means of a database directory =
located
>>within the data directory. You can move a database directory to a
>>location
>>outside the datadirectory and replace it with a symlink.
>>
>>Moving a database directory is very simple. Just follow these steps. =
(I
>>think you said you were using windows, if you are using *nix give me a
>>shout back, the procedure is different.)
> [JS] So far as I know, Windows supports mount points but not symbolic
> links.
You are correct Jerry, Windows does not support symbolic links but for
MySQL purposes you can create an .sym file containing the full path to =
the
new location and MySQL will read the file and look in the specified path
for the database files.
The procedure is covered in the documentation here
http://dev.mysql.com/doc/refman/5.0/en/windows-symbolic-link s.html
>
>
>
>
> ______________________________________________
> This email has been scanned by Netintelligence
> http://www.netintelligence.com/email
>
>
--=20
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/mysql?unsub=3Dschackenberg@termindoc. de
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg
RE: AW: creating databases in different folders
am 02.06.2009 20:44:36 von Jerry Schwartz
>> [JS] So far as I know, Windows supports mount points but not symbolic
>> links.
>
>You are correct Jerry, Windows does not support symbolic links but for
>MySQL purposes you can create an .sym file containing the full path to
>the
>new location and MySQL will read the file and look in the specified path
>for the database files.
>
[JS] That's great to know, I've never needed that ability so I never looked
into it. I suppose I'll promptly forget it, but you never know what will
stick.
>The procedure is covered in the documentation here
>
>http://dev.mysql.com/doc/refman/5.0/en/windows-symbolic-lin ks.html
>
>>
>>
>>
>>
>> ______________________________________________
>> This email has been scanned by Netintelligence
>> http://www.netintelligence.com/email
>>
>>
>
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org