Outils pour utilisateurs

Outils du site


linux:mysql (lu 65513 fois)

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révision
Révision précédente
Prochaine révision Les deux révisions suivantes
linux:mysql [09-10-2018 22:53]
edmc73 [InnoDB]
linux:mysql [23-04-2019 17:34]
edmc73 [Erreur]
Ligne 198: Ligne 198:
 => http://www.geoffmontee.com/automatic-partition-maintenance-in-mysql-and-mariadb-part-3/ => http://www.geoffmontee.com/automatic-partition-maintenance-in-mysql-and-mariadb-part-3/
  
 +===== Erreur =====
  
 +Après avoir lancé une optimization puis violemment killé la requete en cours, la table était inaccessible ...
  
 +<code>
 +Starting MySQL database server: mysqld.
 +Checking for corrupt, not cleanly closed and upgrade needing tables..
 +ERROR 144 (HY000) at line 1: Table 'dashboard_log' is marked as crashed and last (automatic?) repair failed
 +</code>
 +
 +<code>
 +# myisamchk dashboard_log
 +Checking MyISAM file: dashboard_log
 +Data records:  654724   Deleted blocks:       0
 +myisamchk: warning: Table is marked as crashed and last repair failed
 +- check file-size
 +myisamchk: warning: Size of indexfile is: 275469312      Should be: 25405440
 +- check record delete-chain
 +- check key delete-chain
 +- check index reference
 +- check data record references index: 1
 +- check data record references index: 2
 +- check data record references index: 3
 +- check record links
 +myisamchk: error: Record-count is not ok; is 5773841      Should be: 654724
 +myisamchk: warning: Found 484145612 deleted space.   Should be 0
 +myisamchk: warning: Found    1581466 deleted blocks       Should be: 0
 +myisamchk: warning: Found    8799790 key parts. Should be: 654724
 +MyISAM-table 'dashboard_log' is corrupted
 +Fix it using switch "-r" or "-o"
 +</code>
 +
 +<code>
 +# myisamchk -r -v dashboard_log
 +- recovering (with sort) MyISAM-table 'dashboard_log'
 +Data records: 654724
 +- Fixing index 1
 +  - Searching for keys, allocating buffer for 147793 keys
 +  - Merging 5773841 keys
 +  - Last merge and dumping keys
 +- Fixing index 2
 +  - Searching for keys, allocating buffer for 139720 keys
 +  - Merging 5773841 keys
 +  - Last merge and dumping keys
 +- Fixing index 3
 +  - Searching for keys, allocating buffer for 2604 keys
 +  - Merging 5773841 keys
 +  - Last merge and dumping keys
 +Data records: 5773841
 +</code>
 +
 +Ça remarche ! et même à chaud sans redémarrer mysql ! J'ai même l'impression que ça a été plus rapide de faire cette manip que d'attendre la fin de la requête d'optimisation...
  
linux/mysql.txt · Dernière modification: 14-02-2023 11:39 de edmc73