View Full Version : 2nd hard disk for MySQL
erictham
08-09-2006, 09:35 PM
Hi, i have formated and mounted a second harddisk as /home2
How could i transfer all my mySQL storage to this drive?
or
How do i link my first harddisk storage space with the second home?
or
How do i setup another database structure in the second hard disk?
Any suggestsion and advice are welcomed :)
All your MySQL is located under /home/mysql wich is symlinked from /usr/local/mysql/data
Simply move this data to the new partition and change your symlink :)
/etc/init.d/mysql stop
mkdir /home2/mysql
cd /home/mysql
cp -a * /home2/mysql/
cd /usr/local/mysql
rm data
ln -s /home2/mysql data
/etc/init.d/mysql start
Something like that should work :)
jlasman
08-11-2006, 09:55 PM
Originally posted by Wido
All your MySQL is located under /home/mysql wich is symlinked from /usr/local/mysql/data
Not on my systems. If your servers store mysql data in those paths, then it's OS Distribution dependent.
Jeff
existenz
08-12-2006, 06:49 PM
The bottom line is you CAN symlink the old mysql directory to the new drive at a path of your choice. Obviously you need the correct one.
vBulletin® v3.7.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.