Hi. I want to move my MySQL databases to another partition. I thought of just moving them and creating a symlink to the files. What I wanted to know is this. How can I make sure that databases created will also be in the new partition but symlinks are still created in the /var/lib/mysql directory. For example. Say my new DB path is /new/mysql I create a symlink in /var/lib to /new/mysql. If I do a create database statement, will the files go into /new/mysql and a symlink be created in /var/lib/mysql. I hope you understand my question. Thanks Ray Booysen
On Sun, Aug 25, 2002 at 10:19:37PM +0200, Ray Booysen wrote:
Hi. I want to move my MySQL databases to another partition. I thought of just moving them and creating a symlink to the files. What I wanted to know is this. How can I make sure that databases created will also be in the new partition but symlinks are still created in the /var/lib/mysql directory.
Don't make separate soft links for each database, but instead make a soft link for the whole /var/lib/mysql directory. Here is some info from my system where I do just that: # cd /var/lib # ls -l mysql mysql -> /home/mysql I did this for backup purposes -- I wanted the mysql data to be on the same filesystem as my home directories. I set this up when I first installed by doing something like the following: # cd /var/lib # mv mysql mysql-orig # mkdir /home/mysql # ln -s /home/mysql mysql # cp -ax mysql-orig/* mysql/ -- Robert C. Paulsen, Jr. robert@paulsenonline.net
participants (2)
-
Ray Booysen
-
Robert C. Paulsen Jr.