Recover /var/lib/mysql . . .

addam

Active Member
Sep 25, 2008
30
0
56
Hey there,

We have been trying to figure this out for a week. We are trying to restore and create a db.sql dump on about 300 databases. We have the latest /var/lib/mysql dir from the dead server. Created a new server and disabled/stopped mysqd > uploaded /var/lib/mysql from the backup > enabled and started mysql. User/group is mysql:mysql before start, all permissions are correct. All the DB's are there and dumpable but the data isn't there. Just like 16 or so blank. There are several forums on Google and cPanel how to achieve this but all seem to fail for us.

Hope that makes sense, It's been a long day.
Thanks
 

kodeslogic

Well-Known Member
PartnerNOC
Apr 26, 2020
542
253
138
IN
cPanel Access Level
Root Administrator
Do you mean that out of 300 only 16 databases are visible and the remaining are not?
 

addam

Active Member
Sep 25, 2008
30
0
56
No, sorry,
None of the "recovered databases" have any data in the tables after attempting to recover. After attempting to recover and do a dump there are only blank tables. It's not importing the actual data from the backup.
 

kodeslogic

Well-Known Member
PartnerNOC
Apr 26, 2020
542
253
138
IN
cPanel Access Level
Root Administrator
Is anything unusual in the MySQL error log file?
 

addam

Active Member
Sep 25, 2008
30
0
56
Yes, Here it is.

2022-12-01T02:23:42.706795Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-12-01T02:24:57.669234Z 1 [ERROR] [MY-012224] [InnoDB] Header page consists of zero bytes in datafile: ./ibdata1, Space ID:0, Flags: 0. Please refer to MySQL :: MySQL 8.0 Reference Manual :: 15.21.4 Troubleshooting InnoDB Data Dictionary Operations for how to resolve the issue.
2022-12-01T02:24:57.669442Z 1 [ERROR] [MY-012237] [InnoDB] Corrupted page [page id: space=0, page number=0] of datafile './ibdata1' could not be found in the doublewrite buffer.
2022-12-01T02:24:57.669484Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files.
2022-12-01T02:24:58.128673Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine
2022-12-01T02:24:58.129164Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2022-12-01T02:24:58.129473Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-12-01T02:24:58.130852Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.31) MySQL Community Server - GPL.
2022-12-01T02:28:45.103446Z 0 [Warning] [MY-010918] [Server] 'default_authentication_plugin' is deprecated and will be removed in a future release. Please use authentication_policy instead.
2022-12-01T02:28:45.103473Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.31) starting as process 187190
2022-12-01T02:28:45.116727Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-12-01T02:30:28.587085Z 1 [ERROR] [MY-012224] [InnoDB] Header page consists of zero bytes in datafile: ./ibdata1, Space ID:0, Flags: 0. Please refer to MySQL :: MySQL 8.0 Reference Manual :: 15.21.4 Troubleshooting InnoDB Data Dictionary Operations for how to resolve the issue.
2022-12-01T02:30:28.587299Z 1 [ERROR] [MY-012237] [InnoDB] Corrupted page [page id: space=0, page number=0] of datafile './ibdata1' could not be found in the doublewrite buffer.
2022-12-01T02:30:28.587353Z 1 [ERROR] [MY-012960] [InnoDB] Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after creating the data files.
2022-12-01T02:30:29.053804Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine
2022-12-01T02:30:29.054178Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2022-12-01T02:30:29.054303Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-12-01T02:30:29.055173Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.31) MySQL Community Server - GPL.
 

kodeslogic

Well-Known Member
PartnerNOC
Apr 26, 2020
542
253
138
IN
cPanel Access Level
Root Administrator
There seem to be InnoDB related issues. Should be handled by a qualified system administrator as handling it wrong could cause further corruption. I would suggest you to reach out Certified System Administrator to assist you further.
 
  • Like
Reactions: cPanelWilliam