Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 8 of 8
  1. #1
    Member
    Join Date
    Aug 2008
    Location
    India
    Posts
    210

    Unhappy Need Help To repair 7gb myisam table

    hello guys i need some help to repair one crashed table which is 7+gb in size , i am running latest 5.1.x mysql , type of table is myisam, i tried to repair it using phpmyadmin but i am left with 100% /tmp full issue, my temp is just 5gb in size and its filling up soon, i tried to specify /tmp location in mjy.cnf but it seems not working in mysql 5.1.x please advice how to repair it fast so clients get low down time.

  2. #2
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    6,305
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Need Help To repair 7gb myisam table

    So you did already try in /etc/my.cnf the following under the [mysqld] section:

    tmpdir = /home/mysqltmp

    Then saving the file. At that point, you would create the directory:

    Code:
    mkdir /home/mysqltmp
    chown mysql:mysql /home/mysqltmp
    chmod 1777 /home/mysqltmp
    Then you would restart MySQL and check it did change the tmp directory location:

    Code:
    /etc/init.d/mysql restart
    mysqladmin var | grep tmpdir
    If it were properly changed and the directory existing, then MySQL were restarted, it should work to change the temporary directory for MySQL. I've never seen it not work no matter what MySQL version.
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Forums Technical Analyst, cPanel Tech Support

    Submit a ticket | Check an existing ticket

  3. #3
    Member
    Join Date
    Aug 2008
    Location
    India
    Posts
    210

    Default Re: Need Help To repair 7gb myisam table

    yes i confirmed tmp directory :-

    root@lux [~]# mysqladmin var | grep tmpdir
    | slave_load_tmpdir | /home/mysqltmp |
    | tmpdir | /home/mysqltmp |


    but still as i start repair temp is starting to fill within minutes of repair it already reached 60% so i had to stop repair again and rechecked /tmp disk usage is back to 3% of 5gb
    Last edited by bhanuprasad1981; 06-23-2011 at 10:51 PM.

  4. #4
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    6,305
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Need Help To repair 7gb myisam table

    Can you temporarily re-size your tmp to be larger to allow repairing it?
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Forums Technical Analyst, cPanel Tech Support

    Submit a ticket | Check an existing ticket

  5. #5
    Member
    Join Date
    Aug 2008
    Location
    India
    Posts
    210

    Default Re: Need Help To repair 7gb myisam table

    tried already, securetemp is not working well with 15gb config i am ending up with some error while creating /var/tmp

  6. #6
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    6,305
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Need Help To repair 7gb myisam table

    Can you copy the database to another machine where you repair it there? A machine that doesn't have a separate /tmp at all possibly (such as a test machine).
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Forums Technical Analyst, cPanel Tech Support

    Submit a ticket | Check an existing ticket

  7. #7
    Member
    Join Date
    Aug 2008
    Location
    India
    Posts
    210

    Default Re: Need Help To repair 7gb myisam table

    i dont have separate test machines, but i have another server where temp is 10gb in size, how can i copy this db to that server ?

  8. #8
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    6,305
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Need Help To repair 7gb myisam table

    You can copy the database with this command:

    Code:
    mysqldump --add-drop-table dbname | gzip > /home/dbname.sql.gz
    Here replace dbname with the full name of the database.

    On the other machine after copying the file over to it, you can restore the database using this command:

    Code:
    gunzip < /home/dbname.sql.gz | mysql -u root -p
    You will need the MySQL root password to run this. You can grab it on the new machine using:

    Code:
    cat /root/.my.cnf
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Forums Technical Analyst, cPanel Tech Support

    Submit a ticket | Check an existing ticket

Similar Threads & Tags
Similar threads

  1. Replies: 5
    Last Post: 07-15-2011, 06:11 AM
  2. Change database from myisam to innodb
    By boyforeigner in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 01-27-2008, 04:07 PM
  3. MYISAM file type
    By novel in forum Database Discussions
    Replies: 0
    Last Post: 12-22-2005, 02:41 PM
  4. Transfer of a site over 7GB
    By Mysteerie in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 07-10-2005, 12:47 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube