10.10 Using symbolic links for databases and tablesYou can move tables and databases from the database directory to other locations and replace them with symbolic links to the new locations. You might want to do this, for example, to move a database to a file system with more free space.
If MySQL notices that a table is a symbolically-linked, it will
resolve the symlink and use the table it points to instead. This works on all
systems that support the
MySQL doesn't support linking of databases by default.
Things will work fine as long as you don't make a symbolic link
between databases. Suppose you have a database shell> cd /path/to/datadir shell> ln -s db1 db2
Now, for any table If you really need this, you must change the following code in `mysys/mf_format.c': if (!lstat(to,&stat_buff)) /* Check if it's a symbolic link */ if (S_ISLNK(stat_buff.st_mode) && realpath(to,buff)) Change the code to this: if (realpath(to,buff)) |