[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Beginning with MySQL Version 3.23.16, the mysqld-max
and mysql-max-nt
servers in the MySQL distribution are
compiled with the -DUSE_SYMDIR
option. This allows you to put a
database directory on a different disk by setting up a symbolic link to it.
This is similar to the way that symbolic links work on Unix, though the
procedure for setting up the link is different.
On Windows, you make a symbolic link to a MySQL database by creating a file
that contains the path to the destination directory. Save the file in
the data directory using the filename `db_name.sym', where
db_name
is the database name.
For example, if the MySQL data directory is `C:\mysql\data'
and you want to have database foo
located at `D:\data\foo',
you should create the file `C:\mysql\data\foo.sym' that contains
the pathname D:\data\foo\
. After that, all tables created in
the database foo
will be created in `D:\data\foo'.
The `D:\data\foo' directory must exist for this to work. Also,
note that the symbolic link will not be used if a directory with
the database name exists in the MySQL data directory. This means
that if you already have a database directory named `foo' in
the data directory, you must move it to `D:\data' before the
symbolic link will be effective. (To avoid problems, the server
should not be running when you move the database directory.)
Note that because of the speed penalty you get when opening every table, we have not enabled this by default even if you have compiled MySQL with support for this. To enable symlinks you should put in your `my.cnf' or `my.ini' file the following entry:
[mysqld] symbolic-links |
In MySQL 4.0, symbolic links are enabled by default. If you don't need them,
you can disable them with the skip-symbolic-links
option.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |