malachor
Verified User
quick question...
what exactly does this do?
I just setup a second drive as home2 and if i change this slightly i can have it relocate mysql dir, and make more space... would it look like;
I think this would be right because my new drive is "home2"
what exactly does this do?
Code:
cd /home
mkdir mysql
chown mysql:mysql mysql
cd mysql
/sbin/service mysqld stop
cp -Rp /var/lib/mysql/* .
cd /var/lib
mv mysql mysql_old
ln -s /home/mysql ./mysql
/sbin/service mysqld start
#once satisfied that mysqld is running, remove the old data:
rm -rf mysql_old
I just setup a second drive as home2 and if i change this slightly i can have it relocate mysql dir, and make more space... would it look like;
Code:
cd /home2
mkdir mysql
chown mysql:mysql mysql
cd mysql
/sbin/service mysqld stop
cp -Rp /var/lib/mysql/* .
cd /var/lib
mv mysql mysql_old
ln -s /home2/mysql ./mysql
/sbin/service mysqld start
#once satisfied that mysqld is running, remove the old data:
rm -rf mysql_old
I think this would be right because my new drive is "home2"