Page 1 of 1
					
				corrupt maillog.ibd - how do we fix them now?
				Posted: 15 May 2017 22:48
				by Steve9R
				since the latest round of updates our db's have moved from MYI's to IDB's
the procedure we used to use to repair corrupt tables was :
Code: Select all
service MailScanner stop
service mysqld stop
cd /var/lib/mysql/mailscanner
myisamchk --check *.MYI
myisamchk --recover maillog.MYI
service mysqld start
service MailScanner start
is there a new procedure for repairing corrupt tables?
 
			
					
				Re: corrupt maillog.ibd - how do we fix them now?
				Posted: 16 May 2017 03:35
				by pdwalker
				How do/did you get corrupted ibd's?
Try this command to check the tables.
Code: Select all
mysqlcheck -all-databases -o -uroot -p`grep ROOT /etc/EFA-Config | awk -F: '{print $2}'`
However, if you really have corrupted innodb files, then you'll need to do a bit more to recover.  A quick search for "mariadb repair innodb" turned up this: 
http://stackoverflow.com/questions/2261 ... nodb-table  
Read everything before taking the next steps.
Make sure you have your backup copies before attempting repair, in case you make things worse.
 
			
					
				Re: corrupt maillog.ibd - how do we fix them now?
				Posted: 11 Oct 2017 16:29
				by fencepost
				When the DB wouldn't start for me (memory errors crashed the host), I did the following and apparently just looking at it read-only was enough to get it to start properly..... That matches up with things I'd seen elsewhere where people said just dumping the DB would resolve their issue.
create /etc/my.cnf.d/innodb_recovery.cnf (NOTE: 
This has the option commented out, uncomment for actual use)
Code: Select all
service postfix stop
service mysqld start
The command as given above (with the needed extra - added to --all-databases)
Comment out the innodb_force_recovery line before proceeding or remove that file
 
			
					
				Re: corrupt maillog.ibd - how do we fix them now?
				Posted: 11 Oct 2017 17:18
				by shawniverson
				Yeah, the recovery in eFa does not do this on purpose, it uses only a safe recovery, because this has potential to wreck havoc.  Backing up before proceeding like this is a must.