Errore Can't open file: 'nomedatabase.MYI'. (errno: 145): Difference between revisions

From RVM Wiki
Jump to navigation Jump to search
No edit summary
 
mNo edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
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.
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.


Occorre ripararla, eseguendo un REPAIR table per ognuna delle tabelle contenute nel database:
E' possibile riparare la tabella in due modi:
 
== Riparazione della singola tabella, con un REPAIR table ==
 
Per ognuna delle tabelle contenute nel database:


<pre>
<pre>
Line 26: Line 30:


</pre>
</pre>
== Riparazione di tutte le tabelle nel database con mysqlcheck ==
mysqlcheck -r pmacct -u root -p
== Riferimenti==
* [http://www.databasejournal.com/features/mysql/print.php/10897_3300511_2 Repairing Database Corruption in MySQL]

Latest revision as of 16:36, 25 January 2006

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

Riferimenti