1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Mysql db got corrupted

Discussion in 'MySQL' started by Dejavu, Oct 11, 2005.

  1. #1
    On one of my sites, one of the tables got corrupted. 2nd time now in a short while this happened. First time took me forever to figure out the problem and fix it (If you ever get a message tablename.myi error or similar, this means the tables are corrupt, and a simple repair table tablename fix it)

    Anyhow do anyone have any ideas why this might have happened? Will moving the site to another server help improve the situation?
    thanks
     
    Dejavu, Oct 11, 2005 IP
  2. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #2
    Did mysqld crash? What's the uptime on the mysqld process?
     
    digitalpoint, Oct 11, 2005 IP
  3. Dejavu

    Dejavu Peon

    Messages:
    916
    Likes Received:
    53
    Best Answers:
    0
    Trophy Points:
    0
    #3
    How do I check that? (I'm on shared hosting)
     
    Dejavu, Oct 11, 2005 IP
  4. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #4
    If you have access to phpmyadmin, go to "Show MySQL runtime information", the first line will tell you how long the server has been running.
     
    digitalpoint, Oct 11, 2005 IP
  5. Dejavu

    Dejavu Peon

    Messages:
    916
    Likes Received:
    53
    Best Answers:
    0
    Trophy Points:
    0
    #5
    The only option I see is 'Show processes', and it gives me the following
    Show Full Queries ID User Host Database Command Time Status SQL query
    Kill 8694 onlylyri localhost None Query 0 --- SHOW PROCESSLIST


    The server load is going from 2.2 to 4.5. I noticed earlier that tomcat failed - I dont even really know what that means.
     
    Dejavu, Oct 11, 2005 IP
  6. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #6
    It would be on the main screen of phpmyadmin. If you don't have access to that, run this query on the server:
    SHOW STATUS LIKE 'Uptime';
    Code (sql):
    and look at the record it returns (it will be uptime in seconds).
     
    digitalpoint, Oct 11, 2005 IP
  7. Dejavu

    Dejavu Peon

    Messages:
    916
    Likes Received:
    53
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Dejavu, Oct 11, 2005 IP
  8. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #8
    Yeah... looks like either the server crashed or was rebooted hard without shutting down mysqld (or at the very least the mysqld process) since it's only been up 1 hour, 58 minutes.
     
    digitalpoint, Oct 11, 2005 IP
  9. Dejavu

    Dejavu Peon

    Messages:
    916
    Likes Received:
    53
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Thanks, looks like it the hosts problem after all (this was not the first time). I think I will be moving the site to another host.
     
    Dejavu, Oct 11, 2005 IP