
Originally Posted by
ASTRAPI

Originally Posted by
boatdesign
ln -s /path/to/mysqlnewdirectory mysqlolddirectory
The example posted by boatdesign is valid. Here is another example just for clarification; as a precaution I've added an additional option "-n" and enabled verbose output:
Code:
# ln -nsv /new/path/to/mysql /old/path/to/mysql
For usage information I recommend referring to the manual "man" page and help documentation for "ln":
Code:
# man ln
# ln --help
If the MySQL data directory was moved to a directory path at "/new/mysql/" and if the old location is the same as the stock-default (at "/var/lib/mysql/"), the command to create a symlink could look like the following:
Code:
# ln -nsv /new/mysql /var/lib/mysql
Warning: Any changes to the MySQL data directory should be performed only while MySQL is shutdown.