Files
cheatsheet-tldr/tldr/mysqlcheck
2025-04-23 00:19:06 +00:00

26 lines
504 B
Plaintext

---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# 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}}`