Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Change mysql database directory

Discussion in 'General Discussion' started by Kailash1, Mar 19, 2008.

  1. Kailash1

    Kailash1 Well-Known Member

    Joined:
    Nov 27, 2006
    Messages:
    253
    Likes Received:
    2
    Trophy Points:
    168
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hi,

    I have stored Mysql database in /var/lib/mysql location and now /var is about to reach its allocated space. Is there any way I can change the location and move the existing Mysql databases to new location?

    Thanks,

    Kailash
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,216
    Likes Received:
    10
    Trophy Points:
    313
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    This thread may help: http://forums.cpanel.net/showthread.php?t=71424

    That thread also links to another thread that may help.
     
  3. Marty

    Marty Well-Known Member

    Joined:
    Oct 10, 2001
    Messages:
    630
    Likes Received:
    1
    Trophy Points:
    318
    cd /var/lib

    service chkservd stop

    service mysql stop

    mv mysql /home

    ln -s /home/mysql mysql

    service mysql start

    service chkservd start

    That is the way I do it. Use at your own risk. I think I have ln -s command correct.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    jugo likes this.
  4. Kailash1

    Kailash1 Well-Known Member

    Joined:
    Nov 27, 2006
    Messages:
    253
    Likes Received:
    2
    Trophy Points:
    168
    cPanel Access Level:
    Root Administrator
    Twitter:
    Thanks David and Marty.

    And sorry for the duplicate post.

    Kailash
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. Kailash1

    Kailash1 Well-Known Member

    Joined:
    Nov 27, 2006
    Messages:
    253
    Likes Received:
    2
    Trophy Points:
    168
    cPanel Access Level:
    Root Administrator
    Twitter:
    Will it create any problem taking cPnel backup (including MySQL databases) after changing the location of MySQL databases.

    Thanks,

    Kailash
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. Marty

    Marty Well-Known Member

    Joined:
    Oct 10, 2001
    Messages:
    630
    Likes Received:
    1
    Trophy Points:
    318
    No, the backups will follow the symlink, so there is no problem at all.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. Kailash1

    Kailash1 Well-Known Member

    Joined:
    Nov 27, 2006
    Messages:
    253
    Likes Received:
    2
    Trophy Points:
    168
    cPanel Access Level:
    Root Administrator
    Twitter:
    Thanks Marty,

    Kailash
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. jugo

    jugo Active Member

    Joined:
    Nov 23, 2005
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    156
    Worked for me....

    Thanks.:D
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice