mysql, The Command-line Tool
mysqladmin, Administrating a MySQL Server
mysqlbinlog, Executing the queries from a binary log
mysqlcheck for Table Maintenance and Crash Recovery
mysqldump, Dumping Table Structure and Data
mysqlhotcopy, Copying MySQL Databases and Tables
mysqlimport, Importing Data from Text Files
mysqlshow, Showing Databases, Tables, and Columns
mysql_config, Get compile options for compiling clients
perror, Explaining Error Codes
mysqlcheck for Table Maintenance and Crash Recovery
Since MySQL version 3.23.38 you will be able to use a new
checking and repairing tool for MyISAM tables. The difference to
myisamchk is that mysqlcheck should be used when the
mysqld server is running, whereas myisamchk should be used
when it is not. The benefit is that you no longer have to take the
server down for checking or repairing your tables.
mysqlcheck uses MySQL server commands CHECK,
REPAIR, ANALYZE and OPTIMIZE in a convenient way
for the user.
There are three alternative ways to invoke mysqlcheck:
shell> mysqlcheck [OPTIONS] database [tables] shell> mysqlcheck [OPTIONS] --databases DB1 [DB2 DB3...] shell> mysqlcheck [OPTIONS] --all-databases
So it can be used in a similar way as mysqldump when it
comes to what databases and tables you want to choose.
mysqlcheck does have a special feature compared to the other
clients; the default behaviour, checking tables (-c), can be changed by
renaming the binary. So if you want to have a tool that repairs tables
by default, you should just copy mysqlcheck to your harddrive
with a new name, mysqlrepair, or alternatively make a symbolic
link to mysqlrepair and name the symbolic link as
mysqlrepair. If you invoke mysqlrepair now, it will repair
tables by default.
The names that you can use to change mysqlcheck default behaviour
are here:
mysqlrepair: The default option will be -r mysqlanalyze: The default option will be -a mysqloptimize: The default option will be -o
The options available for mysqlcheck are listed here, please
check what your version supports with mysqlcheck --help.
-A, --all-databases
-1, --all-in-1
-a, --analyze
--auto-repair
-#, --debug=...
--character-sets-dir=...
-c, --check
-C, --check-only-changed
--compress
-?, --help
-B, --databases
--default-character-set=...
-F, --fast
-f, --force
-e, --extended
-h, --host=...
-m, --medium-check
-o, --optimize
-p, --password[=...]
-P, --port=...
--protocol=(TCP | SOCKET | PIPE | MEMORY)
-q, --quick
-r, --repair
-s, --silent
-S, --socket=...
--tables
-u, --user=#
-v, --verbose
-V, --version