Home Page

Contact Me

MAC OS X

Linux

Linux Servers Fedora Core 4

Linux Servers - CentOS

Linux Servers Fedora Core 5

Linux Servers Fedora Core 7

Linux Servers Fedora 8

OpenWRT

NSLU2

LinuxCluster

Hardware Hacking Projects

Speaker Building Projects

Electronics Projects

Other Sites





Linux /

Status

  • DONE

Introduction

This quick HOWTO covers moving Mysql's database storage to a different location.

Moving Mysql's Databases

First we need to stop mysql if it is running. Type the following:
> service mysqld stop

Next copy the data to the new location and fix the ownership.
> cp -R /var/lib/mysql /home/
> mv /home/mysql /home/databases
> chown -R mysql:mysql /home/databases

Save the old databases directory.
> mv /var/lib/mysql/ /var/lib/mysql_old

Now we need to take care of the needs of some scripts that may not know the data has been moved.
> ln -s /home/databases/ /var/lib/mysql
> chown mysql:mysql /var/lib/mysql

Finally we can restart Mysql. Type the follwoing:
> service mysqld start

Conclusion

Enjoy

Comments

Add Comment 
Sign as Author 
Enter code 582

btsffniid?27 August 2011, 01:16

wfCXyu <a href="http://ypqlwmrpuwfd.com/">ypqlwmrpuwfd</a>


Google
 
Theme by Richard Camp
(C) Copyright 1996-2007 by Richard Camp All rights reserved