2nd hard disk for MySQL

erictham

Verified User
Joined
Oct 17, 2004
Messages
26
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 :)
 
Wido said:
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
 
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.
 
Back
Top