Check and optimise mysql databases

Draft | Approver: psycore

Check and optimise mysql databases

Commands

Check

$ mysqlcheck -c -p[pass] -A
Parameter Alias Meaning
--check -c Check tables
--password -p Password (without spaces)
-all-databases -A All databases

Analyse

$ mysqlcheck -a -p[pass] -A
Parameter Alias Meaning
--analyze -a Analyse tables
--password -p Password (without spaces)
-all-databases -A All databases

Optimise

$ mysqlcheck -o -p[pass] -A
Parameter Alias Meaning
--optimize -o Optimise tables
--password -p Password (without spaces)
-all-databases -A All databases

Repair

$ mysqlcheck -r -p[pass] -A
Parameter Alias Meaning
--repair -r Repair tables
--password -p Password (without spaces)
-all-databases -A All databases
en/linux/mysql/dbactions.txt ยท Last modified: 2023/10/24 21:35
CC Attribution-Noncommercial-Share Alike 4.0 International