Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

ibdata1 corrupted

Discussion in 'Database Discussion' started by mesranet, Aug 13, 2016.

Tags:
  1. mesranet

    mesranet Well-Known Member

    Joined:
    May 6, 2002
    Messages:
    126
    Likes Received:
    0
    Trophy Points:
    316
    Dear All,

    Today is my bad day, one of my server having issue with bad sector, when i try to copy everything to new hard disk, seem the only ibdata1 is unavailable to copy with input/output error, that mean the bad sector is seriously on the 8GB ibdata1, trying to fsck but still no luck, then trying to add the line of innodb_force_recovery = 1 - 5 at my.cnf also no luck, the mysql wont restart, the last thing is to copy ibdata1 from the last week backup and also the same issue. I'm totally lost, what should i do?

    Please help
     
  2. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,789
    Likes Received:
    83
    Trophy Points:
    78
    Location:
    India
    cPanel Access Level:
    Root Administrator
    You will be lucky if you have SQL dump file of the databases, I think you will have to restore the SQL database dumps on the new server as that will restore the innodb table information for that database.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. mesranet

    mesranet Well-Known Member

    Joined:
    May 6, 2002
    Messages:
    126
    Likes Received:
    0
    Trophy Points:
    316
    Dear Tech,

    Is it possible if i only need to restore all the client database without restoring email or any other data ? Will that possible ? Hopefully if you can give proper step. TQ so much
     
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,170
    Likes Received:
    370
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. mesranet

    mesranet Well-Known Member

    Joined:
    May 6, 2002
    Messages:
    126
    Likes Received:
    0
    Trophy Points:
    316
    Dear All,

    Thanks god, after taking 1 day rest and long sleep, i got an idea by looking back to the corrupted disk, i boot the disk and i run the mysqldump --all-database > all_database.sql and its work, so now on part of restoration, may i know how to restore from the command line and how about the grant or ownership of database ?

    Please help. TQ
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,700
    Likes Received:
    1,791
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    You can restore the databases with a command such as:

    Code:
    mysql < /path/to/all_databases.sql
    Also, the Database Map Tool is available to correct any database username or database name ownership issues.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice