mysql的bin目录下的程序介绍

2017/05/16 mysql

#mysql的bin目录下的程序介绍

##服务端相关程序

##mysqld

mysqld是mysql的服务端程序,在客户端连接mysql之前,必需启动mysqld,否则无法使用mysql服务

The SQL daemon (that is, the MySQL server). To use client programs, mysqld must be running, because clients gain access to databases by connecting to the server. See Section 5.3.1, “mysqld — The MySQL Server”.

##mysqld_safe

是一个启动mysqld的脚本程序。

A server startup script. mysqld_safe attempts to start mysqld. See Section 5.3.2, “mysqld_safe — MySQL Server Startup Script”.

##mysql.server

是一个启动mysqld的脚本程序,主要用在 V-style(/etc/init.d 分级别运行) 的系统,在开机启动时自动启动。会调用mysqld_safe

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 mysqld_safe to start the MySQL server. See Section 5.3.3, “mysql.server — MySQL Server Startup Script”.

##mysqld_multi 是一个启动mysql多实例的脚本启动程序

A server startup script that can start or stop multiple servers installed on the system. See Section 5.3.4, “mysqld_multi — Manage Multiple MySQL Servers”.

##几个在mysql安装或升级时,用来配置的mysql程序

##comp_err

这个程序是用来在MySQL建造/安装过程中,它从错误源文件收集错误消息 This program is used during the MySQL build/installation process. It compiles error message files from the error source files. See Section 5.4.1, “comp_err — Compile MySQL Error Message File”.

##mysql_install_db 用来初始化data目录,表授权管理等,innodb表空间,通常是只执行一次的,在5.7之后使用mysqld –initialize初始化 mysql_secure_installation

This program enables you to improve the security of your MySQL installation. See Section 5.4.4, “mysql_secure_installation — Improve MySQL Installation Security”.

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 Section 5.4.2, “mysql_install_db — Initialize MySQL Data Directory”, and Section 2.10, “Postinstallation Setup and Testing”.

##mysql_plugin mysql服务的的插件管理程序

This program configures MySQL server plugins. See Section 5.4.3, “mysql_plugin — Configure MySQL Server Plugins”.

##mysql_secure_installation 在安装的时候设置一些安全配置

This program enables you to improve the security of your MySQL installation. See Section 5.4.4, “mysql_secure_installation — Improve MySQL Installation Security”.

##mysql_ssl_rsa_setup 用来创建SSL证书和密钥对,以支持安全的连接

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 mysql_ssl_rsa_setup can be used for secure connections using SSL or RSA. See Section 5.4.5, “mysql_ssl_rsa_setup — Create SSL/RSA Files”.

##mysql_tzinfo_to_sql 用来载入mysql数据库的time_zone表,设置相关的时区

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 Section 5.4.6, “mysql_tzinfo_to_sql — Load the Time Zone Tables”.

##mysql_upgrade mysql升级程序

This program is used after a MySQL upgrade operation. It checks tables for incompatibilities and repairs them if necessary, and updates the grant tables with any changes that have been made in newer versions of MySQL. See Section 5.4.7, “mysql_upgrade — Check and Upgrade MySQL Tables”.

##mysql客户端程序,用来连接操作mysql服务器

##mysql

与mysql实现交互的客户端程序,可以执行SQL语句,或者使用批处理模式,从文件中执行SQL语句

The command-line tool for interactively entering SQL statements or executing them from a file in batch mode. See Section 5.5.1, “mysql — The MySQL Command-Line Tool”.

##mysqladmin

是一个客户端程序,用来提供管理员的相关操作,如创建,删除数据库,权限管理,将表写入磁盘,重新打开日志文件,还可以显示mysql服务的版本信息,进程处理信息,变量的状态等 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 5.5.2, “mysqladmin — Client for Administering a MySQL Server”.

##mysqlcheck 是一个客户端程序,用来对数据表进行维护管理。如修复,分析,优化表等。

A table-maintenance client that checks, repairs, analyzes, and optimizes tables. See Section 5.5.3, “mysqlcheck — A Table Maintenance Program”.

##mysqldump 一个用来导出mysql数据sql语句到text,xml文件的客户端程序

A client that dumps a MySQL database into a file as SQL, text, or XML. See Section 5.5.4, “mysqldump — A Database Backup Program”.

##mysqlimport 从txt文件中,使用LOAD DATA INFILE导入数据到各自相关的表 A client that imports text files into their respective tables using LOAD DATA INFILE. See Section 5.5.5, “mysqlimport — A Data Import Program”.

##mysqlpump 以mysql语句方式导出数据

A client that dumps a MySQL database into a file as SQL. See Section 5.5.6, “mysqlpump — A Database Backup Program”.

##mysqlsh 一个高级的命令行交互客户端程序,且是一个代码编辑器,用来操作mysql服务器,除了可以执行执行SQL,还提供javascript,python的功能,当使用 X Protocol An advanced command-line client and code editor for the MySQL Server. In addition to SQL, MySQL Shell also offers scripting capabilities for JavaScript and Python. When MySQL Shell is connected to the MySQL Server through the X Protocol, the X DevAPI can be used to work with both relational and document data. See Section 5.5.7, “mysqlsh — The MySQL Shell”.

##mysqlshow

显示数据库,表,字段,索引等相关信息

A client that displays information about databases, tables, columns, and indexes. See Section 5.5.8, “mysqlshow — Display Database, Table, and Column Information”.

##mysqlslap

如果有多个客户端连接到了mysql服务,模拟服务端的负载情况

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 Section 5.5.9, “mysqlslap — Load Emulation Client”.

##mysql实用管理程序 MySQL administrative and utility programs

##innochecksum 离线InnoDB脱机文件校验工具

An offline InnoDB offline file checksum utility. See Section 5.6.1, “innochecksum — Offline InnoDB File Checksum Utility”.

##myisam_ftdump 用来显示MyIsam的全文检索信息 A utility that displays information about full-text indexes in MyISAM tables. See Section 5.6.2, “myisam_ftdump — Display Full-Text Index information”.

##myisamchk 检查,修复,优化myisam表的工具 A utility to describe, check, optimize, and repair MyISAM tables. See Section 5.6.3, “myisamchk — MyISAM Table-Maintenance Utility”.

##myisamlog 处理显示myisam日志文件的工具

A utility that processes the contents of a MyISAM log file. See Section 5.6.4, “myisamlog — Display MyISAM Log File Contents”.

##myisampack 压缩myisam表,生成一个较小的只读表 A utility that compresses MyISAM tables to produce smaller read-only tables. See Section 5.6.5, “myisampack — Generate Compressed, Read-Only MyISAM Tables”.

##mysql_config_editor 可以以一种安全的方式存储授权证书,加密login文件.mylogin.cnf A utility that enables you to store authentication credentials in a secure, encrypted login path file named .mylogin.cnf. See Section 5.6.6, “mysql_config_editor

##mysqlbinlog 用于从二进制日志读取报SQL语句的实用工具。在二进制日志文件中包含的已执行语句,可以用来帮助从崩溃中恢复 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 5.6.7, “mysqlbinlog — Utility for Processing Binary Log Files”.

##mysqldumpslow 查看总结mysql的慢日志工具 A utility to read and summarize the contents of a slow query log. See Section 5.6.8, “mysqldumpslow — Summarize Slow Query Log Files”.

##mysql程序开发工具

MySQL program-development utilities:

##mysql_config

A shell script that produces the option values needed when compiling MySQL programs. See Section 5.7.1, “mysql_config — Display Options for Compiling Clients”.

##my_print_defaults 显示配置文件中出现了哪些选项配置

A utility that shows which options are present in option groups of option files. See Section 5.7.2, “my_print_defaults — Display Options from Option Files”.

##resolve_stack_dump

A utility program that resolves a numeric stack trace dump to symbols. See Section 5.7.3, “resolve_stack_dump — Resolve Numeric Stack Trace Dump to Symbols”.

##杂项 Miscellaneous utilities:

##lz4_decompress 用来解压由mysqlpump导出的LZ4压缩数据 A utility that decompresses mysqlpump output that was created using LZ4 compression. See Section 5.8.1, “lz4_decompress — Decompress mysqlpump LZ4-Compressed Output”.

##perror

A utility that displays the meaning of system or MySQL error codes. See Section 5.8.2, “perror — Explain Error Codes”.

##replace

A utility program that performs string replacement in the input text. See Section 5.8.3, “replace — A String-Replacement Utility”.

##resolveip 域名,IP相关

A utility program that resolves a host name to an IP address or vice versa. See Section 5.8.4, “resolveip — Resolve Host name to IP Address or Vice Versa”.

##zlib_decompress 用来解压由mysqlpump导出的ZLIB压缩数据

A utility that decompresses mysqlpump output that was created using ZLIB compression. See Section 5.8.5, “zlib_decompress — Decompress mysqlpump ZLIB-Compressed Output”.

Oracle Corporation also provides the MySQL 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. Additional GUI tools include MySQL Notifier and MySQL for Excel.

MySQL client programs that communicate with the server using the MySQL client/server library use the following environment variables.

##环境变量 Environment Variable Meaning 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 Section 2.12, “Environment Variables”.

Use of MYSQL_PWD is insecure. See Section 7.1.2.1, “End-User Guidelines for Password Security”.

http://dev.mysql.com/doc/refman/5.7/en/programs-overview.html


Search

    Table of Contents