HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

mysqlcheck — Check and repair MySQL tables. More information: <https://dev.mysql.com/doc/refman/en/mysqlcheck.htm

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commandmysqlcheckrepairandclitablesmysqlcheck

Problem

How to use the mysqlcheck command: Check and repair MySQL tables. More information: <https://dev.mysql.com/doc/refman/en/mysqlcheck.html>.

Solution

mysqlcheck — Check and repair MySQL tables. More information: <https://dev.mysql.com/doc/refman/en/mysqlcheck.html>.

Check a table:
mysqlcheck --check {{table}}


Check a table and provide credentials to access it:
mysqlcheck --check {{table}} --user {{username}} --password {{password}}


Repair a table:
mysqlcheck --repair {{table}}


Optimize a table:
mysqlcheck --optimize {{table}}

Code Snippets

Check a table

mysqlcheck --check {{table}}

Check a table and provide credentials to access it

mysqlcheck --check {{table}} --user {{username}} --password {{password}}

Repair a table

mysqlcheck --repair {{table}}

Optimize a table

mysqlcheck --optimize {{table}}

Context

tldr-pages: common/mysqlcheck

Revisions (0)

No revisions yet.