1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

How To move data directory /var/lib/mysql

Discussion in 'Plesk 10.x for Linux Issues, Fixes, How-To' started by Rocket32, Feb 26, 2011.

  1. Rocket32

    Rocket32 Guest

    0
     
    How do I move the mysql data directory to another the partition of the https directory or where the hosting allows me a large amount of space? My mysql data is large and causes problems. How do I move the data from /var/lib/mysql directory to another partition or create one? I am only allowed so much space in /var directory which is part of root partition. I have 400G of Disk Space and only 4 Gigs of Ram which is where the mysql data directory is located, taking up a large amount of that Ram space on each new mysql database install that has space. I would like to move the mysql data directory and/or whatever other files needed to be moved to the Server Disk Drive space I have on this account which is 400G.
     
    Last edited by a moderator: Feb 26, 2011
  2. Rocket32

    Rocket32 Guest

    0
     
    Any Insight

    Do anyone have any insight on this problem?
     
  3. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,576
    Likes Received:
    1,244
    Location:
    Novosibirsk, Russia
    It is specified in /etc/my.cnf as

    datadir=/var/lib/mysql
     
  4. Rocket32

    Rocket32 Guest

    0
     
    My question is can I change it in my.cnf without interfering or messing up the current local mysql databases. I am trying to put it on another partition which is not limited to space. Also, how do I put it on another partition where the sites are or the 400GB space on my server account? I just want to move it because the partition it is on only allows 4GB. My mysql databases require a lot of space which eats up this 4G on the same partition.
     
  5. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,576
    Likes Received:
    1,244
    Location:
    Novosibirsk, Russia
    You can mount your another partition to /var/lib/mysql mount point at least. Look at common Linux mount documentation and /etc/fstab file.
     
Loading...