Source code editor What Is Ajax
↑
Table of Contents
There are many different MySQL client programs that connect to the server to access databases or perform administrative tasks. Other utilities are available as well. These do not establish a client connection with the server but perform MySQL-related operations.
This chapter provides a brief overview of these programs and then a more detailed description of each one. Each program's description indicates its invocation syntax and the options that it understands. See Chapter 4, Using MySQL Programs, for general information on invoking programs and specifying program options.
The following list briefly describes the MySQL client programs and utilities:
An offline InnoDB
offline file checksum utility. See Section 8.2, “innochecksum — Offline InnoDB File Checksum Utility”.
A utility that are present in option groups of option files. See Section 8.3, “my_print_defaults — Display Options from Option Files”.
A utility that displays information about full-text indexes in MyISAM
tables. See Section 8.4, “myisam_ftdump — Display Full-Text Index information”.
A utility to describe, check, optimize, and repair MyISAM
tables. isamchk is a similar program for ISAM
tables. See Section 8.5, “myisamchk — MyISAM Table-Maintenance Utility”.
A utility that processes the contents of a MyISAM
log file. See Section 8.6, “myisamlog — Display MyISAM Log File Contents”.
A utility that compresses MyISAM
tables to produce smaller read-only tables. See Section 8.7, “myisampack — Generate Compressed, Read-Only MyISAM Tables”.
The command-line tool for interactively entering SQL statements or executing them from a file in batch mode. See Section 8.8, “mysql — The MySQL Command-Line Tool”.
A script that checks the access privileges for a hostname, username, and database combination. See Section 8.9, “mysqlaccess — Client for Checking Access Privileges”.
A client that performs administrative operations, such as creating or dropping databases, reloading the grant tables, flushing tables to disk, and reopening log files. mysqladmin can also be used to retrieve version, process, and status information from the server. See Section 8.10, “mysqladmin — Client for Administering a MySQL Server”.
A utility for reading statements from a binary log. The log of executed statements contained in the binary log files can be used to help recover from a crash. See Section 8.11, “mysqlbinlog — Utility for Processing Binary Log Files”.
A table-maintenance client that checks, repairs, analyzes, and optimizes tables. See Section 8.12, “mysqlcheck — A Table Maintenance and Repair Program”.
A client that dumps a MySQL database into a file as SQL, text, or XML. See Section 8.13, “mysqldump — A Database Backup Program”.
A utility that quickly makes backups of MyISAM
tables while the server is running. See Section 8.14, “mysqlhotcopy — A Database Backup Program”.
A client that imports text files into their respective tables using LOAD DATA INFILE
. See Section 8.15, “mysqlimport — A Data Import Program”.
A client that displays information about databases, tables, columns, and indexes. See Section 8.18, “mysqlshow — Display Database, Table, and Column Information”.
A utility that converts tables in a database to use a given storage engine. See Section 8.19, “mysql_convert_table_format — Convert Tables to Use a Given Storage Engine”.
A utility that analyzes queries in the MySQL query log using EXPLAIN
See Section 8.20, “mysql_explain_log — Use EXPLAIN on Statements in Query Log”.
A utility that reads update log files and extracts queries that match a given regular expression. See Section 8.21, “mysql_find_rows — Extract Queries from Update Log”.
A utility that converts the extensions for MyISAM
(or ISAM
) table files to lowercase. This can be useful after transferring the files from a system with case-insensitive filenames to a system with case-sensitive filenames. See Section 8.22, “mysql_fix_extensions — Make Table Filename Extensions Lowercase”.
A utility for interactively setting permissions in the MySQL grant tables. See Section 8.23, “mysql_setpermission — Interactively Set Permissions in Grant Tables”.
A utility that generates database metadata. Section 8.24, “mysql_tableinfo — Generate Database Metadata”.
A utility that kills the process with a given process ID. See Section 8.25, “mysql_waitpid — Kill Process and Wait for Its Termination”.
A utility that kills processes that match a pattern. See Section 8.26, “mysql_zap — Kill Processes That Match a Pattern”.
A utility that displays the meaning of system or MySQL error codes. See Section 8.27, “perror — Explain Error Codes”.
A utility program that performs string replacement in the input text. See Section 8.28, “replace — A String-Replacement Utility”.
A utility program that resolves a hostname to an IP address or vice versa. See Section 8.29, “resolveip — Resolve Hostname to IP Address or Vice Versa”.
A utility program that resolves a numeric stack trace dump to symbols. See Section 8.30, “resolve_stack_dump — Resolve Numeric Stack Trace Dump to Symbols”.
MySQL AB also provides a number of GUI tools for administering and otherwise working with MySQL servers. For basic information about these, see Chapter 4, Using MySQL Programs.
Each MySQL program takes many different options. Most programs provide a --help
option that you can use to get a full description of the program's different options. For example, try mysql --help.
MySQL client programs that communicate with the server using the MySQL client/server library use the following environment variables:
MYSQL_UNIX_PORT | The default Unix socket file; used for connections to localhost |
MYSQL_TCP_PORT | The default port number; used for TCP/IP connections |
MYSQL_PWD | The default password |
MYSQL_DEBUG | Debug trace options when debugging |
TMPDIR | The directory where temporary tables and files are created |
Use of MYSQL_PWD
is insecure. See Section 5.8.6, “Keeping Your Password Secure”.
You can override the default option values or values specified in environment variables for all standard programs by specifying options in an option file or on the command line. See Section 4.3, “Specifying Program Options”.