Errore Can't open file: 'nomedatabase.MYI'. (errno: 145)
Jump to navigation
Jump to search
Se durante una query o un mysqldump si ottiene l'errore 145, siginifica che la tabella del database è corrotta, a seguito di un problema con il filesystem.
E' possibile riparare la tabella in due modi:
Riparazione della singola tabella, con un REPAIR table
Per ognuna delle tabelle contenute nel database:
mysql nomedatabase mysql> show tables; +------------------------+ | Tables_in_nomedatabase | +------------------------+ | acct | | acct_eth0 | +------------------------+ 2 rows in set (0.00 sec) mysql> repair table acct; +-------------+--------+----------+------------------------------------------------+ | Table | Op | Msg_type | Msg_text | +-------------+--------+----------+------------------------------------------------+ | pmacct.acct | repair | warning | Number of rows changed from 2207385 to 2207356 | | pmacct.acct | repair | status | OK | +-------------+--------+----------+------------------------------------------------+ 2 rows in set (2 min 13.69 sec) .....
Riparazione di tutte le tabelle nel database con mysqlcheck
mysqlcheck -r pmacct -u root -p