mesranet

Well-Known Member
May 6, 2002
133
0
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
 

24x7server

Well-Known Member
Apr 17, 2013
1,911
96
78
India
cPanel Access Level
Root Administrator
Twitter
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.
 

mesranet

Well-Known Member
May 6, 2002
133
0
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
 

mesranet

Well-Known Member
May 6, 2002
133
0
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
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,218
463
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 ?
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.