There are many different programs in a MySQL installation. This section provides a brief overview of them. Later sections provide a more detailed description of each one, with the exception of NDB Cluster programs. Each program's description indicates its invocation syntax and the options that it supports. *note mysql-cluster-programs::, describes programs specific to NDB Cluster.
Most MySQL distributions include all of these programs, except for those programs that are platform-specific. (For example, the server startup scripts are not used on Windows.) The exception is that RPM distributions are more specialized. There is one RPM for the server, another for client programs, and so forth. If you appear to be missing one or more programs, see *note installing::, for information on types of distributions and what they contain. It may be that you have a distribution that does not include all programs and you need to install an additional package.
Each MySQL program takes many different options. Most programs provide a '--help' option that you can use to get a description of the program's different options. For example, try *note 'mysql --help': mysql.
You can override default option values for MySQL programs by specifying options on the command line or in an option file. See *note programs-using::, for general information on invoking programs and specifying program options.
The MySQL server, *note 'mysqld': mysqld, is the main program that does most of the work in a MySQL installation. The server is accompanied by several related scripts that assist you in starting and stopping the server:
*note 'mysqld': mysqld.
The SQL daemon (that is, the MySQL server). To use client programs, note 'mysqld': mysqld. must be running, because clients gain access to databases by connecting to the server. See note mysqld::.
*note 'mysqld_safe': mysqld-safe.
A server startup script. note 'mysqld_safe': mysqld-safe. attempts to start note 'mysqld': mysqld. See *note mysqld-safe::.
*note 'mysql.server': mysql-server.
A server startup script. This script is used on systems that use System V-style run directories containing scripts that start system services for particular run levels. It invokes note 'mysqld_safe': mysqld-safe. to start the MySQL server. See note mysql-server::.
*note 'mysqld_multi': mysqld-multi.
A server startup script that can start or stop multiple servers installed on the system. See *note mysqld-multi::.
Several programs perform setup operations during MySQL installation or upgrading:
*note 'comp_err': comp-err.
This program is used during the MySQL build/installation process. It compiles error message files from the error source files. See *note comp-err::.
*note 'mysql_install_db': mysql-install-db.
This program initializes the MySQL data directory, creates the 'mysql' database and initializes its grant tables with default privileges, and sets up the 'InnoDB' system tablespace. It is usually executed only once, when first installing MySQL on a system. See note mysql-install-db::, and note postinstallation::.
*note 'mysql_plugin': mysql-plugin.
This program configures MySQL server plugins. See *note mysql-plugin::.
*note 'mysql_secure_installation': mysql-secure-installation.
This program enables you to improve the security of your MySQL installation. See *note mysql-secure-installation::.
*note 'mysql_ssl_rsa_setup': mysql-ssl-rsa-setup.
This program creates the SSL certificate and key files and RSA key-pair files required to support secure connections, if those files are missing. Files created by note 'mysql_ssl_rsa_setup': mysql-ssl-rsa-setup. can be used for secure connections using SSL or RSA. See note mysql-ssl-rsa-setup::.
*note 'mysql_tzinfo_to_sql': mysql-tzinfo-to-sql.
This program loads the time zone tables in the 'mysql' database using the contents of the host system zoneinfo database (the set of files describing time zones). See *note mysql-tzinfo-to-sql::.
*note 'mysql_upgrade': mysql-upgrade.
This program is used after a MySQL upgrade operation. It updates the grant tables with any changes that have been made in newer versions of MySQL, and checks tables for incompatibilities and repairs them if necessary. See *note mysql-upgrade::.
MySQL client programs that connect to the MySQL server:
*note 'mysql': mysql.
The command-line tool for interactively entering SQL statements or executing them from a file in batch mode. See *note mysql::.
*note 'mysqladmin': mysqladmin.
A client that performs administrative operations, such as creating or dropping databases, reloading the grant tables, flushing tables to disk, and reopening log files. note 'mysqladmin': mysqladmin. can also be used to retrieve version, process, and status information from the server. See note mysqladmin::.
*note 'mysqlcheck': mysqlcheck.
A table-maintenance client that checks, repairs, analyzes, and optimizes tables. See *note mysqlcheck::.
*note 'mysqldump': mysqldump.
A client that dumps a MySQL database into a file as SQL, text, or XML. See *note mysqldump::.
*note 'mysqlimport': mysqlimport.
A client that imports text files into their respective tables using note 'LOAD DATA': load-data. See note mysqlimport::.
*note 'mysqlpump': mysqlpump.
A client that dumps a MySQL database into a file as SQL. See *note mysqlpump::.
'mysqlsh'
MySQL Shell is an advanced client and code editor for MySQL Server. See MySQL Shell 8.0 (https://dev.mysql.com/doc/mysql-shell/8.0/en/). In addition to the provided SQL functionality, similar to note 'mysql': mysql, MySQL Shell provides scripting capabilities for JavaScript and Python and includes APIs for working with MySQL. X DevAPI enables you to work with both relational and document data, see note document-store::. AdminAPI enables you to work with InnoDB Cluster, see MySQL AdminAPI (https://dev.mysql.com/doc/mysql-shell/8.0/en/admin-api-userguide.html).
*note 'mysqlshow': mysqlshow.
A client that displays information about databases, tables, columns, and indexes. See *note mysqlshow::.
*note 'mysqlslap': mysqlslap.
A client that is designed to emulate client load for a MySQL server and report the timing of each stage. It works as if multiple clients are accessing the server. See *note mysqlslap::.
MySQL administrative and utility programs:
*note 'innochecksum': innochecksum.
An offline 'InnoDB' offline file checksum utility. See *note innochecksum::.
*note 'myisam_ftdump': myisam-ftdump.
A utility that displays information about full-text indexes in 'MyISAM' tables. See *note myisam-ftdump::.
*note 'myisamchk': myisamchk.
A utility to describe, check, optimize, and repair 'MyISAM' tables. See *note myisamchk::.
*note 'myisamlog': myisamlog.
A utility that processes the contents of a 'MyISAM' log file. See *note myisamlog::.
*note 'myisampack': myisampack.
A utility that compresses 'MyISAM' tables to produce smaller read-only tables. See *note myisampack::.
*note 'mysql_config_editor': mysql-config-editor.
A utility that enables you to store authentication credentials in a secure, encrypted login path file named '.mylogin.cnf'. See *note mysql-config-editor::.
*note 'mysqlbinlog': mysqlbinlog.
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 *note mysqlbinlog::.
*note 'mysqldumpslow': mysqldumpslow.
A utility to read and summarize the contents of a slow query log. See *note mysqldumpslow::.
MySQL program-development utilities:
*note 'mysql_config': mysql-config.
A shell script that produces the option values needed when compiling MySQL programs. See *note mysql-config::.
*note 'my_print_defaults': my-print-defaults.
A utility that shows which options are present in option groups of option files. See *note my-print-defaults::.
*note 'resolve_stack_dump': resolve-stack-dump.
A utility program that resolves a numeric stack trace dump to symbols. See *note resolve-stack-dump::.
Miscellaneous utilities:
*note 'lz4_decompress': lz4-decompress.
A utility that decompresses note 'mysqlpump': mysqlpump. output that was created using LZ4 compression. See note lz4-decompress::.
*note 'perror': perror.
A utility that displays the meaning of system or MySQL error codes. See *note perror::.
*note 'replace': replace-utility.
A utility program that performs string replacement in the input text. See *note replace-utility::.
*note 'resolveip': resolveip.
A utility program that resolves a host name to an IP address or vice versa. See *note resolveip::.
*note 'zlib_decompress': zlib-decompress.
A utility that decompresses note 'mysqlpump': mysqlpump. output that was created using ZLIB compression. See note zlib-decompress::.
Oracle Corporation also provides the *note MySQL Workbench: workbench. GUI tool, which is used to administer MySQL servers and databases, to create, execute, and evaluate queries, and to migrate schemas and data from other relational database management systems for use with MySQL.
MySQL client programs that communicate with the server using the MySQL client/server library use the following environment variables.
Environment Meaning Variable
'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
For a full list of environment variables used by MySQL programs, see *note environment-variables::.
Use of 'MYSQL_PWD' is insecure. See *note password-security-user::.
File: manual.info.tmp, Node: programs-using, Next: programs-server, Prev: programs-overview, Up: programs