Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Member
    Join Date
    Oct 2004
    Posts
    65

    Angry cpbackup toasted tables in MySQL :| not cool

    Last night I was browsing through my cron/cpbackup log and noticed some disturbing information.

    Appears cpbackup tried to dump a minor size database and locked the tables so they are unlockable. I went in and tried to unlock them from phpMyAdmin and nothing works.

    Luckly two of the three affected databases were only on my site, not customers and I had a local database to restore the tables I had to remove and put back.

    This is the error I got in my email from cron.
    mysqldump: Got error: 1017: Can't find file: 'orders_pay_methods.MYI' (errno: 2) when using LOCK TABLES
    mysqldump: Got error: 1017: Can't find file: 'active_sessions.MYI' (errno: 2) when using LOCK TABLES
    mysqldump: Got error: 1017: Can't find file: 'orders_pay_methods.MYI' (errno: 2) when using LOCK TABLES .........
    Done

    For 'active_sessions' is only one of a few 100 tables that got locked in that database.

    Seems like all the MYI files are missing out of the database root folder.

    Has this happened to anyone ever?


    Server Info
    Redhate EL3 2.4.21-32.0.1.ELsmp
    Apache 1.33 php 4.3.10 mysql (4.1.13-standard)

    Dual Xeon 2.8 HT w/ 1GB


    Also I notice my Apache Status in WHM is not working anymore too.

  2. #2
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    Could it be that your /tmp partition is running out of space overnight? Since the temporary MySQL files are stored in /tmp I have seen similar issues happen when /tmp has insufficient space to accomodate them. These days, you're going to need around 1GB for /tmp I've found and keep it neat and tidy.

    If that's defintiely not it, then ignore me
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  3. #3
    Member
    Join Date
    Oct 2004
    Posts
    65

    Default /tmp

    I have a full 1GB of TMP space...

  4. #4
    Member dynaweb's Avatar
    Join Date
    May 2003
    Location
    Oregon
    Posts
    55

    Default

    The MySQL files are stored under /var/lib/mysql and sometimes /var is mounted on separate partition (like /tmp mentioned abover) and can also run out of space. Any issue there you think?

  5. #5
    Member
    Join Date
    Oct 2004
    Posts
    65

    Default Nope

    Quote Originally Posted by dynaweb
    The MySQL files are stored under /var/lib/mysql and sometimes /var is mounted on separate partition (like /tmp mentioned abover) and can also run out of space. Any issue there you think?
    I have total control server that is Dual Xeon 2.8 with 160GB storage...and a handful of web sites on them. Drive space is very free in all areas except boot is getting a bit cluttered.

  6. #6
    Member dynaweb's Avatar
    Join Date
    May 2003
    Location
    Oregon
    Posts
    55

    Default

    Whan you are trying to unlock from phpmyadmin, what user are you logged in as? Try root?

    Also, have you tried /scripts/fixmysql ?

  7. #7
    Member Planet_Master's Avatar
    Join Date
    Apr 2002
    Location
    New Yorker
    Posts
    260

    Lightbulb

    As mentioned above, go to your /var/lib/mysql and see if the database and the MYI files exist. If they do there may be corruption in the tables creating the errors.

    Try fixing the database using safe mode:

    At root shell stop the following services
    /etc/rc.d/init.d/chkservd stop
    /etc/rc.d/init.d/mysql stop

    Change directory
    cd /var/lib/mysql

    Then scan the database files for errors:
    myisamchk -cs databasename/*.MYI

    You will know from the output if there are errors. Run the following to fix the tables
    myisamchk -o databasename/*.MYI

    We use -o as the option because we want to use a safe mode fix.

    restart the services
    /etc/rc.d/init.d/chkservd start
    /etc/rc.d/init.d/mysql start

    you may want to restart MySQL from WHM or at the command line as well
    /scripts/restartsrv mysql

    Tell us the results.
    Vision Plateau Web Services - Total Control Hosting
    http://www.visionplateau.com

Similar Threads & Tags
Similar threads

  1. Federated Tables in MySQL
    By Nikoms in forum cPanel and WHM Discussions
    Replies: 8
    Last Post: 11-20-2007, 10:11 AM
  2. Mysql Tables disappeared
    By bryanabhay in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 11-17-2007, 11:34 AM
  3. Deleting the MYSQL tables :|
    By Grzeslaw in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 03-01-2007, 11:16 AM
  4. MailScanner MySQL Tables
    By kaspersetz in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 11-29-2006, 03:33 AM
  5. !!!mysql Tables are disappearing!!!
    By Berbox in forum cPanel and WHM Discussions
    Replies: 10
    Last Post: 11-16-2006, 10:10 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube