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.

Changing MySQL datadir!

Discussion in 'General Discussion' started by beashnet, May 3, 2003.

  1. beashnet

    beashnet Member

    Joined:
    Feb 21, 2003
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Greets;

    I'm running out of space on the partition the MySQL data dir (the db's, that is) is placed on and was wondering if I could move it somehow?

    It's probably a simple command to change dirs (or to edit a line in a conf file?) but I didn't find anything about it on the net.

    Move it as in moving the existing one plus making sure that MySQL places all new dbs/updates/files in the new location.

    Thanks a lot! Quick answer appreciated.

    -Felix
     
  2. now4

    now4 Member

    Joined:
    Jan 17, 2003
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    easy..........

    Use simbolic link.
     
  3. beashnet

    beashnet Member

    Joined:
    Feb 21, 2003
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Nope won't work with symlinks.

    I need to change the datadir variable that Cpanel uses when starting/restarting MySQL but I fear it's hidden in the cp code??

    I did try adding a datadir= var in the my.cnf files under [mysqld] but it stopped working once I removed the old data dir so I suppose it had no effect.

    Would appreciate all and any ideas!

    cPanel.net Support Ticket Number:
     
  4. FWC

    FWC Well-Known Member

    Joined:
    May 13, 2002
    Messages:
    354
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Ontario, Canada
    It does for me. I've been running one server that way for quite a while with no problems.

    cPanel.net Support Ticket Number:
     
Loading...

Share This Page