How to Recover a Crashed Mysql Database
Among the operation of Ambari, we may confront some annoying failure, such as a crashed MySQL database. So, we can run commands below to recover this kind of problem.
Check the status of the crashed table.
1
check table [table name]
Repair crashed table.
1
repaire table [table name]
On the other hand, you can use commands below to repair whole crashed tables.
1 | mysqlcheck -uroot -p --repair --all-databases |
1 | myisamchk --recover *.MYI |