PDF (A4) - 40.3Mb
Man Pages (TGZ) - 262.1Kb
Man Pages (Zip) - 367.6Kb
Info (Gzip) - 4.0Mb
Info (Zip) - 4.0Mb
This is the Reference Manual for the MySQL Database System, version 8.4, through release 8.4.8. Differences between minor versions of MySQL 8.4 are noted in the present text with reference to release numbers (8.4.x). For license information, see theLegal Notices.
This manual is not intended for use with older versions of the MySQL software due to the many functional and other differences between MySQL 8.4 and previous versions. If you are using an earlier release of the MySQL software, please refer to the appropriate manual. For example, theMySQL 8.0 Reference Manual covers the 8.0 bugfix series of MySQL software releases.
Because this manual serves as a reference, it does not provide general instruction on SQL or relational database concepts. It also does not teach you how to use your operating system or command-line interpreter.
The MySQL Database Software is under constant development, and the Reference Manual is updated frequently as well. The most recent version of the manual is available online in searchable form athttps://dev.mysql.com/doc/. Other formats also are available there, including downloadable HTML and PDF versions.
The source code for MySQL itself contains internal documentation written using Doxygen. The generated Doxygen content is available fromhttps://dev.mysql.com/doc/index-other.html. It is also possible to generate this content locally from a MySQL source distribution using the instructions atSection 2.8.10, “Generating MySQL Doxygen Documentation Content”.
If you have questions about using MySQL, join theMySQL Community Slack. If you have suggestions concerning additions or corrections to the manual itself, please send them to thehttp://www.mysql.com/company/contact/.
This manual uses certain typographical conventions:
Text in this styleis used for SQL statements; database, table, and column names; program listings and source code; and environment variables. Example:“To reload the grant tables, use theFLUSH PRIVILEGESstatement.”Text in this styleindicates input that you type in examples.Text in this style indicates the names of executable programs and scripts, examples beingmysql (the MySQL command-line client program) andmysqld (the MySQL server executable).
Text in this styleis used for variable input for which you should substitute a value of your own choosing.Text in this style is used for emphasis.
Text in this style is used in table headings and to convey especially strong emphasis.
Text in this styleis used to indicate a program option that affects how the program is executed, or that supplies information that is needed for the program to function in a certain way.Example:“The--hostoption (short form-h) tells themysql client program the hostname or IP address of the MySQL server that it should connect to”.File names and directory names are written like this:“The global
my.cnffile is located in the/etcdirectory.”Character sequences are written like this:“To specify a wildcard, use the‘
%’ character.”
When commands or statements are prefixed by a prompt, we use these:
$> type a command here#> type a command asroot hereC:\> type a command here (Windows only)mysql> type a mysql statement here Commands are issued in your command interpreter. On Unix, this is typically a program such assh,csh, orbash. On Windows, the equivalent program iscommand.com orcmd.exe, typically run in a console window. Statements prefixed bymysql are issued in themysql command-line client.
When you enter a command or statement shown in an example, do not type the prompt shown in the example.
In some areas different systems may be distinguished from each other to show that commands should be executed in two different environments. For example, while working with replication the commands might be prefixed withsource andreplica:
source> type a mysql statement on the replication source herereplica> type a mysql statement on the replica here Database, table, and column names must often be substituted into statements. To indicate that such substitution is necessary, this manual usesdb_name,tbl_name, andcol_name. For example, you might see a statement like this:
mysql> SELECTcol_name FROMdb_name.tbl_name;This means that if you were to enter a similar statement, you would supply your own database, table, and column names, perhaps like this:
mysql> SELECT author_name FROM biblio_db.author_list;SQL keywords are not case-sensitive and may be written in any lettercase. This manual uses uppercase.
In syntax descriptions, square brackets (“[” and“]”) indicate optional words or clauses. For example, in the following statement,IF EXISTS is optional:
DROP TABLE [IF EXISTS]tbl_name When a syntax element consists of a number of alternatives, the alternatives are separated by vertical bars (“|”). When one member from a set of choicesmay be chosen, the alternatives are listed within square brackets (“[” and“]”):
TRIM([[BOTH | LEADING | TRAILING] [remstr] FROM]str) When one member from a set of choicesmust be chosen, the alternatives are listed within braces (“{” and“}”):
{DESCRIBE | DESC}tbl_name [col_name |wild] An ellipsis (...) indicates the omission of a section of a statement, typically to provide a shorter version of more complex syntax. For example,SELECT ... INTO OUTFILE is shorthand for the form ofSELECT statement that has anINTO OUTFILE clause following other parts of the statement.
An ellipsis can also indicate that the preceding syntax element of a statement may be repeated. In the following example, multiplereset_option values may be given, with each of those after the first preceded by commas:
RESETreset_option [,reset_option] ... Commands for setting shell variables are shown using Bourne shell syntax. For example, the sequence to set theCC environment variable and run theconfigure command looks like this in Bourne shell syntax:
$> CC=gcc ./configureIf you are usingcsh ortcsh, you must issue commands somewhat differently:
$> setenv CC gcc$> ./configureThe Reference Manual source files are written in DocBook XML format. The HTML version and other formats are produced automatically, primarily using the DocBook XSL stylesheets. For information about DocBook, seehttp://docbook.org/
This manual was originally written by David Axmark and Michael“Monty” Widenius. It is maintained by the MySQL Documentation Team, consisting of Edward Gilmore, Sudharsana Gomadam, Kim seong Loh, Garima Sharma, Carlos Ortiz, Daniel So, and Jon Stephens.
PDF (A4) - 40.3Mb
Man Pages (TGZ) - 262.1Kb
Man Pages (Zip) - 367.6Kb
Info (Gzip) - 4.0Mb
Info (Zip) - 4.0Mb