Oracle 5.0 Reference Manual page 747

Table of Contents

Advertisement

that you have a database
points to db1:
shell>
cd /path/to/datadir
shell>
ln -s db1 db2
The result is that, or any table
client updates
8.9.6.2. Using Symbolic Links for
Symlinks are fully supported only for
you may get strange problems if you try to use symbolic links.
Do not symlink tables on systems that do not have a fully operational
Solaris support realpath()). To determine whether your system supports symbolic links, check the
value of the
SHOW VARIABLES LIKE 'have_symlink';
The handling of symbolic links for
• In the data directory, you always have the table format (.frm) file, the data (.MYD) file, and the index
(.MYI) file. The data file and index file can be moved elsewhere and replaced in the data directory by
symlinks. The format file cannot.
• You can symlink the data file and the index file independently to different directories.
• To instruct a running MySQL server to perform the symlinking, use the
INDEX DIRECTORY
Alternatively, if
the command line.
myisamchk
which the symlink points. Any temporary files are created in the directory where the data file or index
file is located. The same is true for the
statements.
• If you rename a table with
the table to another database, the symlinks in the database directory are renamed to the new names
and the data file and index file are renamed accordingly.
• If you use
the table is moved to the other database directory. If the table name changed, the symlinks in the
new database directory are renamed to the new names and the data file and index file are renamed
accordingly.
• If you are not using symlinks, start
ensure that no one can use
under the MySQL data directory, and then make a symlink
db1
tbl_a
and another client updates db2.tbl_a, problems are likely to occur.
db1.tbl_a
MyISAM
[455]
system variable using this statement:
have_symlink
MyISAM
options to
CREATE
is not running, symlinking can be accomplished manually using
mysqld
Note
Beginning with MySQL 5.0.60, the path used with either or both of the
and
DIRECTORY
directory. (Bug #32167)
data
does not replace a symlink with the data file or index file. It works directly on the file to
Note
When you drop a table that is using symlinks, both the symlink and the file
to which the symlink points are dropped. This is an extremely good reason
not to run
mysqld
access to MySQL database directories.
ALTER TABLE ... RENAME
ALTER TABLE ... RENAME
mysqld
Using Symbolic Links
in db1, there also appears to be a table
Tables on Unix
tables. For files used by tables for other storage engines,
MyISAM
tables works as follows:
TABLE. See
Section 13.1.10,
INDEX DIRECTORY
ALTER
TABLE,
OPTIMIZE
as the system
root
or
RENAME TABLE
with the
mysqld
--skip-symbolic-links
to drop or rename a file outside of the data directory.
727
tbl_a
realpath()
DATA DIRECTORY
"CREATE TABLE
options may not include the MySQL
TABLE, and
REPAIR TABLE
or permit system users to have write
or
and you do not move
RENAME TABLE
to move a table to another database,
that
db2
in db2. If one
call. (Linux and
and
Syntax".
from
ln -s
DATA
[421]
option to

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents