The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

ibdata1 corrupted

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

Tags:
  1. mesranet

    mesranet Well-Known Member

    Joined:
    May 6, 2002
    Messages:
    126
    Likes Received:
    0
    Trophy Points:
    16
    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,146
    Likes Received:
    34
    Trophy Points:
    48
    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.
     
  3. mesranet

    mesranet Well-Known Member

    Joined:
    May 6, 2002
    Messages:
    126
    Likes Received:
    0
    Trophy Points:
    16
    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:
    14,466
    Likes Received:
    196
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
  5. mesranet

    mesranet Well-Known Member

    Joined:
    May 6, 2002
    Messages:
    126
    Likes Received:
    0
    Trophy Points:
    16
    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:
    30,764
    Likes Received:
    662
    Trophy Points:
    113
    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.
     
Loading...

Share This Page