[Tuxaloosa] install mysql in non-default location

E Hanson leprkhn at gmail.com
Mon Nov 17 23:25:22 UTC 2008


looking at these settings in my.cnf, i wonder if i should recreate the 
same directory structure. (i.e. pid-file is currently set to 
/var/run/mysql/mysqld.pid. when changing it run in /mnt/raid should i 
have it run in /mnt/raid/var/run/mysql/mysqld.pid?)
shoulld i just set them all to /mnt/raid?
i know that /var/lib/mysql (current datadir) has other files in it. do i 
need to move those files? link to those files?

e hanson

Mark Greene wrote:
> Interesting question. I never thought about but I'm sure I will need this answer in the future. Its looking like you need to simply edit your 'my.conf' file for mysql, which is typically located in the root of /etc. 
>
> Change the path of the following:
> pid-file=
> datadir=
> basedir=
>
> There you go. If you already have this in production simply copy everything from the original paths into the new paths. I would use rsync -a to preserve file attributes. 
>
> Restart mysql when you're done of course. 
>
> ------Original Message------
> From: E Hanson
> Sender: tuxaloosa-bounces at tuxaloosa.org
> To: Tuscaloosa Linux Users Group
> ReplyTo: Tuscaloosa Linux Users Group
> Sent: Nov 17, 2008 4:21 PM
> Subject: [Tuxaloosa] install mysql in non-default location
>
> i'm setting up vtigerCRM on Debian Etch.
> the box has an old RAID card in it that i have 2x80G IDE-100 in raid1 
> set up with dmraid.
> OS is running on a separate 40G HD.
> for the purpose of data redundancy i want the database running (or 
> stored?) in the array.
> so... how do i set up mysql to do this?
>
> is this really what i want?
> RAID is /dev/dm-0 mounted at /mnt/raid
> i've never done anything like this before, so any input is very welcome.
>
> erik hanson
> _______________________________________________
> TUXaloosa mailing list
> TUXaloosa at tuxaloosa.org
> http://tuxaloosa.org/mailman/listinfo/tuxaloosa
>
> _______________________________________________
> TUXaloosa mailing list
> TUXaloosa at tuxaloosa.org
> http://tuxaloosa.org/mailman/listinfo/tuxaloosa
>
>   



More information about the TUXaloosa mailing list