LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-17-2014, 03:47 AM   #1
shahriar57
LQ Newbie
 
Registered: Mar 2014
Posts: 2

Rep: Reputation: Disabled
Move Site and Mysql to other Partition in linux


Hello ,

I want to move my site and mysql from root partition to other partition ,

i need more space for my website and root partition dosent have enough space and every time mysql crash

Filesystem Size Used Avail Use% Mounted on
/dev/sda1 5.6G 4.9G 418M 93% /
tmpfs 1.1G 0 1.1G 0% /lib/init/rw
udev 1.1G 115k 1.1G 1% /dev
tmpfs 1.1G 0 1.1G 0% /dev/shm
/dev/sda6 15G 180M 14G 2% /home
/dev/sdb1 22G 181M 20G 1% /site

im using debian ,
any advise ?
 
Old 03-17-2014, 04:00 AM   #2
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,275

Rep: Reputation: 148Reputation: 148
Mysql
1. Try to copy the entire datadir in new path
2. Change in my.cnf the new datadir path
3. Restart the mysql

Webserver
1. Copy all the files in new location
2. Change the Documentroot in configuration
3. Reload the webserver
 
1 members found this post helpful.
Old 03-17-2014, 04:11 AM   #3
shahriar57
LQ Newbie
 
Registered: Mar 2014
Posts: 2

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by kirukan View Post
Mysql
1. Try to copy the entire datadir in new path
2. Change in my.cnf the new datadir path
3. Restart the mysql

I have many mysql directory , which one i have to copy ?

Webserver
1. Copy all the files in new location
2. Change the Documentroot in configuration
3. Reload the webserver
can you tell me about my.cnf file more and where is the location of it ?
 
Old 03-17-2014, 04:16 AM   #4
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,275

Rep: Reputation: 148Reputation: 148
Not sure about your setup, However..
1. find / -name my.cnf (mostly it is in /etc/my.cnf)
2. vi the file and search "datadir"
 
1 members found this post helpful.
Old 03-17-2014, 04:04 PM   #5
joe_2000
Member
 
Registered: Jul 2012
Location: Aachen, Germany
Distribution: Void, Arch, Debian
Posts: 859

Rep: Reputation: 245Reputation: 245Reputation: 245
Quote:
Originally Posted by kirukan View Post
Mysql
1. Try to copy the entire datadir in new path
2. Change in my.cnf the new datadir path
3. Restart the mysql

Webserver
1. Copy all the files in new location
2. Change the Documentroot in configuration
3. Reload the webserver
As an alternative to this (valid) advice you could also mount the new locations to the old ones. That way you can avoid changing any configuration files...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to move grub to my linux partition spacepigeon Linux - Newbie 4 07-04-2008 08:58 PM
How to move unused windows partition to linux partition? aribowo SUSE / openSUSE 3 05-29-2007 12:51 AM
Help me move a web site from Windows to Linux Rotwang Linux - Software 1 03-29-2005 02:55 AM
move xp partition for linux davidleroux1 Linux - Software 4 11-27-2004 04:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration