List:General Discussion« Previous MessageNext Message »
From:John Daisley Date:June 2 2009 10:30am
Subject:Re: AW: creating databases in different folders
View as plain text  
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@stripped
> 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=1
>
>
> ______________________________________________
> This email has been scanned by Netintelligence
> http://www.netintelligence.com/email
>
>


Thread
creating databases in different foldersFoo JH2 Jun
  • AW: creating databases in different foldersBenedikt Schackenberg2 Jun
    • Re: AW: creating databases in different foldersFoo JH2 Jun
      • AW: AW: creating databases in different foldersBenedikt Schackenberg2 Jun
        • RE: AW: AW: creating databases in different foldersMartin Gainty2 Jun
        • Re: AW: AW: creating databases in different foldersFoo JH2 Jun
      • Re: AW: creating databases in different foldersJohn Daisley2 Jun
        • Re: AW: creating databases in different foldersFoo JH2 Jun
        • RE: AW: creating databases in different foldersJerry Schwartz2 Jun
          • RE: AW: creating databases in different foldersJohn Daisley2 Jun
            • AW: AW: creating databases in different foldersBenedikt Schackenberg2 Jun
            • RE: AW: creating databases in different foldersJerry Schwartz2 Jun
  • Re: AW: creating databases in different foldersMartijn Tonies2 Jun
  • Re: creating databases in different foldersWalter Heck - OlinData.com2 Jun