The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Moving mysql databases

Discussion in 'General Discussion' started by JamesSmith, Oct 21, 2003.

  1. JamesSmith

    JamesSmith Well-Known Member

    Joined:
    Sep 17, 2003
    Messages:
    185
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    UK, Luton
    Hi,

    Currently I believe the mysql databases are in the /var partition. This is almost out of space. Would like to move existing and any to be created databases to /usr/mysql or /usr/home/mysql for example.

    Has anyone attempted this, or if anyone has some instructions on doing this, would be great.

    Server info: WHM 8.4.0 cPanel 8.5.3-S6 FreeBSD 4.8-RELEASE
     
  2. RandyO

    RandyO Well-Known Member

    Joined:
    Jun 17, 2003
    Messages:
    173
    Likes Received:
    0
    Trophy Points:
    16
  3. JamesSmith

    JamesSmith Well-Known Member

    Joined:
    Sep 17, 2003
    Messages:
    185
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    UK, Luton
    hrm.

    That looks a bit simple, are you sure that is 100% how it should be done?

    Just wondering how cpanel knows its been changed ..

    And is mysql stopped before doing any of it?
     
  4. RandyO

    RandyO Well-Known Member

    Joined:
    Jun 17, 2003
    Messages:
    173
    Likes Received:
    0
    Trophy Points:
    16
    Hmm I will see about making it more complicated :D As it is a simple redirect I don't know that mysql needs stopped except to maybe copy the current db's
     
    #4 RandyO, Oct 22, 2003
    Last edited: Oct 22, 2003
  5. JamesSmith

    JamesSmith Well-Known Member

    Joined:
    Sep 17, 2003
    Messages:
    185
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    UK, Luton
    For others to know in the future, I e-mailed cPanel support, who suggested:

    /usr/local/etc/rc.d/mysql-server.sh stop ; mv /var/db/mysql /usr/home ; ln -s /usr/home/mysql /var/db/mysql ; /usr/local/etc/rc.d/mysql-server.sh start

    It worked :)

    Thanks goes to Michael Photakis, cPanel Support Staff.
     
Loading...

Share This Page