Our I.T. dept would like me to configure a MySQL server to use a non-default data dir (/data).
We're using MySQL 5.0.45-7.el5 on RHEL 5.
What is the general procedure for doing that?
Are there any caveats or gotchas I should know about before I get started?
What about RHEL's packaging system. Will it be harder to update the MySQL package if the data dir is not in its default location?
The easiest thing would be to stop mysql, move the files to the new folder and make a symlink from the default to the new folder.
If it's a separate drive you can just change the mount point to the default location as well:
EDIT: Here's the line from my /etc/fstab
You shouldn't have any trouble updating the packages either mounting at the default location, using links or changing the location in the my.cnf file.
EDIT: Here are the items that you would edit in your my.cnf: