Erreur 144 avec mysqldump

mysql jpg

ça arrive....

Si vous rencontrez ce genre d'erreur lors d'un mysqldump :

mysqldump: Got error: 144: "Table './wordpress/wp_statpress' is marked as crashed and last (automatic?) repair failed" when using LOCK TABLES

Voila comment réparer la chose :

# mysql -u root -p                                                                          
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \\g.                                                                                          
Your MariaDB connection id is 5294544                                                                                                                
Server version: 5.9.2-MariaDB MariaDB Server                                                                                                        
                                                                                                                                                     
Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.                                                                                 
                                                                                                                                                     
Type 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.                                                                       
                                                                                                                                                     
MariaDB [(none)]> use wordpress                                                                                                                     
Reading table information for completion of table and column names                                                                                   
You can turn off this feature to get a quicker startup with -A                                                                                       
                                                                                                                                                     
Database changed                                                                                                                                     
                                                                          
MariaDB [wordpress]> check table wp_statpress;                                                                                                      
+-------------------------+-------+----------+-------------------------------------------------------------+                                         
| Table                   | Op    | Msg_type | Msg_text                                                    |                                         
+-------------------------+-------+----------+-------------------------------------------------------------+                                         
| wordpuser1.wp_statpress | check | warning  | Table is marked as crashed and last repair failed           |                                         
| wordpuser1.wp_statpress | check | warning  | Size of indexfile is: 64860160      Should be: 31134720     |                                         
| wordpuser1.wp_statpress | check | error    | Found key at page -1 that points to record outside datafile |                                         
| wordpuser1.wp_statpress | check | error    | Corrupt                                                     |                                         
+-------------------------+-------+----------+-------------------------------------------------------------+                                         
4 rows in set (2.08 sec)

MariaDB [wordpress]> repair table wp_statpress;                                                                                                       
                                                                                                                        
MariaDB [wordpress]> check table wp_statpress;                                                                                                                           
+-------------------------+-------+----------+----------+                                                                                            
| Table                   | Op    | Msg_type | Msg_text |                                                                                            
+-------------------------+-------+----------+----------+                                                                                            
| wordpuser1.wp_statpress | check | status   | OK       |                                                                                            
+-------------------------+-------+----------+----------+                                                                                            
1 row in set (17.91 sec)
Vus : 323
Publié par System Linux : 211