How to move mysql to another partition on ubuntu server
Im preparing for my install of DRBD for a database application and I have just setup a new partition on my ubuntu server hard drive that I would like mysql database to reside on. Right now I did the initial install of ubuntu server with the LAMP installation so the database is already on the server. How do I move the database and all of its files to my new partition? Below is my printout of fdisk -l
Disk /dev/sda: 146.8 GB, 146809028608 bytes
255 heads, 63 sectors/track, 17848 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00055edd
Device Boot Start End Blocks Id System
/dev/sda1 * 1 17464 140279548+ 83 Linux
/dev/sda2 17472 17848 3028252+ 5 Extended
/dev/sda3 17465 17471 56227+ 83 Linux
/dev/sda5 17472 17848 3028221 82 Linux swap / Solaris
I would like mysql to be moved to sda3 instead of sda1. Thanks
shutdown mysql, pack every thing in /var/lib/mysql, mount /dev/sda3 to /var/lib/mysql untar everything, start mysql and the data should be moved to an extra parition. So you can also replace this mountpoint with drdb mount point.
0
tupac1979Author Commented:
hernst42 thanks I know your instructions are good but Im a beginner so can you provide me a few commands and then that will be all I need. Thanks
ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.
One of a set of tools we're offering as a way to say thank you for being a part of the community.