The mysqld-max and
mysql-max-nt
servers for Windows 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, although the procedure for
setting up the link is different.
In MySQL 5.0, symbolic links are enabled by default. If you do
not need them, you can disable them with the
skip-symbolic-links
option:
[mysqld] skip-symbolic-links
On Windows, you create a symbolic link to a MySQL database by
creating a file in the data directory that contains the path
to the destination directory. The file should be named
db_name.sym
, where
db_name
is the database name.
Suppose that the MySQL data directory is
C:\mysql\data
and you want to have
database foo
located at
D:\data\foo
. Set up a symlink as shown
here:
Make sure that the D:\data\foo
directory exists by creating it if necessary. If you have
a database directory named foo
in the
data directory, you should move it to
D:\data
. Otherwise, the symbolic link
is ineffective. To avoid problems, the server should not
be running when you move the database directory.
Create a text file
C:\mysql\data\foo.sym
that contains
the pathname D:\data\foo\
.
After this, all tables created in the database
foo
are created in
D:\data\foo
. Note that the symbolic link
is not used if a directory with the same name as the database
exists in the MySQL data directory.
Ésta es una traducción del manual de referencia de MySQL, que puede encontrarse en dev.mysql.com. El manual de referencia original de MySQL está escrito en inglés, y esta traducción no necesariamente está tan actualizada como la versión original. Para cualquier sugerencia sobre la traducción y para señalar errores de cualquier tipo, no dude en dirigirse a mysql-es@vespito.com.