Results 1 to 7 of 7

Thread: Move mysql to other disk

  1. #1
    Join Date
    Apr 2012
    Posts
    2

    Move mysql to other disk

    Hello,

    in default DA store mysql data in /home/mysql. My sda is getting too slow so i bought ssd disk and mount it as /mysql/. How can i move mysql to new drive ?

  2. #2
    Join Date
    Apr 2005
    Location
    GMT +7.00
    Posts
    11,023
    Hello,

    Why don't you mount it as /home/mysql ?

    1. Mount ssd disk as /home/mysql-tmp
    2. Stop MySQL server
    3. Move /home/mysql/* to /home/mysql-tmp
    4. Unmount /home/mysql-tmp
    5. Mount ssd disk as /home/mysql
    6. Start MySQL server.
    With regards, Alex.

    Professional Server Management for web hosting companies and individuals
    Hourly Support, Disaster Recovery, Server Hardening, Monthly Subscription
    Directadmin installation and optimization

    Click here if you need a Linux Admin

  3. #3
    Join Date
    Jun 2003
    Location
    California
    Posts
    26,123
    Quote Originally Posted by Smugg View Post
    in default DA store mysql data in /home/mysql.
    Not on my machines. Which OS do you run?

    Jeff
    +1 951 643-5345
    Third-Party DirectAdmin administration and support
    Dedicated Servers, Dedicated Reseller Accounts
    NoBaloney Internet Services div. Qnito Incorporated
    848 North Rainbow Blvd., Suite #3789
    Las Vegas, NV 89107-1103

  4. #4
    Join Date
    Apr 2005
    Location
    GMT +7.00
    Posts
    11,023
    @Jeff,

    It's FreeBSD I guess, mysql data on FreeBSD boxes is stored in /home/mysql
    With regards, Alex.

    Professional Server Management for web hosting companies and individuals
    Hourly Support, Disaster Recovery, Server Hardening, Monthly Subscription
    Directadmin installation and optimization

    Click here if you need a Linux Admin

  5. #5
    Join Date
    Jun 2003
    Location
    California
    Posts
    26,123
    Then for the sake of completeness, let's add that if you want to save mysql databases to a different disk/partition on CentOS or Red Hat Enterprise Linux, you should instead mount the new disk/partition to an empty /var/lib/mysql mountpoint.

    I can't advise for Debian, because I'm not running it; perhaps somone else will add the correct location under Debian to the thread.

    Jeff
    +1 951 643-5345
    Third-Party DirectAdmin administration and support
    Dedicated Servers, Dedicated Reseller Accounts
    NoBaloney Internet Services div. Qnito Incorporated
    848 North Rainbow Blvd., Suite #3789
    Las Vegas, NV 89107-1103

  6. #6
    Join Date
    Apr 2005
    Location
    GMT +7.00
    Posts
    11,023
    OK, Debian keeps MySQL data the same way as FreeBSD in /home/mysql
    With regards, Alex.

    Professional Server Management for web hosting companies and individuals
    Hourly Support, Disaster Recovery, Server Hardening, Monthly Subscription
    Directadmin installation and optimization

    Click here if you need a Linux Admin

  7. #7
    Join Date
    Apr 2012
    Posts
    2
    Thanks for help

    i simply mount ssd as /home/mysql

Similar Threads

  1. Move mysql database to another user
    By ranz in forum MySQL / PHP
    Replies: 48
    Last Post: 08-10-2015, 03:11 PM
  2. Safe to move mysql datadir to /var/lib/mysql ?
    By ArgonX in forum Debian 6.0
    Replies: 4
    Last Post: 06-26-2011, 04:30 PM
  3. how to move data and all config from /home to new disk
    By cing99 in forum DirectAdmin General Discussion
    Replies: 0
    Last Post: 08-22-2009, 07:59 PM
  4. move to another disk
    By vagos in forum Installation / System Requirements
    Replies: 2
    Last Post: 07-20-2008, 08:12 AM
  5. Move MYSQL
    By Titam in forum General Technical Discussion & Troubleshooting
    Replies: 7
    Last Post: 08-24-2005, 03:56 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •