MySQL et MariaDB – MySQL Check
Check and Repair MySQL Tables Using Mysqlcheck
Activer les logs en mode verbeux !!!! Prend beaucoup d’espace à désactiver !!!!
mysql> SHOW VARIABLES
LIKE
"general_log%"
;
mysql>
SET
GLOBAL
general_log =
'ON'
;
Check a Specific Table in a Database
$ mysqlcheck -c database_name table_name -u root -p
Check All Tables in a Database
$ mysqlcheck -c database_name -u root -p
Check All Tables and All Databases
All
$ mysqlcheck -c -u root -p --all-databases
Specific list data_bases
$ mysqlcheck -c -u root -p --databases database_name_1 database_name_2
Analyze Tables using Mysqlcheck
$ mysqlcheck -a database_name table_name -u root -p
Optimize Tables using Mysqlcheck
$ mysqlcheck -o database_name table_name -u root -p
Repair Tables using Mysqlcheck
$ mysqlcheck -r database_name table_name -u root -p
Combine Check, Optimize, and Repair Tables
All
$ mysqlcheck -u root -p --auto-repair -c -o --all-databases
Specific database
$ mysqlcheck -u root -p --auto-repair -c -o database_name
Mode debug
$ mysqlcheck --debug-info -u root -p ...
Optimisation
https://buzut.net/optimiser-performances-de-mysql/
Commentaires récents