Oracle 5.0 Reference Manual page 748

Table of Contents

Advertisement

These table symlink operations are not supported:
ALTER TABLE
BACKUP TABLE
• As indicated previously, only the data and index files can be symbolic links. The
never be a symbolic link. Attempting to do this (for example, to make one table name a synonym
for another) produces incorrect results. Suppose that you have a database
data directory, a table
points to tbl1:
shell>
cd /path/to/datadir/db1
shell>
ln -s tbl1.frm tbl2.frm
shell>
ln -s tbl1.MYD tbl2.MYD
shell>
ln -s tbl1.MYI tbl2.MYI
Problems result if one thread reads
• The query cache is "fooled" (it has no way of knowing that
returns outdated results).
ALTER
8.9.6.3. Using Symbolic Links for Databases on Windows
On Windows, symbolic links can be used for database directories. This enables you to put a database
directory at a different location (for example, on a different disk) by setting up a symbolic link to it. Use
of database symlinks on Windows is similar to their use on Unix, although the procedure for setting up
the link differs.
Suppose that you want to place the database directory for a database named
To do this, create a symbolic link in the MySQL data directory that points to D:\data\mydb. However,
before creating the symbolic link, make sure that the
necessary. If you already have a database directory named
\data. Otherwise, the symbolic link will be ineffective. To avoid problems, make sure that the server is
not running when you move the database directory.
On Windows, create a symbolic link to a MySQL database by creating a
that contains the path to the destination directory. The file should be named db_name.sym, where
is the database name.
db_name
Support for database symbolic links on Windows using
need
.sym
symbolic-links
check the value of the
SHOW VARIABLES LIKE 'have_symlink';
To create a
1. Change location into the data directory:
C:\>
cd \path\to\datadir
2. In the data directory, create a text file named
\mydb\
ignores the
DATA DIRECTORY
and
RESTORE TABLE
in this database, and in the
tbl1
statements on
fail.
tbl2
file symbolic links, you can disable support for them by starting
[421]
option. To determine whether your system supports
have_symlink
file symlink, use this procedure:
.sym
Note
The path name to the new database and tables should be absolute. If you
specify a relative path, the location will be relative to the
Using Symbolic Links
and
INDEX DIRECTORY
do not respect symbolic links.
and another thread updates db1.tbl2:
db1.tbl1
D:\data\mydb
.sym
[455]
system variable using this statement:
mydb.sym
728
table options.
db1
directory you make a symlink
db1
has not been updated, so it
tbl1
mydb
directory exists by creating it if
in the data directory, move it to
mydb
file in the data directory
.sym
files is enabled by default. If you do not
mysqld
.sym
that contains this path name:
mydb.sym
file must
.frm
under the MySQL
that
tbl2
at D:\data\mydb.
D:
with the
--skip-
file symbolic links,
D:\data
file.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents