Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Moving a MySQL installation?



Hunter Heinlen wrote:
> Don Levey wrote:
> 
>> 1) Take the data files and move them wholesale to the new machine.  If 
>> this is possible, everything comes over at once and when I start sqld 
>> everything "just works".
> 
> I did this recently to move a Geeklog site from an old server running 
> RHEL3 to one running RHEL5.  Worked fairly well, assuming that you are 
> not making big jumps in the versions of mysql you are using.
> 
I'm coming from Fedora Core 4 to CentOS 5 (RHEL5).  That translates as 
MySQL 4.1.20 to 5.0.22.

>> If #1 is a possibility, what files should I move over?
> 
> /var/lib/mysql and its children is the most likely candidate.  Look for 
> the data directory in /etc/my.cnf to find out for certain.  Also, be 
> aware that sockets will not be moved by scp, tar, etc, and they are not 
> always recreated if you just /etc/init.d/mysqld restart.  Many programs 
> connect to mysql through a socket, and some distros put it into 
> /var/lib/mysql instead of the safer /tmp.
> 
> Hunter

Cool - I can do that.  I tend to put all my sockets in /var/run if I 
can, so that they're all in one place.  I've not seen anything that 
doesn't recreate the sock file upon restart, but that doesn't mean it 
doesn't happen.  Thanks!
  -Don

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.





BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org