url
stringlengths 45
122
| content
stringlengths 380
3.07M
|
---|---|
https://dev.mysql.com/doc/refman/8.4/en/charset-collations.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title">
<a name="charset-collations">
</a>
12.8 Collation Issues
</h2>
</div>
</div>
</div>
<div class="toc">
<dl class="toc">
<dt>
<span class="section">
<a href="charset-collate.html">
12.8.1 Using COLLATE in SQL Statements
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="charset-collate-precedence.html">
12.8.2 COLLATE Clause Precedence
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="charset-collation-compatibility.html">
12.8.3 Character Set and Collation Compatibility
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="charset-collation-coercibility.html">
12.8.4 Collation Coercibility in Expressions
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="charset-binary-collations.html">
12.8.5 The binary Collation Compared to _bin Collations
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="charset-collation-effect.html">
12.8.6 Examples of the Effect of Collation
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="charset-collation-information-schema.html">
12.8.7 Using Collation in INFORMATION_SCHEMA Searches
</a>
</span>
</dt>
</dl>
</div>
<p>
The following sections discuss various aspects of character set
collations.
</p>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/creating-tables.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a name="creating-tables">
</a>
5.3.2 Creating a Table
</h3>
</div>
</div>
</div>
<a class="indexterm" name="idm46045325452832">
</a>
<a class="indexterm" name="idm46045325451344">
</a>
<p>
Creating the database is the easy part, but at this point it is
empty, as
<a class="link" href="show-tables.html" title="15.7.7.39 SHOW TABLES Statement">
<code class="literal">
SHOW TABLES
</code>
</a>
tells you:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa15811393"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SHOW</span> <span class="token keyword">TABLES</span><span class="token punctuation">;</span>
<span class="token output">Empty set (0.00 sec)</span></code></pre>
</div>
<p>
The harder part is deciding what the structure of your database
should be: what tables you need and what columns should be in
each of them.
</p>
<p>
You want a table that contains a record for each of your pets.
This can be called the
<code class="literal">
pet
</code>
table, and it
should contain, as a bare minimum, each animal's name. Because
the name by itself is not very interesting, the table should
contain other information. For example, if more than one person
in your family keeps pets, you might want to list each animal's
owner. You might also want to record some basic descriptive
information such as species and sex.
</p>
<p>
How about age? That might be of interest, but it is not a good
thing to store in a database. Age changes as time passes, which
means you'd have to update your records often. Instead, it is
better to store a fixed value such as date of birth. Then,
whenever you need age, you can calculate it as the difference
between the current date and the birth date. MySQL provides
functions for doing date arithmetic, so this is not difficult.
Storing birth date rather than age has other advantages, too:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
You can use the database for tasks such as generating
reminders for upcoming pet birthdays. (If you think this
type of query is somewhat silly, note that it is the same
question you might ask in the context of a business database
to identify clients to whom you need to send out birthday
greetings in the current week or month, for that
computer-assisted personal touch.)
</p>
</li>
<li class="listitem">
<p>
You can calculate age in relation to dates other than the
current date. For example, if you store death date in the
database, you can easily calculate how old a pet was when it
died.
</p>
</li>
</ul>
</div>
<p>
You can probably think of other types of information that would
be useful in the
<code class="literal">
pet
</code>
table, but the ones
identified so far are sufficient: name, owner, species, sex,
birth, and death.
</p>
<p>
Use a
<a class="link" href="create-table.html" title="15.1.20 CREATE TABLE Statement">
<code class="literal">
CREATE TABLE
</code>
</a>
statement to
specify the layout of your table:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa83546169"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">CREATE</span> <span class="token keyword">TABLE</span> pet <span class="token punctuation">(</span><span class="token keyword">name</span> <span class="token datatype">VARCHAR</span><span class="token punctuation">(</span><span class="token number">20</span><span class="token punctuation">)</span><span class="token punctuation">,</span> <span class="token keyword">owner</span> <span class="token datatype">VARCHAR</span><span class="token punctuation">(</span><span class="token number">20</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
species <span class="token datatype">VARCHAR</span><span class="token punctuation">(</span><span class="token number">20</span><span class="token punctuation">)</span><span class="token punctuation">,</span> sex <span class="token datatype">CHAR</span><span class="token punctuation">(</span><span class="token number">1</span><span class="token punctuation">)</span><span class="token punctuation">,</span> birth <span class="token datatype">DATE</span><span class="token punctuation">,</span> death <span class="token datatype">DATE</span><span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
<a class="link" href="char.html" title="13.3.2 The CHAR and VARCHAR Types">
<code class="literal">
VARCHAR
</code>
</a>
is a good choice for the
<code class="literal">
name
</code>
,
<code class="literal">
owner
</code>
, and
<code class="literal">
species
</code>
columns because the column values
vary in length. The lengths in those column definitions need not
all be the same, and need not be
<code class="literal">
20
</code>
. You can
normally pick any length from
<code class="literal">
1
</code>
to
<code class="literal">
65535
</code>
, whatever seems most reasonable to you.
If you make a poor choice and it turns out later that you need a
longer field, MySQL provides an
<a class="link" href="alter-table.html" title="15.1.9 ALTER TABLE Statement">
<code class="literal">
ALTER
TABLE
</code>
</a>
statement.
</p>
<p>
Several types of values can be chosen to represent sex in animal
records, such as
<code class="literal">
'm'
</code>
and
<code class="literal">
'f'
</code>
, or perhaps
<code class="literal">
'male'
</code>
and
<code class="literal">
'female'
</code>
. It is simplest to use the single
characters
<code class="literal">
'm'
</code>
and
<code class="literal">
'f'
</code>
.
</p>
<p>
The use of the
<a class="link" href="datetime.html" title="13.2.2 The DATE, DATETIME, and TIMESTAMP Types">
<code class="literal">
DATE
</code>
</a>
data type for
the
<code class="literal">
birth
</code>
and
<code class="literal">
death
</code>
columns is a fairly obvious choice.
</p>
<p>
Once you have created a table,
<a class="link" href="show-tables.html" title="15.7.7.39 SHOW TABLES Statement">
<code class="literal">
SHOW
TABLES
</code>
</a>
should produce some output:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa2650035"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SHOW</span> <span class="token keyword">TABLES</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Tables in menagerie <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> pet <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
<p>
To verify that your table was created the way you expected, use
a
<a class="link" href="describe.html" title="15.8.1 DESCRIBE Statement">
<code class="literal">
DESCRIBE
</code>
</a>
statement:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa61605911"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">DESCRIBE</span> pet<span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Field <span class="token punctuation">|</span> Type <span class="token punctuation">|</span> Null <span class="token punctuation">|</span> Key <span class="token punctuation">|</span> Default <span class="token punctuation">|</span> Extra <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> name <span class="token punctuation">|</span> varchar(20) <span class="token punctuation">|</span> YES <span class="token punctuation">|</span> <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> owner <span class="token punctuation">|</span> varchar(20) <span class="token punctuation">|</span> YES <span class="token punctuation">|</span> <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> species <span class="token punctuation">|</span> varchar(20) <span class="token punctuation">|</span> YES <span class="token punctuation">|</span> <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> sex <span class="token punctuation">|</span> char(1) <span class="token punctuation">|</span> YES <span class="token punctuation">|</span> <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> birth <span class="token punctuation">|</span> date <span class="token punctuation">|</span> YES <span class="token punctuation">|</span> <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> death <span class="token punctuation">|</span> date <span class="token punctuation">|</span> YES <span class="token punctuation">|</span> <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
<p>
You can use
<a class="link" href="describe.html" title="15.8.1 DESCRIBE Statement">
<code class="literal">
DESCRIBE
</code>
</a>
any time,
for example, if you forget the names of the columns in your
table or what types they have.
</p>
<p>
For more information about MySQL data types, see
<a class="xref" href="data-types.html" title="Chapter 13 Data Types">
Chapter 13,
<i>
Data Types
</i>
</a>
.
</p>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/dynindex-priv.html | <div id="docs-body">
<div class="index">
<div class="titlepage">
<div>
<div>
<h2 class="title">
<a name="dynindex-priv">
</a>
Privileges Index
</h2>
</div>
</div>
</div>
<p>
<a name="priv-index-top">
</a>
<a class="link" href="dynindex-priv.html#priv-index-A" title="A">
A
</a>
|
<a class="link" href="dynindex-priv.html#priv-index-B" title="B">
B
</a>
|
<a class="link" href="dynindex-priv.html#priv-index-C" title="C">
C
</a>
|
<a class="link" href="dynindex-priv.html#priv-index-D" title="D">
D
</a>
|
<a class="link" href="dynindex-priv.html#priv-index-E" title="E">
E
</a>
|
<a class="link" href="dynindex-priv.html#priv-index-F" title="F">
F
</a>
|
<a class="link" href="dynindex-priv.html#priv-index-G" title="G">
G
</a>
|
<a class="link" href="dynindex-priv.html#priv-index-I" title="I">
I
</a>
|
<a class="link" href="dynindex-priv.html#priv-index-L" title="L">
L
</a>
|
<a class="link" href="dynindex-priv.html#priv-index-M" title="M">
M
</a>
|
<a class="link" href="dynindex-priv.html#priv-index-N" title="N">
N
</a>
|
<a class="link" href="dynindex-priv.html#priv-index-O" title="O">
O
</a>
|
<a class="link" href="dynindex-priv.html#priv-index-P" title="P">
P
</a>
|
<a class="link" href="dynindex-priv.html#priv-index-R" title="R">
R
</a>
|
<a class="link" href="dynindex-priv.html#priv-index-S" title="S">
S
</a>
|
<a class="link" href="dynindex-priv.html#priv-index-T" title="T">
T
</a>
|
<a class="link" href="dynindex-priv.html#priv-index-U" title="U">
U
</a>
|
<a class="link" href="dynindex-priv.html#priv-index-V" title="V">
V
</a>
|
<a class="link" href="dynindex-priv.html#priv-index-X" title="X">
X
</a>
</p>
<div class="indexdiv">
<a name="priv-index-A">
</a>
<h3 class="title">
A
</h3>
<p>
[
<a class="link" href="dynindex-priv.html#priv-index-top">
index top
</a>
]
</p>
<dl>
<dt>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
ALL
</h3>
<dl>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
ALL PRIVILEGES
</h3>
<dl>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="show-grants.html" title="15.7.7.22 SHOW GRANTS Statement">
Section 15.7.7.22, “SHOW GRANTS Statement”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
ALLOW_NONEXISTENT_DEFINER
</h3>
<dl>
<dt>
<a class="xref" href="alter-view.html" title="15.1.11 ALTER VIEW Statement">
Section 15.1.11, “ALTER VIEW Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="create-user.html" title="15.7.1.3 CREATE USER Statement">
Section 15.7.1.3, “CREATE USER Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="drop-user.html" title="15.7.1.5 DROP USER Statement">
Section 15.7.1.5, “DROP USER Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="rename-user.html" title="15.7.1.7 RENAME USER Statement">
Section 15.7.1.7, “RENAME USER Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="stored-objects-security.html" title="27.6 Stored Object Access Control">
Section 27.6, “Stored Object Access Control”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="mysql-nutshell.html" title="1.4 What Is New in MySQL 8.4 since MySQL 8.0">
Section 1.4, “What Is New in MySQL 8.4 since MySQL 8.0”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
ALTER
</h3>
<dl>
<dt>
<a class="xref" href="alter-database.html" title="15.1.2 ALTER DATABASE Statement">
Section 15.1.2, “ALTER DATABASE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="alter-table.html" title="15.1.9 ALTER TABLE Statement">
Section 15.1.9, “ALTER TABLE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="partitioning-management-exchange.html" title="26.3.3 Exchanging Partitions and Subpartitions with Tables">
Section 26.3.3, “Exchanging Partitions and Subpartitions with Tables”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="rename-table.html" title="15.1.36 RENAME TABLE Statement">
Section 15.1.36, “RENAME TABLE Statement”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
ALTER ROUTINE
</h3>
<dl>
<dt>
<a class="xref" href="alter-function.html" title="15.1.4 ALTER FUNCTION Statement">
Section 15.1.4, “ALTER FUNCTION Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="alter-procedure.html" title="15.1.7 ALTER PROCEDURE Statement">
Section 15.1.7, “ALTER PROCEDURE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="replication-options-binary-log.html" title="19.1.6.4 Binary Logging Options and Variables">
Section 19.1.6.4, “Binary Logging Options and Variables”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="create-procedure.html" title="15.1.17 CREATE PROCEDURE and CREATE FUNCTION Statements">
Section 15.1.17, “CREATE PROCEDURE and CREATE FUNCTION Statements”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="drop-procedure.html" title="15.1.29 DROP PROCEDURE and DROP FUNCTION Statements">
Section 15.1.29, “DROP PROCEDURE and DROP FUNCTION Statements”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="server-system-variables.html" title="7.1.8 Server System Variables">
Section 7.1.8, “Server System Variables”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="show-create-procedure.html" title="15.7.7.10 SHOW CREATE PROCEDURE Statement">
Section 15.7.7.10, “SHOW CREATE PROCEDURE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="show-procedure-status.html" title="15.7.7.30 SHOW PROCEDURE STATUS Statement">
Section 15.7.7.30, “SHOW PROCEDURE STATUS Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="stored-programs-logging.html" title="27.7 Stored Program Binary Logging">
Section 27.7, “Stored Program Binary Logging”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="stored-routines-privileges.html" title="27.2.2 Stored Routines and MySQL Privileges">
Section 27.2.2, “Stored Routines and MySQL Privileges”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="information-schema-routines-table.html" title="28.3.30 The INFORMATION_SCHEMA ROUTINES Table">
Section 28.3.30, “The INFORMATION_SCHEMA ROUTINES Table”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
APPLICATION_PASSWORD_ADMIN
</h3>
<dl>
<dt>
<a class="xref" href="alter-user.html" title="15.7.1.1 ALTER USER Statement">
Section 15.7.1.1, “ALTER USER Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="password-management.html" title="8.2.15 Password Management">
Section 8.2.15, “Password Management”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="set-password.html" title="15.7.1.10 SET PASSWORD Statement">
Section 15.7.1.10, “SET PASSWORD Statement”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
AUDIT_ABORT_EXEMPT
</h3>
<dl>
<dt>
<a class="xref" href="account-categories.html" title="8.2.11 Account Categories">
Section 8.2.11, “Account Categories”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="audit-log-filtering.html" title="8.4.5.7 Audit Log Filtering">
Section 8.4.5.7, “Audit Log Filtering”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="audit-log-elements.html" title="8.4.5.1 Elements of MySQL Enterprise Audit">
Section 8.4.5.1, “Elements of MySQL Enterprise Audit”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="audit-log-filter-definitions.html" title="8.4.5.8 Writing Audit Log Filter Definitions">
Section 8.4.5.8, “Writing Audit Log Filter Definitions”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
AUDIT_ADMIN
</h3>
<dl>
<dt>
<a class="xref" href="audit-log-filtering.html" title="8.4.5.7 Audit Log Filtering">
Section 8.4.5.7, “Audit Log Filtering”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="audit-log-reference.html" title="8.4.5.11 Audit Log Reference">
Section 8.4.5.11, “Audit Log Reference”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="audit-log-logging-configuration.html" title="8.4.5.5 Configuring Audit Logging Characteristics">
Section 8.4.5.5, “Configuring Audit Logging Characteristics”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="audit-log-disabling.html" title="8.4.5.9 Disabling Audit Logging">
Section 8.4.5.9, “Disabling Audit Logging”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="audit-log-elements.html" title="8.4.5.1 Elements of MySQL Enterprise Audit">
Section 8.4.5.1, “Elements of MySQL Enterprise Audit”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
AUTHENTICATION_POLICY_ADMIN
</h3>
<dl>
<dt>
<a class="xref" href="alter-user.html" title="15.7.1.1 ALTER USER Statement">
Section 15.7.1.1, “ALTER USER Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="create-user.html" title="15.7.1.3 CREATE USER Statement">
Section 15.7.1.3, “CREATE USER Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="multifactor-authentication.html" title="8.2.18 Multifactor Authentication">
Section 8.2.18, “Multifactor Authentication”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="server-system-variables.html" title="7.1.8 Server System Variables">
Section 7.1.8, “Server System Variables”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<a name="priv-index-B">
</a>
<h3 class="title">
B
</h3>
<p>
[
<a class="link" href="dynindex-priv.html#priv-index-top">
index top
</a>
]
</p>
<dl>
<dt>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
BACKUP_ADMIN
</h3>
<dl>
<dt>
<a class="xref" href="clone-plugin-local.html" title="7.6.7.2 Cloning Data Locally">
Section 7.6.7.2, “Cloning Data Locally”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="group-replication-cloning.html" title="20.5.4.2 Cloning for Distributed Recovery">
Section 20.5.4.2, “Cloning for Distributed Recovery”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="clone-plugin-remote.html" title="7.6.7.3 Cloning Remote Data">
Section 7.6.7.3, “Cloning Remote Data”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="group-replication-connection-security.html" title="20.6.1 Communication Stack for Connection Security Management">
Section 20.6.1, “Communication Stack for Connection Security Management”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="lock-instance-for-backup.html" title="15.3.5 LOCK INSTANCE FOR BACKUP and UNLOCK INSTANCE Statements">
Section 15.3.5, “LOCK INSTANCE FOR BACKUP and UNLOCK INSTANCE Statements”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="group-replication-cloning.html#group-replication-cloning-prerequisites" title="20.5.4.2.1 Prerequisites for Cloning">
Section 20.5.4.2.1, “Prerequisites for Cloning”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="group-replication-user-credentials.html" title="20.2.1.3 User Credentials For Distributed Recovery">
Section 20.2.1.3, “User Credentials For Distributed Recovery”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
BINLOG_ADMIN
</h3>
<dl>
<dt>
<a class="xref" href="binlog.html" title="15.7.8.1 BINLOG Statement">
Section 15.7.8.1, “BINLOG Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="mysqlbinlog.html" title="6.6.9 mysqlbinlog — Utility for Processing Binary Log Files">
Section 6.6.9, “mysqlbinlog — Utility for Processing Binary Log Files”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="partial-revokes.html" title="8.2.12 Privilege Restriction Using Partial Revokes">
Section 8.2.12, “Privilege Restriction Using Partial Revokes”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="purge-binary-logs.html" title="15.4.1.1 PURGE BINARY LOGS Statement">
Section 15.4.1.1, “PURGE BINARY LOGS Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="mysql-nutshell.html" title="1.4 What Is New in MySQL 8.4 since MySQL 8.0">
Section 1.4, “What Is New in MySQL 8.4 since MySQL 8.0”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
BINLOG_ENCRYPTION_ADMIN
</h3>
<dl>
<dt>
<a class="xref" href="alter-instance.html" title="15.1.5 ALTER INSTANCE Statement">
Section 15.1.5, “ALTER INSTANCE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="replication-binlog-encryption-key-rotation.html" title="19.3.2.3 Binary Log Master Key Rotation">
Section 19.3.2.3, “Binary Log Master Key Rotation”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="replication-binlog-encryption.html" title="19.3.2 Encrypting Binary Log Files and Relay Log Files">
Section 19.3.2, “Encrypting Binary Log Files and Relay Log Files”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<a name="priv-index-C">
</a>
<h3 class="title">
C
</h3>
<p>
[
<a class="link" href="dynindex-priv.html#priv-index-top">
index top
</a>
]
</p>
<dl>
<dt>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
CLONE_ADMIN
</h3>
<dl>
<dt>
<a class="xref" href="clone-plugin-options-variables.html" title="7.6.7.13 Clone System Variables">
Section 7.6.7.13, “Clone System Variables”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="clone-plugin-remote.html" title="7.6.7.3 Cloning Remote Data">
Section 7.6.7.3, “Cloning Remote Data”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="group-replication-cloning.html#group-replication-cloning-prerequisites" title="20.5.4.2.1 Prerequisites for Cloning">
Section 20.5.4.2.1, “Prerequisites for Cloning”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
CONNECTION_ADMIN
</h3>
<dl>
<dt>
<a class="xref" href="account-categories.html" title="8.2.11 Account Categories">
Section 8.2.11, “Account Categories”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="account-management-statements.html" title="15.7.1 Account Management Statements">
Section 15.7.1, “Account Management Statements”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="administrative-connection-interface.html" title="7.1.12.2 Administrative Connection Management">
Section 7.1.12.2, “Administrative Connection Management”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="alter-instance.html" title="15.1.5 ALTER INSTANCE Statement">
Section 15.1.5, “ALTER INSTANCE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="alter-user.html" title="15.7.1.1 ALTER USER Statement">
Section 15.7.1.1, “ALTER USER Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="assigning-passwords.html" title="8.2.14 Assigning Account Passwords">
Section 8.2.14, “Assigning Account Passwords”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="group-replication-connection-security.html" title="20.6.1 Communication Stack for Connection Security Management">
Section 20.6.1, “Communication Stack for Connection Security Management”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="charset-applications.html" title="12.5 Configuring Application Character Set and Collation">
Section 12.5, “Configuring Application Character Set and Collation”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="group-replication-member-actions.html" title="20.5.1.5 Configuring Member Actions">
Section 20.5.1.5, “Configuring Member Actions”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="using-encrypted-connections.html" title="8.3.1 Configuring MySQL to Use Encrypted Connections">
Section 8.3.1, “Configuring MySQL to Use Encrypted Connections”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="connection-interfaces.html" title="7.1.12.1 Connection Interfaces">
Section 7.1.12.1, “Connection Interfaces”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="create-role.html" title="15.7.1.2 CREATE ROLE Statement">
Section 15.7.1.2, “CREATE ROLE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="create-user.html" title="15.7.1.3 CREATE USER Statement">
Section 15.7.1.3, “CREATE USER Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="drop-role.html" title="15.7.1.4 DROP ROLE Statement">
Section 15.7.1.4, “DROP ROLE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="drop-user.html" title="15.7.1.5 DROP USER Statement">
Section 15.7.1.5, “DROP USER Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="group-replication-responses-failure-exit.html" title="20.7.7.4 Exit Action">
Section 20.7.7.4, “Exit Action”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="group-replication-functions-for-member-actions.html" title="14.18.1.5 Functions to Set and Reset Group Replication Member Actions">
Section 14.18.1.5, “Functions to Set and Reset Group Replication Member Actions”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="group-replication-system-variables.html" title="20.9.1 Group Replication System Variables">
Section 20.9.1, “Group Replication System Variables”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="kill.html" title="15.7.8.4 KILL Statement">
Section 15.7.8.4, “KILL Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="security-against-attack.html" title="8.1.3 Making MySQL Secure Against Attackers">
Section 8.1.3, “Making MySQL Secure Against Attackers”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="mysqladmin.html" title="6.5.2 mysqladmin — A MySQL Server Administration Program">
Section 6.5.2, “mysqladmin — A MySQL Server Administration Program”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="rename-user.html" title="15.7.1.7 RENAME USER Statement">
Section 15.7.1.7, “RENAME USER Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="reusing-ssl-sessions.html" title="8.3.5 Reusing SSL Sessions">
Section 8.3.5, “Reusing SSL Sessions”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="revoke.html" title="15.7.1.8 REVOKE Statement">
Section 15.7.1.8, “REVOKE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="server-system-variables.html" title="7.1.8 Server System Variables">
Section 7.1.8, “Server System Variables”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="set-password.html" title="15.7.1.10 SET PASSWORD Statement">
Section 15.7.1.10, “SET PASSWORD Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="set-transaction.html" title="15.3.7 SET TRANSACTION Statement">
Section 15.3.7, “SET TRANSACTION Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="show-processlist.html" title="15.7.7.31 SHOW PROCESSLIST Statement">
Section 15.7.7.31, “SHOW PROCESSLIST Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="commit.html" title="15.3.1 START TRANSACTION, COMMIT, and ROLLBACK Statements">
Section 15.3.1, “START TRANSACTION, COMMIT, and ROLLBACK Statements”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="too-many-connections.html" title="B.3.2.5 Too many connections">
Section B.3.2.5, “Too many connections”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="group-replication-user-credentials.html" title="20.2.1.3 User Credentials For Distributed Recovery">
Section 20.2.1.3, “User Credentials For Distributed Recovery”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
CREATE
</h3>
<dl>
<dt>
<a class="xref" href="alter-table.html" title="15.1.9 ALTER TABLE Statement">
Section 15.1.9, “ALTER TABLE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="create-database.html" title="15.1.12 CREATE DATABASE Statement">
Section 15.1.12, “CREATE DATABASE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="create-table.html" title="15.1.20 CREATE TABLE Statement">
Section 15.1.20, “CREATE TABLE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="partitioning-management-exchange.html" title="26.3.3 Exchanging Partitions and Subpartitions with Tables">
Section 26.3.3, “Exchanging Partitions and Subpartitions with Tables”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="import-table.html" title="15.2.6 IMPORT TABLE Statement">
Section 15.2.6, “IMPORT TABLE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="rename-table.html" title="15.1.36 RENAME TABLE Statement">
Section 15.1.36, “RENAME TABLE Statement”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
CREATE ROLE
</h3>
<dl>
<dt>
<a class="xref" href="create-role.html" title="15.7.1.2 CREATE ROLE Statement">
Section 15.7.1.2, “CREATE ROLE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="replication-privilege-checks-account.html" title="19.3.3.1 Privileges For The Replication PRIVILEGE_CHECKS_USER Account">
Section 19.3.3.1, “Privileges For The Replication PRIVILEGE_CHECKS_USER Account”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="roles.html" title="8.2.10 Using Roles">
Section 8.2.10, “Using Roles”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
CREATE ROUTINE
</h3>
<dl>
<dt>
<a class="xref" href="replication-options-binary-log.html" title="19.1.6.4 Binary Logging Options and Variables">
Section 19.1.6.4, “Binary Logging Options and Variables”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="create-procedure.html" title="15.1.17 CREATE PROCEDURE and CREATE FUNCTION Statements">
Section 15.1.17, “CREATE PROCEDURE and CREATE FUNCTION Statements”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="faqs-stored-procs.html" title="A.4 MySQL 8.4 FAQ: Stored Procedures and Functions">
Section A.4, “MySQL 8.4 FAQ: Stored Procedures and Functions”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="show-create-procedure.html" title="15.7.7.10 SHOW CREATE PROCEDURE Statement">
Section 15.7.7.10, “SHOW CREATE PROCEDURE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="show-procedure-status.html" title="15.7.7.30 SHOW PROCEDURE STATUS Statement">
Section 15.7.7.30, “SHOW PROCEDURE STATUS Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="stored-programs-logging.html" title="27.7 Stored Program Binary Logging">
Section 27.7, “Stored Program Binary Logging”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="stored-routines-privileges.html" title="27.2.2 Stored Routines and MySQL Privileges">
Section 27.2.2, “Stored Routines and MySQL Privileges”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="information-schema-routines-table.html" title="28.3.30 The INFORMATION_SCHEMA ROUTINES Table">
Section 28.3.30, “The INFORMATION_SCHEMA ROUTINES Table”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
CREATE TABLESPACE
</h3>
<dl>
<dt>
<a class="xref" href="alter-tablespace.html" title="15.1.10 ALTER TABLESPACE Statement">
Section 15.1.10, “ALTER TABLESPACE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="general-tablespaces.html" title="17.6.3.3 General Tablespaces">
Section 17.6.3.3, “General Tablespaces”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="innodb-data-encryption.html" title="17.13 InnoDB Data-at-Rest Encryption">
Section 17.13, “InnoDB Data-at-Rest Encryption”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
CREATE TEMPORARY TABLES
</h3>
<dl>
<dt>
<a class="xref" href="create-temporary-table.html" title="15.1.20.2 CREATE TEMPORARY TABLE Statement">
Section 15.1.20.2, “CREATE TEMPORARY TABLE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
CREATE USER
</h3>
<dl>
<dt>
<a class="xref" href="account-categories.html" title="8.2.11 Account Categories">
Section 8.2.11, “Account Categories”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="creating-accounts.html" title="8.2.8 Adding Accounts, Assigning Privileges, and Dropping Accounts">
Section 8.2.8, “Adding Accounts, Assigning Privileges, and Dropping Accounts”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="alter-user.html" title="15.7.1.1 ALTER USER Statement">
Section 15.7.1.1, “ALTER USER Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="assigning-passwords.html" title="8.2.14 Assigning Account Passwords">
Section 8.2.14, “Assigning Account Passwords”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="create-role.html" title="15.7.1.2 CREATE ROLE Statement">
Section 15.7.1.2, “CREATE ROLE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="create-user.html" title="15.7.1.3 CREATE USER Statement">
Section 15.7.1.3, “CREATE USER Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="drop-role.html" title="15.7.1.4 DROP ROLE Statement">
Section 15.7.1.4, “DROP ROLE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="drop-user.html" title="15.7.1.5 DROP USER Statement">
Section 15.7.1.5, “DROP USER Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="password-management.html" title="8.2.15 Password Management">
Section 8.2.15, “Password Management”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="replication-privilege-checks-account.html" title="19.3.3.1 Privileges For The Replication PRIVILEGE_CHECKS_USER Account">
Section 19.3.3.1, “Privileges For The Replication PRIVILEGE_CHECKS_USER Account”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="rename-user.html" title="15.7.1.7 RENAME USER Statement">
Section 15.7.1.7, “RENAME USER Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="revoke.html" title="15.7.1.8 REVOKE Statement">
Section 15.7.1.8, “REVOKE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="set-default-role.html" title="15.7.1.9 SET DEFAULT ROLE Statement">
Section 15.7.1.9, “SET DEFAULT ROLE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="set-password.html" title="15.7.1.10 SET PASSWORD Statement">
Section 15.7.1.10, “SET PASSWORD Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="information-schema-user-attributes-table.html" title="28.3.45 The INFORMATION_SCHEMA USER_ATTRIBUTES Table">
Section 28.3.45, “The INFORMATION_SCHEMA USER_ATTRIBUTES Table”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="roles.html" title="8.2.10 Using Roles">
Section 8.2.10, “Using Roles”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="webauthn-pluggable-authentication.html" title="8.4.1.11 WebAuthn Pluggable Authentication">
Section 8.4.1.11, “WebAuthn Pluggable Authentication”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
CREATE VIEW
</h3>
<dl>
<dt>
<a class="xref" href="alter-view.html" title="15.1.11 ALTER VIEW Statement">
Section 15.1.11, “ALTER VIEW Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="create-view.html" title="15.1.23 CREATE VIEW Statement">
Section 15.1.23, “CREATE VIEW Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="view-restrictions.html" title="27.9 Restrictions on Views">
Section 27.9, “Restrictions on Views”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<a name="priv-index-D">
</a>
<h3 class="title">
D
</h3>
<p>
[
<a class="link" href="dynindex-priv.html#priv-index-top">
index top
</a>
]
</p>
<dl>
<dt>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
DELETE
</h3>
<dl>
<dt>
<a class="xref" href="request-access.html" title="8.2.7 Access Control, Stage 2: Request Verification">
Section 8.2.7, “Access Control, Stage 2: Request Verification”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="create-table.html" title="15.1.20 CREATE TABLE Statement">
Section 15.1.20, “CREATE TABLE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="delete.html" title="15.2.2 DELETE Statement">
Section 15.2.2, “DELETE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="drop-function-loadable.html" title="15.7.4.2 DROP FUNCTION Statement for Loadable Functions">
Section 15.7.4.2, “DROP FUNCTION Statement for Loadable Functions”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="drop-user.html" title="15.7.1.5 DROP USER Statement">
Section 15.7.1.5, “DROP USER Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="function-loading.html" title="7.7.1 Installing and Uninstalling Loadable Functions">
Section 7.7.1, “Installing and Uninstalling Loadable Functions”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="plugin-loading.html" title="7.6.1 Installing and Uninstalling Plugins">
Section 7.6.1, “Installing and Uninstalling Plugins”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="innodb-locking-reads.html" title="17.7.2.4 Locking Reads">
Section 17.7.2.4, “Locking Reads”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="mysql-cluster-security-mysql-privileges.html" title="25.6.21.2 NDB Cluster and MySQL Privileges">
Section 25.6.21.2, “NDB Cluster and MySQL Privileges”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="partial-revokes.html" title="8.2.12 Privilege Restriction Using Partial Revokes">
Section 8.2.12, “Privilege Restriction Using Partial Revokes”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="replication-privilege-checks-account.html" title="19.3.3.1 Privileges For The Replication PRIVILEGE_CHECKS_USER Account">
Section 19.3.3.1, “Privileges For The Replication PRIVILEGE_CHECKS_USER Account”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="replace.html" title="15.2.12 REPLACE Statement">
Section 15.2.12, “REPLACE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="merge-storage-engine.html" title="18.7 The MERGE Storage Engine">
Section 18.7, “The MERGE Storage Engine”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="performance-schema-setup-objects-table.html" title="29.12.2.4 The setup_objects Table">
Section 29.12.2.4, “The setup_objects Table”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="uninstall-component.html" title="15.7.4.5 UNINSTALL COMPONENT Statement">
Section 15.7.4.5, “UNINSTALL COMPONENT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="uninstall-plugin.html" title="15.7.4.6 UNINSTALL PLUGIN Statement">
Section 15.7.4.6, “UNINSTALL PLUGIN Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="roles.html" title="8.2.10 Using Roles">
Section 8.2.10, “Using Roles”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
DROP
</h3>
<dl>
<dt>
<a class="xref" href="access-control.html" title="8.2 Access Control and Account Management">
Section 8.2, “Access Control and Account Management”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="alter-table.html" title="15.1.9 ALTER TABLE Statement">
Section 15.1.9, “ALTER TABLE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="alter-view.html" title="15.1.11 ALTER VIEW Statement">
Section 15.1.11, “ALTER VIEW Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="create-view.html" title="15.1.23 CREATE VIEW Statement">
Section 15.1.23, “CREATE VIEW Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="host-cache.html" title="7.1.12.3 DNS Lookups and the Host Cache">
Section 7.1.12.3, “DNS Lookups and the Host Cache”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="drop-database.html" title="15.1.24 DROP DATABASE Statement">
Section 15.1.24, “DROP DATABASE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="drop-table.html" title="15.1.32 DROP TABLE Statement">
Section 15.1.32, “DROP TABLE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="drop-view.html" title="15.1.35 DROP VIEW Statement">
Section 15.1.35, “DROP VIEW Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="partitioning-management-exchange.html" title="26.3.3 Exchanging Partitions and Subpartitions with Tables">
Section 26.3.3, “Exchanging Partitions and Subpartitions with Tables”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="partitioning-management-range-list.html" title="26.3.1 Management of RANGE and LIST Partitions">
Section 26.3.1, “Management of RANGE and LIST Partitions”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="enterprise-encryption-installation.html" title="8.6.1 MySQL Enterprise Encryption Installation and Upgrading">
Section 8.6.1, “MySQL Enterprise Encryption Installation and Upgrading”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="performance-schema-table-characteristics.html" title="29.11 Performance Schema General Table Characteristics">
Section 29.11, “Performance Schema General Table Characteristics”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="rename-table.html" title="15.1.36 RENAME TABLE Statement">
Section 15.1.36, “RENAME TABLE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="performance-schema-host-cache-table.html" title="29.12.22.3 The host_cache Table">
Section 29.12.22.3, “The host_cache Table”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="truncate-table.html" title="15.1.37 TRUNCATE TABLE Statement">
Section 15.1.37, “TRUNCATE TABLE Statement”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
DROP ROLE
</h3>
<dl>
<dt>
<a class="xref" href="drop-role.html" title="15.7.1.4 DROP ROLE Statement">
Section 15.7.1.4, “DROP ROLE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="replication-privilege-checks-account.html" title="19.3.3.1 Privileges For The Replication PRIVILEGE_CHECKS_USER Account">
Section 19.3.3.1, “Privileges For The Replication PRIVILEGE_CHECKS_USER Account”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="roles.html" title="8.2.10 Using Roles">
Section 8.2.10, “Using Roles”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<a name="priv-index-E">
</a>
<h3 class="title">
E
</h3>
<p>
[
<a class="link" href="dynindex-priv.html#priv-index-top">
index top
</a>
]
</p>
<dl>
<dt>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
ENCRYPTION_KEY_ADMIN
</h3>
<dl>
<dt>
<a class="xref" href="alter-instance.html" title="15.1.5 ALTER INSTANCE Statement">
Section 15.1.5, “ALTER INSTANCE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="innodb-data-encryption.html" title="17.13 InnoDB Data-at-Rest Encryption">
Section 17.13, “InnoDB Data-at-Rest Encryption”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="keyring-system-variables.html" title="8.4.4.16 Keyring System Variables">
Section 8.4.4.16, “Keyring System Variables”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="keyring-key-migration.html" title="8.4.4.11 Migrating Keys Between Keyring Keystores">
Section 8.4.4.11, “Migrating Keys Between Keyring Keystores”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
EVENT
</h3>
<dl>
<dt>
<a class="xref" href="alter-event.html" title="15.1.3 ALTER EVENT Statement">
Section 15.1.3, “ALTER EVENT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="create-event.html" title="15.1.13 CREATE EVENT Statement">
Section 15.1.13, “CREATE EVENT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="drop-event.html" title="15.1.25 DROP EVENT Statement">
Section 15.1.25, “DROP EVENT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="events-overview.html" title="27.4.1 Event Scheduler Overview">
Section 27.4.1, “Event Scheduler Overview”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="events-syntax.html" title="27.4.3 Event Syntax">
Section 27.4.3, “Event Syntax”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="mysqldump.html" title="6.5.4 mysqldump — A Database Backup Program">
Section 6.5.4, “mysqldump — A Database Backup Program”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="show-create-event.html" title="15.7.7.8 SHOW CREATE EVENT Statement">
Section 15.7.7.8, “SHOW CREATE EVENT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="show-events.html" title="15.7.7.19 SHOW EVENTS Statement">
Section 15.7.7.19, “SHOW EVENTS Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="events-privileges.html" title="27.4.6 The Event Scheduler and MySQL Privileges">
Section 27.4.6, “The Event Scheduler and MySQL Privileges”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
EXECUTE
</h3>
<dl>
<dt>
<a class="xref" href="create-procedure.html" title="15.1.17 CREATE PROCEDURE and CREATE FUNCTION Statements">
Section 15.1.17, “CREATE PROCEDURE and CREATE FUNCTION Statements”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="drop-procedure.html" title="15.1.29 DROP PROCEDURE and DROP FUNCTION Statements">
Section 15.1.29, “DROP PROCEDURE and DROP FUNCTION Statements”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="keyring-functions-general-purpose.html" title="8.4.4.12 General-Purpose Keyring Key-Management Functions">
Section 8.4.4.12, “General-Purpose Keyring Key-Management Functions”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="clone-plugin-monitoring.html" title="7.6.7.10 Monitoring Cloning Operations">
Section 7.6.7.10, “Monitoring Cloning Operations”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="sys-schema-prerequisites.html" title="30.1 Prerequisites for Using the sys Schema">
Section 30.1, “Prerequisites for Using the sys Schema”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="server-system-variables.html" title="7.1.8 Server System Variables">
Section 7.1.8, “Server System Variables”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="show-create-procedure.html" title="15.7.7.10 SHOW CREATE PROCEDURE Statement">
Section 15.7.7.10, “SHOW CREATE PROCEDURE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="show-procedure-status.html" title="15.7.7.30 SHOW PROCEDURE STATUS Statement">
Section 15.7.7.30, “SHOW PROCEDURE STATUS Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="stored-objects-security.html" title="27.6 Stored Object Access Control">
Section 27.6, “Stored Object Access Control”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="stored-routines-privileges.html" title="27.2.2 Stored Routines and MySQL Privileges">
Section 27.2.2, “Stored Routines and MySQL Privileges”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="information-schema-routines-table.html" title="28.3.30 The INFORMATION_SCHEMA ROUTINES Table">
Section 28.3.30, “The INFORMATION_SCHEMA ROUTINES Table”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="firewall-usage.html" title="8.4.7.3 Using MySQL Enterprise Firewall">
Section 8.4.7.3, “Using MySQL Enterprise Firewall”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<a name="priv-index-F">
</a>
<h3 class="title">
F
</h3>
<p>
[
<a class="link" href="dynindex-priv.html#priv-index-top">
index top
</a>
]
</p>
<dl>
<dt>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
FILE
</h3>
<dl>
<dt>
<a class="xref" href="create-table.html" title="15.1.20 CREATE TABLE Statement">
Section 15.1.20, “CREATE TABLE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="mysqldump-delimited-text.html" title="9.4.3 Dumping Data in Delimited-Text Format with mysqldump">
Section 9.4.3, “Dumping Data in Delimited-Text Format with mysqldump”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant-tables.html" title="8.2.3 Grant Tables">
Section 8.2.3, “Grant Tables”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="import-table.html" title="15.2.6 IMPORT TABLE Statement">
Section 15.2.6, “IMPORT TABLE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="load-data.html" title="15.2.9 LOAD DATA Statement">
Section 15.2.9, “LOAD DATA Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="load-xml.html" title="15.2.10 LOAD XML Statement">
Section 15.2.10, “LOAD XML Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="security-against-attack.html" title="8.1.3 Making MySQL Secure Against Attackers">
Section 8.1.3, “Making MySQL Secure Against Attackers”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="enterprise-encryption-usage.html" title="8.6.3 MySQL Enterprise Encryption Usage and Examples">
Section 8.6.3, “MySQL Enterprise Encryption Usage and Examples”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="mysqldump.html" title="6.5.4 mysqldump — A Database Backup Program">
Section 6.5.4, “mysqldump — A Database Backup Program”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="partial-revokes.html" title="8.2.12 Privilege Restriction Using Partial Revokes">
Section 8.2.12, “Privilege Restriction Using Partial Revokes”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="replication-privilege-checks-account.html" title="19.3.3.1 Privileges For The Replication PRIVILEGE_CHECKS_USER Account">
Section 19.3.3.1, “Privileges For The Replication PRIVILEGE_CHECKS_USER Account”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="replication-features-load-data.html" title="19.5.1.19 Replication and LOAD DATA">
Section 19.5.1.19, “Replication and LOAD DATA”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="select-into.html" title="15.2.13.1 SELECT ... INTO Statement">
Section 15.2.13.1, “SELECT ... INTO Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="server-system-variables.html" title="7.1.8 Server System Variables">
Section 7.1.8, “Server System Variables”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="string-functions.html" title="14.8 String Functions and Operators">
Section 14.8, “String Functions and Operators”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="blob.html" title="13.3.4 The BLOB and TEXT Types">
Section 13.3.4, “The BLOB and TEXT Types”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="problems-connecting.html" title="8.2.22 Troubleshooting Problems Connecting to MySQL">
Section 8.2.22, “Troubleshooting Problems Connecting to MySQL”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
FIREWALL_ADMIN
</h3>
<dl>
<dt>
<a class="xref" href="firewall-elements.html" title="8.4.7.1 Elements of MySQL Enterprise Firewall">
Section 8.4.7.1, “Elements of MySQL Enterprise Firewall”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="firewall-reference.html" title="8.4.7.4 MySQL Enterprise Firewall Reference">
Section 8.4.7.4, “MySQL Enterprise Firewall Reference”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="firewall-usage.html" title="8.4.7.3 Using MySQL Enterprise Firewall">
Section 8.4.7.3, “Using MySQL Enterprise Firewall”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
FIREWALL_EXEMPT
</h3>
<dl>
<dt>
<a class="xref" href="firewall-elements.html" title="8.4.7.1 Elements of MySQL Enterprise Firewall">
Section 8.4.7.1, “Elements of MySQL Enterprise Firewall”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="firewall-usage.html" title="8.4.7.3 Using MySQL Enterprise Firewall">
Section 8.4.7.3, “Using MySQL Enterprise Firewall”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
FIREWALL_USER
</h3>
<dl>
<dt>
<a class="xref" href="firewall-elements.html" title="8.4.7.1 Elements of MySQL Enterprise Firewall">
Section 8.4.7.1, “Elements of MySQL Enterprise Firewall”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="firewall-usage.html" title="8.4.7.3 Using MySQL Enterprise Firewall">
Section 8.4.7.3, “Using MySQL Enterprise Firewall”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
FLUSH_OPTIMIZER_COSTS
</h3>
<dl>
<dt>
<a class="xref" href="flush.html" title="15.7.8.3 FLUSH Statement">
Section 15.7.8.3, “FLUSH Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
FLUSH_PRIVILEGES
</h3>
<dl>
<dt>
<a class="xref" href="flush.html" title="15.7.8.3 FLUSH Statement">
Section 15.7.8.3, “FLUSH Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="mysql-nutshell.html" title="1.4 What Is New in MySQL 8.4 since MySQL 8.0">
Section 1.4, “What Is New in MySQL 8.4 since MySQL 8.0”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
FLUSH_STATUS
</h3>
<dl>
<dt>
<a class="xref" href="flush.html" title="15.7.8.3 FLUSH Statement">
Section 15.7.8.3, “FLUSH Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
FLUSH_TABLES
</h3>
<dl>
<dt>
<a class="xref" href="flush.html" title="15.7.8.3 FLUSH Statement">
Section 15.7.8.3, “FLUSH Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="mysqldump.html" title="6.5.4 mysqldump — A Database Backup Program">
Section 6.5.4, “mysqldump — A Database Backup Program”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
FLUSH_USER_RESOURCES
</h3>
<dl>
<dt>
<a class="xref" href="flush.html" title="15.7.8.3 FLUSH Statement">
Section 15.7.8.3, “FLUSH Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<a name="priv-index-G">
</a>
<h3 class="title">
G
</h3>
<p>
[
<a class="link" href="dynindex-priv.html#priv-index-top">
index top
</a>
]
</p>
<dl>
<dt>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
GRANT OPTION
</h3>
<dl>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="replication-privilege-checks-account.html" title="19.3.3.1 Privileges For The Replication PRIVILEGE_CHECKS_USER Account">
Section 19.3.3.1, “Privileges For The Replication PRIVILEGE_CHECKS_USER Account”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="revoke.html" title="15.7.1.8 REVOKE Statement">
Section 15.7.1.8, “REVOKE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="show-grants.html" title="15.7.7.22 SHOW GRANTS Statement">
Section 15.7.7.22, “SHOW GRANTS Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="information-schema-column-privileges-table.html" title="28.3.10 The INFORMATION_SCHEMA COLUMN_PRIVILEGES Table">
Section 28.3.10, “The INFORMATION_SCHEMA COLUMN_PRIVILEGES Table”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="information-schema-schema-privileges-table.html" title="28.3.33 The INFORMATION_SCHEMA SCHEMA_PRIVILEGES Table">
Section 28.3.33, “The INFORMATION_SCHEMA SCHEMA_PRIVILEGES Table”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="information-schema-table-privileges-table.html" title="28.3.43 The INFORMATION_SCHEMA TABLE_PRIVILEGES Table">
Section 28.3.43, “The INFORMATION_SCHEMA TABLE_PRIVILEGES Table”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="information-schema-user-privileges-table.html" title="28.3.46 The INFORMATION_SCHEMA USER_PRIVILEGES Table">
Section 28.3.46, “The INFORMATION_SCHEMA USER_PRIVILEGES Table”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
GROUP_REPLICATION_ADMIN
</h3>
<dl>
<dt>
<a class="xref" href="group-replication-member-actions.html" title="20.5.1.5 Configuring Member Actions">
Section 20.5.1.5, “Configuring Member Actions”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="group-replication-functions-for-maximum-consensus.html" title="14.18.1.3 Functions to Inspect and Configure the Maximum Consensus Instances of a Group">
Section 14.18.1.3, “Functions to Inspect and Configure the Maximum Consensus Instances of a
Group”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="group-replication-functions-for-communication-protocol.html" title="14.18.1.4 Functions to Inspect and Set the Group Replication Communication Protocol Version">
Section 14.18.1.4, “Functions to Inspect and Set the Group Replication Communication
Protocol Version”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="group-replication-functions-for-member-actions.html" title="14.18.1.5 Functions to Set and Reset Group Replication Member Actions">
Section 14.18.1.5, “Functions to Set and Reset Group Replication Member Actions”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="group-replication-system-variables.html" title="20.9.1 Group Replication System Variables">
Section 20.9.1, “Group Replication System Variables”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="group-replication-communication-protocol.html" title="20.5.1.4 Setting a Group's Communication Protocol Version">
Section 20.5.1.4, “Setting a Group's Communication Protocol Version”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="start-group-replication.html" title="15.4.3.1 START GROUP_REPLICATION Statement">
Section 15.4.3.1, “START GROUP_REPLICATION Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="stop-group-replication.html" title="15.4.3.2 STOP GROUP_REPLICATION Statement">
Section 15.4.3.2, “STOP GROUP_REPLICATION Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="group-replication-group-write-consensus.html" title="20.5.1.3 Using Group Replication Group Write Consensus">
Section 20.5.1.3, “Using Group Replication Group Write Consensus”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
GROUP_REPLICATION_STREAM
</h3>
<dl>
<dt>
<a class="xref" href="change-replication-source-to.html" title="15.4.2.2 CHANGE REPLICATION SOURCE TO Statement">
Section 15.4.2.2, “CHANGE REPLICATION SOURCE TO Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="group-replication-connection-security.html" title="20.6.1 Communication Stack for Connection Security Management">
Section 20.6.1, “Communication Stack for Connection Security Management”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="group-replication-secure-user.html#group-replication-secure-user-ssl" title="20.6.3.1.2 Replication User With SSL">
Section 20.6.3.1.2, “Replication User With SSL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="group-replication-user-credentials.html" title="20.2.1.3 User Credentials For Distributed Recovery">
Section 20.2.1.3, “User Credentials For Distributed Recovery”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<a name="priv-index-I">
</a>
<h3 class="title">
I
</h3>
<p>
[
<a class="link" href="dynindex-priv.html#priv-index-top">
index top
</a>
]
</p>
<dl>
<dt>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
INDEX
</h3>
<dl>
<dt>
<a class="xref" href="alter-table.html" title="15.1.9 ALTER TABLE Statement">
Section 15.1.9, “ALTER TABLE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
INNODB_REDO_LOG_ARCHIVE
</h3>
<dl>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="innodb-redo-log.html" title="17.6.5 Redo Log">
Section 17.6.5, “Redo Log”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
INNODB_REDO_LOG_ENABLE
</h3>
<dl>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="innodb-redo-log.html" title="17.6.5 Redo Log">
Section 17.6.5, “Redo Log”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
INSERT
</h3>
<dl>
<dt>
<a class="xref" href="request-access.html" title="8.2.7 Access Control, Stage 2: Request Verification">
Section 8.2.7, “Access Control, Stage 2: Request Verification”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="alter-table.html" title="15.1.9 ALTER TABLE Statement">
Section 15.1.9, “ALTER TABLE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="analyze-table.html" title="15.7.3.1 ANALYZE TABLE Statement">
Section 15.7.3.1, “ANALYZE TABLE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="assigning-passwords.html" title="8.2.14 Assigning Account Passwords">
Section 8.2.14, “Assigning Account Passwords”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="create-function-loadable.html" title="15.7.4.1 CREATE FUNCTION Statement for Loadable Functions">
Section 15.7.4.1, “CREATE FUNCTION Statement for Loadable Functions”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="create-user.html" title="15.7.1.3 CREATE USER Statement">
Section 15.7.1.3, “CREATE USER Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="create-view.html" title="15.1.23 CREATE VIEW Statement">
Section 15.1.23, “CREATE VIEW Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="partitioning-management-exchange.html" title="26.3.3 Exchanging Partitions and Subpartitions with Tables">
Section 26.3.3, “Exchanging Partitions and Subpartitions with Tables”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="insert.html" title="15.2.7 INSERT Statement">
Section 15.2.7, “INSERT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="install-component.html" title="15.7.4.3 INSTALL COMPONENT Statement">
Section 15.7.4.3, “INSTALL COMPONENT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="install-plugin.html" title="15.7.4.4 INSTALL PLUGIN Statement">
Section 15.7.4.4, “INSTALL PLUGIN Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="function-loading.html" title="7.7.1 Installing and Uninstalling Loadable Functions">
Section 7.7.1, “Installing and Uninstalling Loadable Functions”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="plugin-loading.html" title="7.6.1 Installing and Uninstalling Plugins">
Section 7.6.1, “Installing and Uninstalling Plugins”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="enterprise-encryption-installation.html" title="8.6.1 MySQL Enterprise Encryption Installation and Upgrading">
Section 8.6.1, “MySQL Enterprise Encryption Installation and Upgrading”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="optimize-table.html" title="15.7.3.4 OPTIMIZE TABLE Statement">
Section 15.7.3.4, “OPTIMIZE TABLE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="pluggable-storage.html" title="18.11.1 Pluggable Storage Engine Architecture">
Section 18.11.1, “Pluggable Storage Engine Architecture”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="sys-schema-prerequisites.html" title="30.1 Prerequisites for Using the sys Schema">
Section 30.1, “Prerequisites for Using the sys Schema”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="partial-revokes.html" title="8.2.12 Privilege Restriction Using Partial Revokes">
Section 8.2.12, “Privilege Restriction Using Partial Revokes”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="replication-privilege-checks-account.html" title="19.3.3.1 Privileges For The Replication PRIVILEGE_CHECKS_USER Account">
Section 19.3.3.1, “Privileges For The Replication PRIVILEGE_CHECKS_USER Account”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="rename-table.html" title="15.1.36 RENAME TABLE Statement">
Section 15.1.36, “RENAME TABLE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="repair-table.html" title="15.7.3.5 REPAIR TABLE Statement">
Section 15.7.3.5, “REPAIR TABLE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="replace.html" title="15.2.12 REPLACE Statement">
Section 15.2.12, “REPLACE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="replication-privilege-checks.html" title="19.3.3 Replication Privilege Checks">
Section 19.3.3, “Replication Privilege Checks”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="server-options.html" title="7.1.7 Server Command Options">
Section 7.1.7, “Server Command Options”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="stored-objects-security.html" title="27.6 Stored Object Access Control">
Section 27.6, “Stored Object Access Control”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="events-privileges.html" title="27.4.6 The Event Scheduler and MySQL Privileges">
Section 27.4.6, “The Event Scheduler and MySQL Privileges”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="performance-schema-setup-objects-table.html" title="29.12.2.4 The setup_objects Table">
Section 29.12.2.4, “The setup_objects Table”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="roles.html" title="8.2.10 Using Roles">
Section 8.2.10, “Using Roles”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<a name="priv-index-L">
</a>
<h3 class="title">
L
</h3>
<p>
[
<a class="link" href="dynindex-priv.html#priv-index-top">
index top
</a>
]
</p>
<dl>
<dt>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
LOCK TABLES
</h3>
<dl>
<dt>
<a class="xref" href="flush.html" title="15.7.8.3 FLUSH Statement">
Section 15.7.8.3, “FLUSH Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="lock-tables.html" title="15.3.6 LOCK TABLES and UNLOCK TABLES Statements">
Section 15.3.6, “LOCK TABLES and UNLOCK TABLES Statements”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="innodb-locking-reads.html" title="17.7.2.4 Locking Reads">
Section 17.7.2.4, “Locking Reads”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="mysqldump.html" title="6.5.4 mysqldump — A Database Backup Program">
Section 6.5.4, “mysqldump — A Database Backup Program”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<a name="priv-index-M">
</a>
<h3 class="title">
M
</h3>
<p>
[
<a class="link" href="dynindex-priv.html#priv-index-top">
index top
</a>
]
</p>
<dl>
<dt>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
MASKING_DICTIONARIES_ADMIN
</h3>
<dl>
<dt>
<a class="xref" href="data-masking-component-functions.html" title="8.5.2.4 MySQL Enterprise Data Masking and De-Identification Component Function Descriptions">
Section 8.5.2.4, “MySQL Enterprise Data Masking and De-Identification Component Function Descriptions”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="data-masking-components-installation.html" title="8.5.2.1 MySQL Enterprise Data Masking and De-Identification Component Installation">
Section 8.5.2.1, “MySQL Enterprise Data Masking and De-Identification Component Installation”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="data-masking-components.html" title="8.5.2 MySQL Enterprise Data Masking and De-Identification Components">
Section 8.5.2, “MySQL Enterprise Data Masking and De-Identification Components”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<a name="priv-index-N">
</a>
<h3 class="title">
N
</h3>
<p>
[
<a class="link" href="dynindex-priv.html#priv-index-top">
index top
</a>
]
</p>
<dl>
<dt>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
NDB_STORED_USER
</h3>
<dl>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="faqs-mysql-cluster.html" title="A.10 MySQL 8.4 FAQ: NDB Cluster">
Section A.10, “MySQL 8.4 FAQ: NDB Cluster”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="mysql-cluster-security-mysql-privileges.html" title="25.6.21.2 NDB Cluster and MySQL Privileges">
Section 25.6.21.2, “NDB Cluster and MySQL Privileges”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="mysql-cluster-privilege-synchronization.html" title="25.6.13 Privilege Synchronization and NDB_STORED_USER">
Section 25.6.13, “Privilege Synchronization and NDB_STORED_USER”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<a name="priv-index-O">
</a>
<h3 class="title">
O
</h3>
<p>
[
<a class="link" href="dynindex-priv.html#priv-index-top">
index top
</a>
]
</p>
<dl>
<dt>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
OPTIMIZE_LOCAL_TABLE
</h3>
<dl>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="optimize-table.html" title="15.7.3.4 OPTIMIZE TABLE Statement">
Section 15.7.3.4, “OPTIMIZE TABLE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="mysql-nutshell.html" title="1.4 What Is New in MySQL 8.4 since MySQL 8.0">
Section 1.4, “What Is New in MySQL 8.4 since MySQL 8.0”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<a name="priv-index-P">
</a>
<h3 class="title">
P
</h3>
<p>
[
<a class="link" href="dynindex-priv.html#priv-index-top">
index top
</a>
]
</p>
<dl>
<dt>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
PASSWORDLESS_USER_ADMIN
</h3>
<dl>
<dt>
<a class="xref" href="alter-user.html" title="15.7.1.1 ALTER USER Statement">
Section 15.7.1.1, “ALTER USER Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="create-user.html" title="15.7.1.3 CREATE USER Statement">
Section 15.7.1.3, “CREATE USER Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="multifactor-authentication.html" title="8.2.18 Multifactor Authentication">
Section 8.2.18, “Multifactor Authentication”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="webauthn-pluggable-authentication.html" title="8.4.1.11 WebAuthn Pluggable Authentication">
Section 8.4.1.11, “WebAuthn Pluggable Authentication”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
PERSIST_RO_VARIABLES_ADMIN
</h3>
<dl>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="reset-persist.html" title="15.7.8.7 RESET PERSIST Statement">
Section 15.7.8.7, “RESET PERSIST Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="system-variable-privileges.html" title="7.1.9.1 System Variable Privileges">
Section 7.1.9.1, “System Variable Privileges”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
PROCESS
</h3>
<dl>
<dt>
<a class="xref" href="processlist-access.html" title="10.14.1 Accessing the Process List">
Section 10.14.1, “Accessing the Process List”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="creating-accounts.html" title="8.2.8 Adding Accounts, Assigning Privileges, and Dropping Accounts">
Section 8.2.8, “Adding Accounts, Assigning Privileges, and Dropping Accounts”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="innodb-enabling-monitors.html" title="17.17.2 Enabling InnoDB Monitors">
Section 17.17.2, “Enabling InnoDB Monitors”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="events-configuration.html" title="27.4.2 Event Scheduler Configuration">
Section 27.4.2, “Event Scheduler Configuration”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="explain.html" title="15.8.2 EXPLAIN Statement">
Section 15.8.2, “EXPLAIN Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="information-schema-introduction.html" title="28.1 Introduction">
Section 28.1, “Introduction”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="kill.html" title="15.7.8.4 KILL Statement">
Section 15.7.8.4, “KILL Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="security-against-attack.html" title="8.1.3 Making MySQL Secure Against Attackers">
Section 8.1.3, “Making MySQL Secure Against Attackers”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="mysql-cluster-mysqld.html" title="25.6.10 MySQL Server Usage for NDB Cluster">
Section 25.6.10, “MySQL Server Usage for NDB Cluster”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="mysqldump.html" title="6.5.4 mysqldump — A Database Backup Program">
Section 6.5.4, “mysqldump — A Database Backup Program”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="explain-for-connection.html" title="10.8.4 Obtaining Execution Plan Information for a Named Connection">
Section 10.8.4, “Obtaining Execution Plan Information for a Named Connection”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="sys-schema-prerequisites.html" title="30.1 Prerequisites for Using the sys Schema">
Section 30.1, “Prerequisites for Using the sys Schema”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="show-engine.html" title="15.7.7.16 SHOW ENGINE Statement">
Section 15.7.7.16, “SHOW ENGINE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="show-processlist.html" title="15.7.7.31 SHOW PROCESSLIST Statement">
Section 15.7.7.31, “SHOW PROCESSLIST Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="information-schema-files-table.html" title="28.3.15 The INFORMATION_SCHEMA FILES Table">
Section 28.3.15, “The INFORMATION_SCHEMA FILES Table”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="information-schema-innodb-buffer-page-table.html" title="28.4.2 The INFORMATION_SCHEMA INNODB_BUFFER_PAGE Table">
Section 28.4.2, “The INFORMATION_SCHEMA INNODB_BUFFER_PAGE Table”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="information-schema-innodb-buffer-page-lru-table.html" title="28.4.3 The INFORMATION_SCHEMA INNODB_BUFFER_PAGE_LRU Table">
Section 28.4.3, “The INFORMATION_SCHEMA INNODB_BUFFER_PAGE_LRU Table”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="information-schema-innodb-buffer-pool-stats-table.html" title="28.4.4 The INFORMATION_SCHEMA INNODB_BUFFER_POOL_STATS Table">
Section 28.4.4, “The INFORMATION_SCHEMA INNODB_BUFFER_POOL_STATS Table”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="information-schema-innodb-cached-indexes-table.html" title="28.4.5 The INFORMATION_SCHEMA INNODB_CACHED_INDEXES Table">
Section 28.4.5, “The INFORMATION_SCHEMA INNODB_CACHED_INDEXES Table”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="information-schema-innodb-cmp-table.html" title="28.4.6 The INFORMATION_SCHEMA INNODB_CMP and INNODB_CMP_RESET Tables">
Section 28.4.6, “The INFORMATION_SCHEMA INNODB_CMP and INNODB_CMP_RESET Tables”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="information-schema-innodb-cmp-per-index-table.html" title="28.4.8 The INFORMATION_SCHEMA INNODB_CMP_PER_INDEX and INNODB_CMP_PER_INDEX_RESET Tables">
Section 28.4.8, “The INFORMATION_SCHEMA INNODB_CMP_PER_INDEX and
INNODB_CMP_PER_INDEX_RESET Tables”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="information-schema-innodb-cmpmem-table.html" title="28.4.7 The INFORMATION_SCHEMA INNODB_CMPMEM and INNODB_CMPMEM_RESET Tables">
Section 28.4.7, “The INFORMATION_SCHEMA INNODB_CMPMEM and INNODB_CMPMEM_RESET Tables”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="information-schema-innodb-columns-table.html" title="28.4.9 The INFORMATION_SCHEMA INNODB_COLUMNS Table">
Section 28.4.9, “The INFORMATION_SCHEMA INNODB_COLUMNS Table”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="information-schema-innodb-datafiles-table.html" title="28.4.10 The INFORMATION_SCHEMA INNODB_DATAFILES Table">
Section 28.4.10, “The INFORMATION_SCHEMA INNODB_DATAFILES Table”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="information-schema-innodb-fields-table.html" title="28.4.11 The INFORMATION_SCHEMA INNODB_FIELDS Table">
Section 28.4.11, “The INFORMATION_SCHEMA INNODB_FIELDS Table”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="information-schema-innodb-foreign-table.html" title="28.4.12 The INFORMATION_SCHEMA INNODB_FOREIGN Table">
Section 28.4.12, “The INFORMATION_SCHEMA INNODB_FOREIGN Table”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="information-schema-innodb-foreign-cols-table.html" title="28.4.13 The INFORMATION_SCHEMA INNODB_FOREIGN_COLS Table">
Section 28.4.13, “The INFORMATION_SCHEMA INNODB_FOREIGN_COLS Table”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="information-schema-innodb-ft-being-deleted-table.html" title="28.4.14 The INFORMATION_SCHEMA INNODB_FT_BEING_DELETED Table">
Section 28.4.14, “The INFORMATION_SCHEMA INNODB_FT_BEING_DELETED Table”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="information-schema-innodb-ft-config-table.html" title="28.4.15 The INFORMATION_SCHEMA INNODB_FT_CONFIG Table">
Section 28.4.15, “The INFORMATION_SCHEMA INNODB_FT_CONFIG Table”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="information-schema-innodb-ft-default-stopword-table.html" title="28.4.16 The INFORMATION_SCHEMA INNODB_FT_DEFAULT_STOPWORD Table">
Section 28.4.16, “The INFORMATION_SCHEMA INNODB_FT_DEFAULT_STOPWORD Table”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="information-schema-innodb-ft-deleted-table.html" title="28.4.17 The INFORMATION_SCHEMA INNODB_FT_DELETED Table">
Section 28.4.17, “The INFORMATION_SCHEMA INNODB_FT_DELETED Table”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="information-schema-innodb-ft-index-cache-table.html" title="28.4.18 The INFORMATION_SCHEMA INNODB_FT_INDEX_CACHE Table">
Section 28.4.18, “The INFORMATION_SCHEMA INNODB_FT_INDEX_CACHE Table”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="information-schema-innodb-ft-index-table-table.html" title="28.4.19 The INFORMATION_SCHEMA INNODB_FT_INDEX_TABLE Table">
Section 28.4.19, “The INFORMATION_SCHEMA INNODB_FT_INDEX_TABLE Table”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="information-schema-innodb-indexes-table.html" title="28.4.20 The INFORMATION_SCHEMA INNODB_INDEXES Table">
Section 28.4.20, “The INFORMATION_SCHEMA INNODB_INDEXES Table”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="information-schema-innodb-metrics-table.html" title="28.4.21 The INFORMATION_SCHEMA INNODB_METRICS Table">
Section 28.4.21, “The INFORMATION_SCHEMA INNODB_METRICS Table”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="information-schema-innodb-session-temp-tablespaces-table.html" title="28.4.22 The INFORMATION_SCHEMA INNODB_SESSION_TEMP_TABLESPACES Table">
Section 28.4.22, “The INFORMATION_SCHEMA INNODB_SESSION_TEMP_TABLESPACES Table”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="information-schema-innodb-tables-table.html" title="28.4.23 The INFORMATION_SCHEMA INNODB_TABLES Table">
Section 28.4.23, “The INFORMATION_SCHEMA INNODB_TABLES Table”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="information-schema-innodb-tablespaces-table.html" title="28.4.24 The INFORMATION_SCHEMA INNODB_TABLESPACES Table">
Section 28.4.24, “The INFORMATION_SCHEMA INNODB_TABLESPACES Table”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="information-schema-innodb-tablespaces-brief-table.html" title="28.4.25 The INFORMATION_SCHEMA INNODB_TABLESPACES_BRIEF Table">
Section 28.4.25, “The INFORMATION_SCHEMA INNODB_TABLESPACES_BRIEF Table”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="information-schema-innodb-tablestats-table.html" title="28.4.26 The INFORMATION_SCHEMA INNODB_TABLESTATS View">
Section 28.4.26, “The INFORMATION_SCHEMA INNODB_TABLESTATS View”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="information-schema-innodb-temp-table-info-table.html" title="28.4.27 The INFORMATION_SCHEMA INNODB_TEMP_TABLE_INFO Table">
Section 28.4.27, “The INFORMATION_SCHEMA INNODB_TEMP_TABLE_INFO Table”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="information-schema-innodb-trx-table.html" title="28.4.28 The INFORMATION_SCHEMA INNODB_TRX Table">
Section 28.4.28, “The INFORMATION_SCHEMA INNODB_TRX Table”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="information-schema-innodb-virtual-table.html" title="28.4.29 The INFORMATION_SCHEMA INNODB_VIRTUAL Table">
Section 28.4.29, “The INFORMATION_SCHEMA INNODB_VIRTUAL Table”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="information-schema-processlist-table.html" title="28.3.23 The INFORMATION_SCHEMA PROCESSLIST Table">
Section 28.3.23, “The INFORMATION_SCHEMA PROCESSLIST Table”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="performance-schema-processlist-table.html" title="29.12.22.7 The processlist Table">
Section 29.12.22.7, “The processlist Table”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="performance-schema-threads-table.html" title="29.12.22.8 The threads Table">
Section 29.12.22.8, “The threads Table”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
PROXY
</h3>
<dl>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant-tables.html" title="8.2.3 Grant Tables">
Section 8.2.3, “Grant Tables”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="ldap-pluggable-authentication.html" title="8.4.1.7 LDAP Pluggable Authentication">
Section 8.4.1.7, “LDAP Pluggable Authentication”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="pam-pluggable-authentication.html" title="8.4.1.5 PAM Pluggable Authentication">
Section 8.4.1.5, “PAM Pluggable Authentication”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="proxy-users.html" title="8.2.19 Proxy Users">
Section 8.2.19, “Proxy Users”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="default-privileges.html" title="2.9.4 Securing the Initial MySQL Account">
Section 2.9.4, “Securing the Initial MySQL Account”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="performance-schema-host-cache-table.html" title="29.12.22.3 The host_cache Table">
Section 29.12.22.3, “The host_cache Table”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="windows-pluggable-authentication.html" title="8.4.1.6 Windows Pluggable Authentication">
Section 8.4.1.6, “Windows Pluggable Authentication”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
PROXY ... WITH GRANT OPTION
</h3>
<dl>
<dt>
<a class="xref" href="proxy-users.html" title="8.2.19 Proxy Users">
Section 8.2.19, “Proxy Users”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<a name="priv-index-R">
</a>
<h3 class="title">
R
</h3>
<p>
[
<a class="link" href="dynindex-priv.html#priv-index-top">
index top
</a>
]
</p>
<dl>
<dt>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
REFERENCES
</h3>
<dl>
<dt>
<a class="xref" href="create-table-foreign-keys.html" title="15.1.20.5 FOREIGN KEY Constraints">
Section 15.1.20.5, “FOREIGN KEY Constraints”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
RELOAD
</h3>
<dl>
<dt>
<a class="xref" href="request-access.html" title="8.2.7 Access Control, Stage 2: Request Verification">
Section 8.2.7, “Access Control, Stage 2: Request Verification”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="creating-accounts.html" title="8.2.8 Adding Accounts, Assigning Privileges, and Dropping Accounts">
Section 8.2.8, “Adding Accounts, Assigning Privileges, and Dropping Accounts”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="host-cache.html" title="7.1.12.3 DNS Lookups and the Host Cache">
Section 7.1.12.3, “DNS Lookups and the Host Cache”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="flush.html" title="15.7.8.3 FLUSH Statement">
Section 15.7.8.3, “FLUSH Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant-tables.html" title="8.2.3 Grant Tables">
Section 8.2.3, “Grant Tables”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="lock-instance-for-backup.html" title="15.3.5 LOCK INSTANCE FOR BACKUP and UNLOCK INSTANCE Statements">
Section 15.3.5, “LOCK INSTANCE FOR BACKUP and UNLOCK INSTANCE Statements”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="mysqldump.html" title="6.5.4 mysqldump — A Database Backup Program">
Section 6.5.4, “mysqldump — A Database Backup Program”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="reset-binary-logs-and-gtids.html" title="15.4.1.2 RESET BINARY LOGS AND GTIDS Statement">
Section 15.4.1.2, “RESET BINARY LOGS AND GTIDS Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="reset-replica.html" title="15.4.2.3 RESET REPLICA Statement">
Section 15.4.2.3, “RESET REPLICA Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="reset.html" title="15.7.8.6 RESET Statement">
Section 15.7.8.6, “RESET Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="log-file-maintenance.html" title="7.4.6 Server Log Maintenance">
Section 7.4.6, “Server Log Maintenance”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="mysql-nutshell.html" title="1.4 What Is New in MySQL 8.4 since MySQL 8.0">
Section 1.4, “What Is New in MySQL 8.4 since MySQL 8.0”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
REPLICATION CLIENT
</h3>
<dl>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="show-binary-log-status.html" title="15.7.7.1 SHOW BINARY LOG STATUS Statement">
Section 15.7.7.1, “SHOW BINARY LOG STATUS Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="show-binary-logs.html" title="15.7.7.2 SHOW BINARY LOGS Statement">
Section 15.7.7.2, “SHOW BINARY LOGS Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="show-replica-status.html" title="15.7.7.35 SHOW REPLICA STATUS Statement">
Section 15.7.7.35, “SHOW REPLICA STATUS Statement”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
REPLICATION SLAVE
</h3>
<dl>
<dt>
<a class="xref" href="group-replication-connection-security.html" title="20.6.1 Communication Stack for Connection Security Management">
Section 20.6.1, “Communication Stack for Connection Security Management”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="replication-multi-source-configuration.html" title="19.1.5.1 Configuring Multi-Source Replication">
Section 19.1.5.1, “Configuring Multi-Source Replication”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="replication-howto-repuser.html" title="19.1.2.3 Creating a User for Replication">
Section 19.1.2.3, “Creating a User for Replication”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="mysqlbinlog.html" title="6.6.9 mysqlbinlog — Utility for Processing Binary Log Files">
Section 6.6.9, “mysqlbinlog — Utility for Processing Binary Log Files”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="replication-encrypted-connections.html" title="19.3.1 Setting Up Replication to Use Encrypted Connections">
Section 19.3.1, “Setting Up Replication to Use Encrypted Connections”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="show-binlog-events.html" title="15.7.7.3 SHOW BINLOG EVENTS Statement">
Section 15.7.7.3, “SHOW BINLOG EVENTS Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="show-relaylog-events.html" title="15.7.7.34 SHOW RELAYLOG EVENTS Statement">
Section 15.7.7.34, “SHOW RELAYLOG EVENTS Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="show-replicas.html" title="15.7.7.36 SHOW REPLICAS Statement">
Section 15.7.7.36, “SHOW REPLICAS Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="group-replication-user-credentials.html" title="20.2.1.3 User Credentials For Distributed Recovery">
Section 20.2.1.3, “User Credentials For Distributed Recovery”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
REPLICATION_APPLIER
</h3>
<dl>
<dt>
<a class="xref" href="replication-options-binary-log.html" title="19.1.6.4 Binary Logging Options and Variables">
Section 19.1.6.4, “Binary Logging Options and Variables”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="binlog.html" title="15.7.8.1 BINLOG Statement">
Section 15.7.8.1, “BINLOG Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="change-replication-source-to.html" title="15.4.2.2 CHANGE REPLICATION SOURCE TO Statement">
Section 15.4.2.2, “CHANGE REPLICATION SOURCE TO Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="replication-options-gtids.html" title="19.1.6.5 Global Transaction ID System Variables">
Section 19.1.6.5, “Global Transaction ID System Variables”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="mysqlbinlog.html" title="6.6.9 mysqlbinlog — Utility for Processing Binary Log Files">
Section 6.6.9, “mysqlbinlog — Utility for Processing Binary Log Files”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="replication-privilege-checks-account.html" title="19.3.3.1 Privileges For The Replication PRIVILEGE_CHECKS_USER Account">
Section 19.3.3.1, “Privileges For The Replication PRIVILEGE_CHECKS_USER Account”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="replication-privilege-checks.html" title="19.3.3 Replication Privilege Checks">
Section 19.3.3, “Replication Privilege Checks”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="replication-options-source.html" title="19.1.6.2 Replication Source Options and Variables">
Section 19.1.6.2, “Replication Source Options and Variables”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="server-system-variables.html" title="7.1.8 Server System Variables">
Section 7.1.8, “Server System Variables”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
REPLICATION_SLAVE_ADMIN
</h3>
<dl>
<dt>
<a class="xref" href="change-replication-filter.html" title="15.4.2.1 CHANGE REPLICATION FILTER Statement">
Section 15.4.2.1, “CHANGE REPLICATION FILTER Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="change-replication-source-to.html" title="15.4.2.2 CHANGE REPLICATION SOURCE TO Statement">
Section 15.4.2.2, “CHANGE REPLICATION SOURCE TO Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="replication-semisync-installation.html" title="19.4.10.1 Installing Semisynchronous Replication">
Section 19.4.10.1, “Installing Semisynchronous Replication”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="start-replica.html" title="15.4.2.4 START REPLICA Statement">
Section 15.4.2.4, “START REPLICA Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="stop-replica.html" title="15.4.2.5 STOP REPLICA Statement">
Section 15.4.2.5, “STOP REPLICA Statement”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
RESOURCE_GROUP_ADMIN
</h3>
<dl>
<dt>
<a class="xref" href="alter-resource-group.html" title="15.7.2.1 ALTER RESOURCE GROUP Statement">
Section 15.7.2.1, “ALTER RESOURCE GROUP Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="create-resource-group.html" title="15.7.2.2 CREATE RESOURCE GROUP Statement">
Section 15.7.2.2, “CREATE RESOURCE GROUP Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="drop-resource-group.html" title="15.7.2.3 DROP RESOURCE GROUP Statement">
Section 15.7.2.3, “DROP RESOURCE GROUP Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="optimizer-hints.html" title="10.9.3 Optimizer Hints">
Section 10.9.3, “Optimizer Hints”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="resource-groups.html" title="7.1.16 Resource Groups">
Section 7.1.16, “Resource Groups”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="set-resource-group.html" title="15.7.2.4 SET RESOURCE GROUP Statement">
Section 15.7.2.4, “SET RESOURCE GROUP Statement”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
RESOURCE_GROUP_USER
</h3>
<dl>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="optimizer-hints.html" title="10.9.3 Optimizer Hints">
Section 10.9.3, “Optimizer Hints”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="resource-groups.html" title="7.1.16 Resource Groups">
Section 7.1.16, “Resource Groups”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="set-resource-group.html" title="15.7.2.4 SET RESOURCE GROUP Statement">
Section 15.7.2.4, “SET RESOURCE GROUP Statement”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
ROLE_ADMIN
</h3>
<dl>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="information-functions.html" title="14.15 Information Functions">
Section 14.15, “Information Functions”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="server-system-variables.html" title="7.1.8 Server System Variables">
Section 7.1.8, “Server System Variables”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="roles.html" title="8.2.10 Using Roles">
Section 8.2.10, “Using Roles”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<a name="priv-index-S">
</a>
<h3 class="title">
S
</h3>
<p>
[
<a class="link" href="dynindex-priv.html#priv-index-top">
index top
</a>
]
</p>
<dl>
<dt>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
SELECT
</h3>
<dl>
<dt>
<a class="xref" href="access-control.html" title="8.2 Access Control and Account Management">
Section 8.2, “Access Control and Account Management”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="request-access.html" title="8.2.7 Access Control, Stage 2: Request Verification">
Section 8.2.7, “Access Control, Stage 2: Request Verification”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="account-categories.html" title="8.2.11 Account Categories">
Section 8.2.11, “Account Categories”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="analyze-table.html" title="15.7.3.1 ANALYZE TABLE Statement">
Section 15.7.3.1, “ANALYZE TABLE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="checksum-table.html" title="15.7.3.3 CHECKSUM TABLE Statement">
Section 15.7.3.3, “CHECKSUM TABLE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="create-procedure.html" title="15.1.17 CREATE PROCEDURE and CREATE FUNCTION Statements">
Section 15.1.17, “CREATE PROCEDURE and CREATE FUNCTION Statements”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="create-table-like.html" title="15.1.20.3 CREATE TABLE ... LIKE Statement">
Section 15.1.20.3, “CREATE TABLE ... LIKE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="create-table.html" title="15.1.20 CREATE TABLE Statement">
Section 15.1.20, “CREATE TABLE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="create-trigger.html" title="15.1.22 CREATE TRIGGER Statement">
Section 15.1.22, “CREATE TRIGGER Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="create-view.html" title="15.1.23 CREATE VIEW Statement">
Section 15.1.23, “CREATE VIEW Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="data-dictionary-usage-differences.html" title="16.7 Data Dictionary Usage Differences">
Section 16.7, “Data Dictionary Usage Differences”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="delete.html" title="15.2.2 DELETE Statement">
Section 15.2.2, “DELETE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="flush.html" title="15.7.8.3 FLUSH Statement">
Section 15.7.8.3, “FLUSH Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="insert.html" title="15.2.7 INSERT Statement">
Section 15.2.7, “INSERT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="lock-tables.html" title="15.3.6 LOCK TABLES and UNLOCK TABLES Statements">
Section 15.3.6, “LOCK TABLES and UNLOCK TABLES Statements”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="innodb-locking-reads.html" title="17.7.2.4 Locking Reads">
Section 17.7.2.4, “Locking Reads”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="clone-plugin-monitoring.html" title="7.6.7.10 Monitoring Cloning Operations">
Section 7.6.7.10, “Monitoring Cloning Operations”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="firewall-reference.html" title="8.4.7.4 MySQL Enterprise Firewall Reference">
Section 8.4.7.4, “MySQL Enterprise Firewall Reference”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="mysqldump.html" title="6.5.4 mysqldump — A Database Backup Program">
Section 6.5.4, “mysqldump — A Database Backup Program”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="mysql-cluster-security-mysql-privileges.html" title="25.6.21.2 NDB Cluster and MySQL Privileges">
Section 25.6.21.2, “NDB Cluster and MySQL Privileges”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="optimize-table.html" title="15.7.3.4 OPTIMIZE TABLE Statement">
Section 15.7.3.4, “OPTIMIZE TABLE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="performance-schema-table-characteristics.html" title="29.11 Performance Schema General Table Characteristics">
Section 29.11, “Performance Schema General Table Characteristics”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="sys-schema-prerequisites.html" title="30.1 Prerequisites for Using the sys Schema">
Section 30.1, “Prerequisites for Using the sys Schema”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="partial-revokes.html" title="8.2.12 Privilege Restriction Using Partial Revokes">
Section 8.2.12, “Privilege Restriction Using Partial Revokes”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="repair-table.html" title="15.7.3.5 REPAIR TABLE Statement">
Section 15.7.3.5, “REPAIR TABLE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="view-restrictions.html" title="27.9 Restrictions on Views">
Section 27.9, “Restrictions on Views”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="revoke.html" title="15.7.1.8 REVOKE Statement">
Section 15.7.1.8, “REVOKE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="show-create-procedure.html" title="15.7.7.10 SHOW CREATE PROCEDURE Statement">
Section 15.7.7.10, “SHOW CREATE PROCEDURE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="show-create-user.html" title="15.7.7.13 SHOW CREATE USER Statement">
Section 15.7.7.13, “SHOW CREATE USER Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="show-create-view.html" title="15.7.7.14 SHOW CREATE VIEW Statement">
Section 15.7.7.14, “SHOW CREATE VIEW Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="show-grants.html" title="15.7.7.22 SHOW GRANTS Statement">
Section 15.7.7.22, “SHOW GRANTS Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="show-procedure-code.html" title="15.7.7.29 SHOW PROCEDURE CODE Statement">
Section 15.7.7.29, “SHOW PROCEDURE CODE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="show-procedure-status.html" title="15.7.7.30 SHOW PROCEDURE STATUS Statement">
Section 15.7.7.30, “SHOW PROCEDURE STATUS Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="stored-objects-security.html" title="27.6 Stored Object Access Control">
Section 27.6, “Stored Object Access Control”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="stored-routines-privileges.html" title="27.2.2 Stored Routines and MySQL Privileges">
Section 27.2.2, “Stored Routines and MySQL Privileges”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="performance-schema-error-log-table.html" title="29.12.22.2 The error_log Table">
Section 29.12.22.2, “The error_log Table”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="events-privileges.html" title="27.4.6 The Event Scheduler and MySQL Privileges">
Section 27.4.6, “The Event Scheduler and MySQL Privileges”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="information-schema-routines-table.html" title="28.3.30 The INFORMATION_SCHEMA ROUTINES Table">
Section 28.3.30, “The INFORMATION_SCHEMA ROUTINES Table”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="information-schema-user-attributes-table.html" title="28.3.45 The INFORMATION_SCHEMA USER_ATTRIBUTES Table">
Section 28.3.45, “The INFORMATION_SCHEMA USER_ATTRIBUTES Table”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="merge-storage-engine.html" title="18.7 The MERGE Storage Engine">
Section 18.7, “The MERGE Storage Engine”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="performance-schema-threads-table.html" title="29.12.22.8 The threads Table">
Section 29.12.22.8, “The threads Table”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="trigger-syntax.html" title="27.3.1 Trigger Syntax and Examples">
Section 27.3.1, “Trigger Syntax and Examples”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="update.html" title="15.2.17 UPDATE Statement">
Section 15.2.17, “UPDATE Statement”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
SENSITIVE_VARIABLES_OBSERVER
</h3>
<dl>
<dt>
<a class="xref" href="performance-schema-persisted-variables-table.html" title="29.12.14.1 Performance Schema persisted_variables Table">
Section 29.12.14.1, “Performance Schema persisted_variables Table”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="performance-schema-system-variable-tables.html" title="29.12.14 Performance Schema System Variable Tables">
Section 29.12.14, “Performance Schema System Variable Tables”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="persisted-system-variables.html" title="7.1.9.3 Persisted System Variables">
Section 7.1.9.3, “Persisted System Variables”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="session-state-tracking.html" title="7.1.18 Server Tracking of Client Session State">
Section 7.1.18, “Server Tracking of Client Session State”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
SERVICE_CONNECTION_ADMIN
</h3>
<dl>
<dt>
<a class="xref" href="administrative-connection-interface.html" title="7.1.12.2 Administrative Connection Management">
Section 7.1.12.2, “Administrative Connection Management”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="group-replication-distributed-recovery-connections.html#group-replication-distributed-recovery-connections-endpoints" title="20.5.4.1.1 Selecting addresses for distributed recovery endpoints">
Section 20.5.4.1.1, “Selecting addresses for distributed recovery endpoints”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
SESSION_VARIABLES_ADMIN
</h3>
<dl>
<dt>
<a class="xref" href="replication-options-gtids.html" title="19.1.6.5 Global Transaction ID System Variables">
Section 19.1.6.5, “Global Transaction ID System Variables”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="internal-temporary-tables.html" title="10.4.4 Internal Temporary Table Use in MySQL">
Section 10.4.4, “Internal Temporary Table Use in MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="replication-privilege-checks-account.html" title="19.3.3.1 Privileges For The Replication PRIVILEGE_CHECKS_USER Account">
Section 19.3.3.1, “Privileges For The Replication PRIVILEGE_CHECKS_USER Account”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="server-system-variables.html" title="7.1.8 Server System Variables">
Section 7.1.8, “Server System Variables”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="system-variable-privileges.html" title="7.1.9.1 System Variable Privileges">
Section 7.1.9.1, “System Variable Privileges”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
SET_ANY_DEFINER
</h3>
<dl>
<dt>
<a class="xref" href="alter-view.html" title="15.1.11 ALTER VIEW Statement">
Section 15.1.11, “ALTER VIEW Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="create-user.html" title="15.7.1.3 CREATE USER Statement">
Section 15.7.1.3, “CREATE USER Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="drop-user.html" title="15.7.1.5 DROP USER Statement">
Section 15.7.1.5, “DROP USER Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="rename-user.html" title="15.7.1.7 RENAME USER Statement">
Section 15.7.1.7, “RENAME USER Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="stored-objects-security.html" title="27.6 Stored Object Access Control">
Section 27.6, “Stored Object Access Control”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="stored-programs-logging.html" title="27.7 Stored Program Binary Logging">
Section 27.7, “Stored Program Binary Logging”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="mysql-nutshell.html" title="1.4 What Is New in MySQL 8.4 since MySQL 8.0">
Section 1.4, “What Is New in MySQL 8.4 since MySQL 8.0”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
SET_USER_ID
</h3>
<dl>
<dt>
<a class="xref" href="mysql-nutshell.html" title="1.4 What Is New in MySQL 8.4 since MySQL 8.0">
Section 1.4, “What Is New in MySQL 8.4 since MySQL 8.0”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
SHOW DATABASES
</h3>
<dl>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="server-system-variables.html" title="7.1.8 Server System Variables">
Section 7.1.8, “Server System Variables”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="show-databases.html" title="15.7.7.15 SHOW DATABASES Statement">
Section 15.7.7.15, “SHOW DATABASES Statement”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
SHOW VIEW
</h3>
<dl>
<dt>
<a class="xref" href="explain.html" title="15.8.2 EXPLAIN Statement">
Section 15.8.2, “EXPLAIN Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="mysqldump.html" title="6.5.4 mysqldump — A Database Backup Program">
Section 6.5.4, “mysqldump — A Database Backup Program”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="view-restrictions.html" title="27.9 Restrictions on Views">
Section 27.9, “Restrictions on Views”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="show-create-view.html" title="15.7.7.14 SHOW CREATE VIEW Statement">
Section 15.7.7.14, “SHOW CREATE VIEW Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="information-schema-views-table.html" title="28.3.47 The INFORMATION_SCHEMA VIEWS Table">
Section 28.3.47, “The INFORMATION_SCHEMA VIEWS Table”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
SHOW_ROUTINE
</h3>
<dl>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="show-create-procedure.html" title="15.7.7.10 SHOW CREATE PROCEDURE Statement">
Section 15.7.7.10, “SHOW CREATE PROCEDURE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="show-procedure-code.html" title="15.7.7.29 SHOW PROCEDURE CODE Statement">
Section 15.7.7.29, “SHOW PROCEDURE CODE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="show-procedure-status.html" title="15.7.7.30 SHOW PROCEDURE STATUS Statement">
Section 15.7.7.30, “SHOW PROCEDURE STATUS Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="stored-routines-privileges.html" title="27.2.2 Stored Routines and MySQL Privileges">
Section 27.2.2, “Stored Routines and MySQL Privileges”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="information-schema-routines-table.html" title="28.3.30 The INFORMATION_SCHEMA ROUTINES Table">
Section 28.3.30, “The INFORMATION_SCHEMA ROUTINES Table”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
SHUTDOWN
</h3>
<dl>
<dt>
<a class="xref" href="request-access.html" title="8.2.7 Access Control, Stage 2: Request Verification">
Section 8.2.7, “Access Control, Stage 2: Request Verification”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="clone-plugin-remote.html" title="7.6.7.3 Cloning Remote Data">
Section 7.6.7.3, “Cloning Remote Data”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant-tables.html" title="8.2.3 Grant Tables">
Section 8.2.3, “Grant Tables”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="mysqld-multi.html" title="6.3.4 mysqld_multi — Manage Multiple MySQL Servers">
Section 6.3.4, “mysqld_multi — Manage Multiple MySQL Servers”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="restart.html" title="15.7.8.8 RESTART Statement">
Section 15.7.8.8, “RESTART Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="replication-gtids-howto.html" title="19.1.3.4 Setting Up Replication Using GTIDs">
Section 19.1.3.4, “Setting Up Replication Using GTIDs”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="shutdown.html" title="15.7.8.9 SHUTDOWN Statement">
Section 15.7.8.9, “SHUTDOWN Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="server-shutdown.html" title="7.1.19 The Server Shutdown Process">
Section 7.1.19, “The Server Shutdown Process”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="unix-signal-response.html" title="6.10 Unix Signal Handling in MySQL">
Section 6.10, “Unix Signal Handling in MySQL”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
SKIP_QUERY_REWRITE
</h3>
<dl>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="mysqladmin.html" title="6.5.2 mysqladmin — A MySQL Server Administration Program">
Section 6.5.2, “mysqladmin — A MySQL Server Administration Program”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="mysqlbinlog.html" title="6.6.9 mysqlbinlog — Utility for Processing Binary Log Files">
Section 6.6.9, “mysqlbinlog — Utility for Processing Binary Log Files”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="mysqldump.html" title="6.5.4 mysqldump — A Database Backup Program">
Section 6.5.4, “mysqldump — A Database Backup Program”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="replication-privilege-checks.html" title="19.3.3 Replication Privilege Checks">
Section 19.3.3, “Replication Privilege Checks”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="rewriter-query-rewrite-plugin.html" title="7.6.4 The Rewriter Query Rewrite Plugin">
Section 7.6.4, “The Rewriter Query Rewrite Plugin”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="rewriter-query-rewrite-plugin-usage.html" title="7.6.4.2 Using the Rewriter Query Rewrite Plugin">
Section 7.6.4.2, “Using the Rewriter Query Rewrite Plugin”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
SUPER
</h3>
<dl>
<dt>
<a class="xref" href="account-categories.html" title="8.2.11 Account Categories">
Section 8.2.11, “Account Categories”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="account-management-statements.html" title="15.7.1 Account Management Statements">
Section 15.7.1, “Account Management Statements”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="administrative-connection-interface.html" title="7.1.12.2 Administrative Connection Management">
Section 7.1.12.2, “Administrative Connection Management”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="alter-function.html" title="15.1.4 ALTER FUNCTION Statement">
Section 15.1.4, “ALTER FUNCTION Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="alter-instance.html" title="15.1.5 ALTER INSTANCE Statement">
Section 15.1.5, “ALTER INSTANCE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="alter-server.html" title="15.1.8 ALTER SERVER Statement">
Section 15.1.8, “ALTER SERVER Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="alter-user.html" title="15.7.1.1 ALTER USER Statement">
Section 15.7.1.1, “ALTER USER Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="assigning-passwords.html" title="8.2.14 Assigning Account Passwords">
Section 8.2.14, “Assigning Account Passwords”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="audit-log-filtering.html" title="8.4.5.7 Audit Log Filtering">
Section 8.4.5.7, “Audit Log Filtering”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="audit-log-reference.html" title="8.4.5.11 Audit Log Reference">
Section 8.4.5.11, “Audit Log Reference”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="replication-options-binary-log.html" title="19.1.6.4 Binary Logging Options and Variables">
Section 19.1.6.4, “Binary Logging Options and Variables”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="binlog.html" title="15.7.8.1 BINLOG Statement">
Section 15.7.8.1, “BINLOG Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="change-replication-filter.html" title="15.4.2.1 CHANGE REPLICATION FILTER Statement">
Section 15.4.2.1, “CHANGE REPLICATION FILTER Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="change-replication-source-to.html" title="15.4.2.2 CHANGE REPLICATION SOURCE TO Statement">
Section 15.4.2.2, “CHANGE REPLICATION SOURCE TO Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="clone-plugin-options-variables.html" title="7.6.7.13 Clone System Variables">
Section 7.6.7.13, “Clone System Variables”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="charset-applications.html" title="12.5 Configuring Application Character Set and Collation">
Section 12.5, “Configuring Application Character Set and Collation”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="group-replication-member-actions.html" title="20.5.1.5 Configuring Member Actions">
Section 20.5.1.5, “Configuring Member Actions”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="connection-interfaces.html" title="7.1.12.1 Connection Interfaces">
Section 7.1.12.1, “Connection Interfaces”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="create-procedure.html" title="15.1.17 CREATE PROCEDURE and CREATE FUNCTION Statements">
Section 15.1.17, “CREATE PROCEDURE and CREATE FUNCTION Statements”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="create-role.html" title="15.7.1.2 CREATE ROLE Statement">
Section 15.7.1.2, “CREATE ROLE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="create-server.html" title="15.1.18 CREATE SERVER Statement">
Section 15.1.18, “CREATE SERVER Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="create-spatial-reference-system.html" title="15.1.19 CREATE SPATIAL REFERENCE SYSTEM Statement">
Section 15.1.19, “CREATE SPATIAL REFERENCE SYSTEM Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="create-trigger.html" title="15.1.22 CREATE TRIGGER Statement">
Section 15.1.22, “CREATE TRIGGER Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="create-user.html" title="15.7.1.3 CREATE USER Statement">
Section 15.7.1.3, “CREATE USER Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="audit-log-disabling.html" title="8.4.5.9 Disabling Audit Logging">
Section 8.4.5.9, “Disabling Audit Logging”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="host-cache.html" title="7.1.12.3 DNS Lookups and the Host Cache">
Section 7.1.12.3, “DNS Lookups and the Host Cache”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="drop-role.html" title="15.7.1.4 DROP ROLE Statement">
Section 15.7.1.4, “DROP ROLE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="drop-server.html" title="15.1.30 DROP SERVER Statement">
Section 15.1.30, “DROP SERVER Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="drop-spatial-reference-system.html" title="15.1.31 DROP SPATIAL REFERENCE SYSTEM Statement">
Section 15.1.31, “DROP SPATIAL REFERENCE SYSTEM Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="drop-user.html" title="15.7.1.5 DROP USER Statement">
Section 15.7.1.5, “DROP USER Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="group-replication-responses-failure-exit.html" title="20.7.7.4 Exit Action">
Section 20.7.7.4, “Exit Action”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="group-replication-functions-for-member-actions.html" title="14.18.1.5 Functions to Set and Reset Group Replication Member Actions">
Section 14.18.1.5, “Functions to Set and Reset Group Replication Member Actions”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="group-replication-system-variables.html" title="20.9.1 Group Replication System Variables">
Section 20.9.1, “Group Replication System Variables”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="information-functions.html" title="14.15 Information Functions">
Section 14.15, “Information Functions”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="innodb-data-encryption.html" title="17.13 InnoDB Data-at-Rest Encryption">
Section 17.13, “InnoDB Data-at-Rest Encryption”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="replication-semisync-installation.html" title="19.4.10.1 Installing Semisynchronous Replication">
Section 19.4.10.1, “Installing Semisynchronous Replication”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="keyring-system-variables.html" title="8.4.4.16 Keyring System Variables">
Section 8.4.4.16, “Keyring System Variables”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="kill.html" title="15.7.8.4 KILL Statement">
Section 15.7.8.4, “KILL Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="security-against-attack.html" title="8.1.3 Making MySQL Secure Against Attackers">
Section 8.1.3, “Making MySQL Secure Against Attackers”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="keyring-key-migration.html" title="8.4.4.11 Migrating Keys Between Keyring Keystores">
Section 8.4.4.11, “Migrating Keys Between Keyring Keystores”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="faqs-stored-procs.html" title="A.4 MySQL 8.4 FAQ: Stored Procedures and Functions">
Section A.4, “MySQL 8.4 FAQ: Stored Procedures and Functions”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="data-masking-plugin.html" title="8.5.3 MySQL Enterprise Data Masking and De-Identification Plugin">
Section 8.5.3, “MySQL Enterprise Data Masking and De-Identification Plugin”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="data-masking-plugin-functions.html" title="8.5.3.4 MySQL Enterprise Data Masking and De-Identification Plugin Function Descriptions">
Section 8.5.3.4, “MySQL Enterprise Data Masking and De-Identification Plugin Function Descriptions”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="firewall-reference.html" title="8.4.7.4 MySQL Enterprise Firewall Reference">
Section 8.4.7.4, “MySQL Enterprise Firewall Reference”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="time-zone-support.html" title="7.1.15 MySQL Server Time Zone Support">
Section 7.1.15, “MySQL Server Time Zone Support”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="mysqladmin.html" title="6.5.2 mysqladmin — A MySQL Server Administration Program">
Section 6.5.2, “mysqladmin — A MySQL Server Administration Program”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="mysqlbinlog.html" title="6.6.9 mysqlbinlog — Utility for Processing Binary Log Files">
Section 6.6.9, “mysqlbinlog — Utility for Processing Binary Log Files”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="keyring-functions-plugin-specific.html" title="8.4.4.13 Plugin-Specific Keyring Key-Management Functions">
Section 8.4.4.13, “Plugin-Specific Keyring Key-Management Functions”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="rename-user.html" title="15.7.1.7 RENAME USER Statement">
Section 15.7.1.7, “RENAME USER Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="reset-persist.html" title="15.7.8.7 RESET PERSIST Statement">
Section 15.7.8.7, “RESET PERSIST Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="revoke.html" title="15.7.1.8 REVOKE Statement">
Section 15.7.1.8, “REVOKE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="rewriter-query-rewrite-plugin-reference.html#rewriter-query-rewrite-plugin-system-variables" title="7.6.4.3.3 Rewriter Query Rewrite Plugin System Variables">
Section 7.6.4.3.3, “Rewriter Query Rewrite Plugin System Variables”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="sql-mode.html" title="7.1.11 Server SQL Modes">
Section 7.1.11, “Server SQL Modes”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="server-system-variables.html" title="7.1.8 Server System Variables">
Section 7.1.8, “Server System Variables”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="set-password.html" title="15.7.1.10 SET PASSWORD Statement">
Section 15.7.1.10, “SET PASSWORD Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="set-transaction.html" title="15.3.7 SET TRANSACTION Statement">
Section 15.3.7, “SET TRANSACTION Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="replication-howto.html" title="19.1.2 Setting Up Binary Log File Position Based Replication">
Section 19.1.2, “Setting Up Binary Log File Position Based Replication”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="replication-gtids-howto.html" title="19.1.3.4 Setting Up Replication Using GTIDs">
Section 19.1.3.4, “Setting Up Replication Using GTIDs”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="show-binary-log-status.html" title="15.7.7.1 SHOW BINARY LOG STATUS Statement">
Section 15.7.7.1, “SHOW BINARY LOG STATUS Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="show-binary-logs.html" title="15.7.7.2 SHOW BINARY LOGS Statement">
Section 15.7.7.2, “SHOW BINARY LOGS Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="show-processlist.html" title="15.7.7.31 SHOW PROCESSLIST Statement">
Section 15.7.7.31, “SHOW PROCESSLIST Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="show-replica-status.html" title="15.7.7.35 SHOW REPLICA STATUS Statement">
Section 15.7.7.35, “SHOW REPLICA STATUS Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="start-group-replication.html" title="15.4.3.1 START GROUP_REPLICATION Statement">
Section 15.4.3.1, “START GROUP_REPLICATION Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="start-replica.html" title="15.4.2.4 START REPLICA Statement">
Section 15.4.2.4, “START REPLICA Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="commit.html" title="15.3.1 START TRANSACTION, COMMIT, and ROLLBACK Statements">
Section 15.3.1, “START TRANSACTION, COMMIT, and ROLLBACK Statements”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="stop-group-replication.html" title="15.4.3.2 STOP GROUP_REPLICATION Statement">
Section 15.4.3.2, “STOP GROUP_REPLICATION Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="stop-replica.html" title="15.4.2.5 STOP REPLICA Statement">
Section 15.4.2.5, “STOP REPLICA Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="stored-programs-logging.html" title="27.7 Stored Program Binary Logging">
Section 27.7, “Stored Program Binary Logging”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="system-variable-privileges.html" title="7.1.9.1 System Variable Privileges">
Section 7.1.9.1, “System Variable Privileges”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="sys-diagnostics.html" title="30.4.4.2 The diagnostics() Procedure">
Section 30.4.4.2, “The diagnostics() Procedure”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="too-many-connections.html" title="B.3.2.5 Too many connections">
Section B.3.2.5, “Too many connections”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="firewall-usage.html" title="8.4.7.3 Using MySQL Enterprise Firewall">
Section 8.4.7.3, “Using MySQL Enterprise Firewall”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="roles.html" title="8.2.10 Using Roles">
Section 8.2.10, “Using Roles”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="version-tokens-usage.html" title="7.6.6.3 Using Version Tokens">
Section 7.6.6.3, “Using Version Tokens”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="version-tokens-elements.html" title="7.6.6.1 Version Tokens Elements">
Section 7.6.6.1, “Version Tokens Elements”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="version-tokens-reference.html" title="7.6.6.4 Version Tokens Reference">
Section 7.6.6.4, “Version Tokens Reference”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
SYSTEM_USER
</h3>
<dl>
<dt>
<a class="xref" href="account-categories.html" title="8.2.11 Account Categories">
Section 8.2.11, “Account Categories”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="audit-log-filtering.html" title="8.4.5.7 Audit Log Filtering">
Section 8.4.5.7, “Audit Log Filtering”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="drop-procedure.html" title="15.1.29 DROP PROCEDURE and DROP FUNCTION Statements">
Section 15.1.29, “DROP PROCEDURE and DROP FUNCTION Statements”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="information-functions.html" title="14.15 Information Functions">
Section 14.15, “Information Functions”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="kill.html" title="15.7.8.4 KILL Statement">
Section 15.7.8.4, “KILL Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="server-system-variables.html" title="7.1.8 Server System Variables">
Section 7.1.8, “Server System Variables”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="show-processlist.html" title="15.7.7.31 SHOW PROCESSLIST Statement">
Section 15.7.7.31, “SHOW PROCESSLIST Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="stored-objects-security.html" title="27.6 Stored Object Access Control">
Section 27.6, “Stored Object Access Control”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="information-schema-processlist-table.html" title="28.3.23 The INFORMATION_SCHEMA PROCESSLIST Table">
Section 28.3.23, “The INFORMATION_SCHEMA PROCESSLIST Table”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="information-schema-user-attributes-table.html" title="28.3.45 The INFORMATION_SCHEMA USER_ATTRIBUTES Table">
Section 28.3.45, “The INFORMATION_SCHEMA USER_ATTRIBUTES Table”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="performance-schema-processlist-table.html" title="29.12.22.7 The processlist Table">
Section 29.12.22.7, “The processlist Table”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="roles.html" title="8.2.10 Using Roles">
Section 8.2.10, “Using Roles”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="mysql-nutshell.html" title="1.4 What Is New in MySQL 8.4 since MySQL 8.0">
Section 1.4, “What Is New in MySQL 8.4 since MySQL 8.0”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="audit-log-filter-definitions.html" title="8.4.5.8 Writing Audit Log Filter Definitions">
Section 8.4.5.8, “Writing Audit Log Filter Definitions”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
SYSTEM_VARIABLES_ADMIN
</h3>
<dl>
<dt>
<a class="xref" href="audit-log-reference.html" title="8.4.5.11 Audit Log Reference">
Section 8.4.5.11, “Audit Log Reference”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="clone-plugin-options-variables.html" title="7.6.7.13 Clone System Variables">
Section 7.6.7.13, “Clone System Variables”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="clone-plugin-remote.html" title="7.6.7.3 Cloning Remote Data">
Section 7.6.7.3, “Cloning Remote Data”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="audit-log-disabling.html" title="8.4.5.9 Disabling Audit Logging">
Section 8.4.5.9, “Disabling Audit Logging”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="host-cache.html" title="7.1.12.3 DNS Lookups and the Host Cache">
Section 7.1.12.3, “DNS Lookups and the Host Cache”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="replication-options-gtids.html" title="19.1.6.5 Global Transaction ID System Variables">
Section 19.1.6.5, “Global Transaction ID System Variables”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant-tables.html" title="8.2.3 Grant Tables">
Section 8.2.3, “Grant Tables”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="internal-temporary-tables.html" title="10.4.4 Internal Temporary Table Use in MySQL">
Section 10.4.4, “Internal Temporary Table Use in MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="keyring-system-variables.html" title="8.4.4.16 Keyring System Variables">
Section 8.4.4.16, “Keyring System Variables”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="keyring-key-migration.html" title="8.4.4.11 Migrating Keys Between Keyring Keystores">
Section 8.4.4.11, “Migrating Keys Between Keyring Keystores”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="time-zone-support.html" title="7.1.15 MySQL Server Time Zone Support">
Section 7.1.15, “MySQL Server Time Zone Support”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="keyring-functions-plugin-specific.html" title="8.4.4.13 Plugin-Specific Keyring Key-Management Functions">
Section 8.4.4.13, “Plugin-Specific Keyring Key-Management Functions”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="reset-persist.html" title="15.7.8.7 RESET PERSIST Statement">
Section 15.7.8.7, “RESET PERSIST Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="rewriter-query-rewrite-plugin-reference.html#rewriter-query-rewrite-plugin-system-variables" title="7.6.4.3.3 Rewriter Query Rewrite Plugin System Variables">
Section 7.6.4.3.3, “Rewriter Query Rewrite Plugin System Variables”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="sql-mode.html" title="7.1.11 Server SQL Modes">
Section 7.1.11, “Server SQL Modes”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="server-system-variables.html" title="7.1.8 Server System Variables">
Section 7.1.8, “Server System Variables”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="system-variable-privileges.html" title="7.1.9.1 System Variable Privileges">
Section 7.1.9.1, “System Variable Privileges”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="roles.html" title="8.2.10 Using Roles">
Section 8.2.10, “Using Roles”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<a name="priv-index-T">
</a>
<h3 class="title">
T
</h3>
<p>
[
<a class="link" href="dynindex-priv.html#priv-index-top">
index top
</a>
]
</p>
<dl>
<dt>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
TABLE_ENCRYPTION_ADMIN
</h3>
<dl>
<dt>
<a class="xref" href="alter-database.html" title="15.1.2 ALTER DATABASE Statement">
Section 15.1.2, “ALTER DATABASE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="alter-table.html" title="15.1.9 ALTER TABLE Statement">
Section 15.1.9, “ALTER TABLE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="alter-tablespace.html" title="15.1.10 ALTER TABLESPACE Statement">
Section 15.1.10, “ALTER TABLESPACE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="create-database.html" title="15.1.12 CREATE DATABASE Statement">
Section 15.1.12, “CREATE DATABASE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="create-table.html" title="15.1.20 CREATE TABLE Statement">
Section 15.1.20, “CREATE TABLE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="create-tablespace.html" title="15.1.21 CREATE TABLESPACE Statement">
Section 15.1.21, “CREATE TABLESPACE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="innodb-data-encryption.html" title="17.13 InnoDB Data-at-Rest Encryption">
Section 17.13, “InnoDB Data-at-Rest Encryption”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="replication-privilege-checks-account.html" title="19.3.3.1 Privileges For The Replication PRIVILEGE_CHECKS_USER Account">
Section 19.3.3.1, “Privileges For The Replication PRIVILEGE_CHECKS_USER Account”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="rename-table.html" title="15.1.36 RENAME TABLE Statement">
Section 15.1.36, “RENAME TABLE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="server-system-variables.html" title="7.1.8 Server System Variables">
Section 7.1.8, “Server System Variables”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
TELEMETRY_LOG_ADMIN
</h3>
<dl>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
TP_CONNECTION_ADMIN
</h3>
<dl>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="performance-schema-tp-connections-table.html" title="29.12.16.1 The tp_connections Table">
Section 29.12.16.1, “The tp_connections Table”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="thread-pool-operation.html" title="7.6.3.3 Thread Pool Operation">
Section 7.6.3.3, “Thread Pool Operation”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
TRANSACTION_GTID_TAG
</h3>
<dl>
<dt>
<a class="xref" href="replication-options-gtids.html" title="19.1.6.5 Global Transaction ID System Variables">
Section 19.1.6.5, “Global Transaction ID System Variables”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="mysql-nutshell.html" title="1.4 What Is New in MySQL 8.4 since MySQL 8.0">
Section 1.4, “What Is New in MySQL 8.4 since MySQL 8.0”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
TRIGGER
</h3>
<dl>
<dt>
<a class="xref" href="create-trigger.html" title="15.1.22 CREATE TRIGGER Statement">
Section 15.1.22, “CREATE TRIGGER Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="drop-trigger.html" title="15.1.34 DROP TRIGGER Statement">
Section 15.1.34, “DROP TRIGGER Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="mysqldump.html" title="6.5.4 mysqldump — A Database Backup Program">
Section 6.5.4, “mysqldump — A Database Backup Program”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="show-create-trigger.html" title="15.7.7.12 SHOW CREATE TRIGGER Statement">
Section 15.7.7.12, “SHOW CREATE TRIGGER Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="show-triggers.html" title="15.7.7.40 SHOW TRIGGERS Statement">
Section 15.7.7.40, “SHOW TRIGGERS Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="information-schema-triggers-table.html" title="28.3.44 The INFORMATION_SCHEMA TRIGGERS Table">
Section 28.3.44, “The INFORMATION_SCHEMA TRIGGERS Table”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<a name="priv-index-U">
</a>
<h3 class="title">
U
</h3>
<p>
[
<a class="link" href="dynindex-priv.html#priv-index-top">
index top
</a>
]
</p>
<dl>
<dt>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
UPDATE
</h3>
<dl>
<dt>
<a class="xref" href="account-categories.html" title="8.2.11 Account Categories">
Section 8.2.11, “Account Categories”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="alter-user.html" title="15.7.1.1 ALTER USER Statement">
Section 15.7.1.1, “ALTER USER Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="assigning-passwords.html" title="8.2.14 Assigning Account Passwords">
Section 8.2.14, “Assigning Account Passwords”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="create-table.html" title="15.1.20 CREATE TABLE Statement">
Section 15.1.20, “CREATE TABLE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="create-trigger.html" title="15.1.22 CREATE TRIGGER Statement">
Section 15.1.22, “CREATE TRIGGER Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="insert.html" title="15.2.7 INSERT Statement">
Section 15.2.7, “INSERT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="innodb-locking-reads.html" title="17.7.2.4 Locking Reads">
Section 17.7.2.4, “Locking Reads”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="mysql-cluster-security-mysql-privileges.html" title="25.6.21.2 NDB Cluster and MySQL Privileges">
Section 25.6.21.2, “NDB Cluster and MySQL Privileges”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="password-management.html" title="8.2.15 Password Management">
Section 8.2.15, “Password Management”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="performance-schema-table-characteristics.html" title="29.11 Performance Schema General Table Characteristics">
Section 29.11, “Performance Schema General Table Characteristics”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="performance-schema-runtime-configuration.html" title="29.4 Performance Schema Runtime Configuration">
Section 29.4, “Performance Schema Runtime Configuration”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="performance-schema-setup-tables.html" title="29.12.2 Performance Schema Setup Tables">
Section 29.12.2, “Performance Schema Setup Tables”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="sys-schema-prerequisites.html" title="30.1 Prerequisites for Using the sys Schema">
Section 30.1, “Prerequisites for Using the sys Schema”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="partial-revokes.html" title="8.2.12 Privilege Restriction Using Partial Revokes">
Section 8.2.12, “Privilege Restriction Using Partial Revokes”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="replication-privilege-checks-account.html" title="19.3.3.1 Privileges For The Replication PRIVILEGE_CHECKS_USER Account">
Section 19.3.3.1, “Privileges For The Replication PRIVILEGE_CHECKS_USER Account”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="rename-user.html" title="15.7.1.7 RENAME USER Statement">
Section 15.7.1.7, “RENAME USER Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="revoke.html" title="15.7.1.8 REVOKE Statement">
Section 15.7.1.8, “REVOKE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="server-system-variables.html" title="7.1.8 Server System Variables">
Section 7.1.8, “Server System Variables”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="set-default-role.html" title="15.7.1.9 SET DEFAULT ROLE Statement">
Section 15.7.1.9, “SET DEFAULT ROLE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="set-password.html" title="15.7.1.10 SET PASSWORD Statement">
Section 15.7.1.10, “SET PASSWORD Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="stored-objects-security.html" title="27.6 Stored Object Access Control">
Section 27.6, “Stored Object Access Control”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="information-schema-user-attributes-table.html" title="28.3.45 The INFORMATION_SCHEMA USER_ATTRIBUTES Table">
Section 28.3.45, “The INFORMATION_SCHEMA USER_ATTRIBUTES Table”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="merge-storage-engine.html" title="18.7 The MERGE Storage Engine">
Section 18.7, “The MERGE Storage Engine”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="performance-schema-setup-objects-table.html" title="29.12.2.4 The setup_objects Table">
Section 29.12.2.4, “The setup_objects Table”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="trigger-syntax.html" title="27.3.1 Trigger Syntax and Examples">
Section 27.3.1, “Trigger Syntax and Examples”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="update.html" title="15.2.17 UPDATE Statement">
Section 15.2.17, “UPDATE Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="roles.html" title="8.2.10 Using Roles">
Section 8.2.10, “Using Roles”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
USAGE
</h3>
<dl>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<a name="priv-index-V">
</a>
<h3 class="title">
V
</h3>
<p>
[
<a class="link" href="dynindex-priv.html#priv-index-top">
index top
</a>
]
</p>
<dl>
<dt>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
VERSION_TOKEN_ADMIN
</h3>
<dl>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="version-tokens-usage.html" title="7.6.6.3 Using Version Tokens">
Section 7.6.6.3, “Using Version Tokens”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="version-tokens-elements.html" title="7.6.6.1 Version Tokens Elements">
Section 7.6.6.1, “Version Tokens Elements”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="version-tokens-reference.html" title="7.6.6.4 Version Tokens Reference">
Section 7.6.6.4, “Version Tokens Reference”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<a name="priv-index-X">
</a>
<h3 class="title">
X
</h3>
<p>
[
<a class="link" href="dynindex-priv.html#priv-index-top">
index top
</a>
]
</p>
<dl>
<dt>
</dt>
<dd>
</dd>
</dl>
</div>
<div class="indexdiv">
<h3 class="title">
XA_RECOVER_ADMIN
</h3>
<dl>
<dt>
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="privileges-provided.html" title="8.2.2 Privileges Provided by MySQL">
Section 8.2.2, “Privileges Provided by MySQL”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="server-system-variables.html" title="7.1.8 Server System Variables">
Section 7.1.8, “Server System Variables”
</a>
</dt>
<dd>
</dd>
<dt>
<a class="xref" href="xa-statements.html" title="15.3.8.1 XA Transaction SQL Statements">
Section 15.3.8.1, “XA Transaction SQL Statements”
</a>
</dt>
<dd>
</dd>
</dl>
</div>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/performance-schema-setup-tables.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a name="performance-schema-setup-tables">
</a>
29.12.2 Performance Schema Setup Tables
</h3>
</div>
</div>
</div>
<div class="toc">
<dl class="toc">
<dt>
<span class="section">
<a href="performance-schema-setup-actors-table.html">
29.12.2.1 The setup_actors Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="performance-schema-setup-consumers-table.html">
29.12.2.2 The setup_consumers Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="performance-schema-setup-instruments-table.html">
29.12.2.3 The setup_instruments Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="performance-schema-setup-objects-table.html">
29.12.2.4 The setup_objects Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="performance-schema-setup-threads-table.html">
29.12.2.5 The setup_threads Table
</a>
</span>
</dt>
</dl>
</div>
<p>
The setup tables provide information about the current
instrumentation and enable the monitoring configuration to be
changed. For this reason, some columns in these tables can be
changed if you have the
<a class="link" href="privileges-provided.html#priv_update">
<code class="literal">
UPDATE
</code>
</a>
privilege.
</p>
<p>
The use of tables rather than individual variables for setup
information provides a high degree of flexibility in modifying
Performance Schema configuration. For example, you can use a
single statement with standard SQL syntax to make multiple
simultaneous configuration changes.
</p>
<p>
These setup tables are available:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<a class="link" href="performance-schema-setup-actors-table.html" title="29.12.2.1 The setup_actors Table">
<code class="literal">
setup_actors
</code>
</a>
: How to initialize
monitoring for new foreground threads
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="performance-schema-setup-consumers-table.html" title="29.12.2.2 The setup_consumers Table">
<code class="literal">
setup_consumers
</code>
</a>
: The
destinations to which event information can be sent and
stored
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="performance-schema-setup-instruments-table.html" title="29.12.2.3 The setup_instruments Table">
<code class="literal">
setup_instruments
</code>
</a>
: The classes
of instrumented objects for which events can be collected
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="performance-schema-setup-objects-table.html" title="29.12.2.4 The setup_objects Table">
<code class="literal">
setup_objects
</code>
</a>
: Which objects
should be monitored
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="performance-schema-setup-threads-table.html" title="29.12.2.5 The setup_threads Table">
<code class="literal">
setup_threads
</code>
</a>
: Instrumented
thread names and attributes
</p>
</li>
</ul>
</div>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/ansi-diff-update.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title">
<a name="ansi-diff-update">
</a>
1.7.2.2 UPDATE Differences
</h4>
</div>
</div>
</div>
<a class="indexterm" name="idm46045333263616">
</a>
<p>
If you access a column from the table to be updated in an
expression,
<a class="link" href="update.html" title="15.2.17 UPDATE Statement">
<code class="literal">
UPDATE
</code>
</a>
uses the
current value of the column. The second assignment in the
following statement sets
<code class="literal">
col2
</code>
to the
current (updated)
<code class="literal">
col1
</code>
value, not the
original
<code class="literal">
col1
</code>
value. The result is that
<code class="literal">
col1
</code>
and
<code class="literal">
col2
</code>
have the
same value. This behavior differs from standard SQL.
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa98786685"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">UPDATE</span> t1 <span class="token keyword">SET</span> col1 <span class="token operator">=</span> col1 <span class="token operator">+</span> <span class="token number">1</span><span class="token punctuation">,</span> col2 <span class="token operator">=</span> col1<span class="token punctuation">;</span></code></pre>
</div>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/optimizer-features-to-trace.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a name="optimizer-features-to-trace">
</a>
10.15.10 Selecting Optimizer Features to Trace
</h3>
</div>
</div>
</div>
<p>
Some features in the optimizer can be invoked many times during
statement optimization and execution, and thus can make the trace
grow beyond reason. They are:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<span class="emphasis">
<em>
Greedy search
</em>
</span>
: With an
<em class="replaceable">
<code>
N
</code>
</em>
-table join, this could explore
factorial(
<em class="replaceable">
<code>
N
</code>
</em>
) plans.
</p>
</li>
<li class="listitem">
<p>
<span class="emphasis">
<em>
Range optimizer
</em>
</span>
</p>
</li>
<li class="listitem">
<p>
<span class="emphasis">
<em>
Dynamic range optimization
</em>
</span>
: Shown as
<code class="literal">
range checked for each record
</code>
in
<a class="link" href="explain.html" title="15.8.2 EXPLAIN Statement">
<code class="literal">
EXPLAIN
</code>
</a>
output; each outer row
causes a re-run of the range optimizer.
</p>
</li>
<li class="listitem">
<p>
<span class="emphasis">
<em>
Subqueries
</em>
</span>
: A subquery in which the
<code class="literal">
WHERE
</code>
clause may be executed once per row.
</p>
</li>
</ul>
</div>
<p>
Those features can be excluded from tracing by setting one or more
switches of the
<a class="link" href="server-system-variables.html#sysvar_optimizer_trace_features">
<code class="literal">
optimizer_trace_features
</code>
</a>
system
variable to
<code class="literal">
OFF
</code>
. These switches are listed
here:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<code class="literal">
greedy_search
</code>
: Greedy search is not traced.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
range_optimizer
</code>
: The range optimizer is not
traced.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
dynamic_range
</code>
: Only the first call to the
range optimizer on this
<code class="literal">
JOIN_TAB::SQL_SELECT
</code>
is traced.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
repeated_subselect
</code>
: Only the first
execution of this
<code class="literal">
Item_subselect
</code>
is traced.
</p>
</li>
</ul>
</div>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/information-schema-mysql-firewall-whitelist-table.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a name="information-schema-mysql-firewall-whitelist-table">
</a>
28.7.3 The INFORMATION_SCHEMA MYSQL_FIREWALL_WHITELIST Table
</h3>
</div>
</div>
</div>
<a class="indexterm" name="idm46045075934224">
</a>
<p>
The
<a class="link" href="information-schema-mysql-firewall-whitelist-table.html" title="28.7.3 The INFORMATION_SCHEMA MYSQL_FIREWALL_WHITELIST Table">
<code class="literal">
MYSQL_FIREWALL_WHITELIST
</code>
</a>
table
provides a view into the in-memory data cache for MySQL Enterprise Firewall. It lists
allowlist rules of registered firewall account profiles. It is
used in conjunction with the
<code class="literal">
mysql.firewall_whitelist
</code>
system table that
provides persistent storage of firewall data; see
<a class="xref" href="firewall-reference.html#firewall-tables" title="MySQL Enterprise Firewall Tables">
MySQL Enterprise Firewall Tables
</a>
.
</p>
<p>
The
<a class="link" href="information-schema-mysql-firewall-whitelist-table.html" title="28.7.3 The INFORMATION_SCHEMA MYSQL_FIREWALL_WHITELIST Table">
<code class="literal">
MYSQL_FIREWALL_WHITELIST
</code>
</a>
table
has these columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<code class="literal">
USERHOST
</code>
</p>
<p>
The account profile name. Each account name has the format
<code class="literal">
<em class="replaceable">
<code>
user_name
</code>
</em>
@
<em class="replaceable">
<code>
host_name
</code>
</em>
</code>
.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
RULE
</code>
</p>
<p>
A normalized statement indicating an acceptable statement
pattern for the profile. A profile allowlist is the union of
its rules.
</p>
</li>
</ul>
</div>
<p>
This table is deprecated and subject to removal in a future MySQL
version. See
<a class="xref" href="firewall-usage.html#firewall-account-profile-migration" title="Migrating Account Profiles to Group Profiles">
Migrating Account Profiles to Group Profiles
</a>
.
</p>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/mysql-cluster-replication-preparation.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a name="mysql-cluster-replication-preparation">
</a>
25.7.5 Preparing the NDB Cluster for Replication
</h3>
</div>
</div>
</div>
<a class="indexterm" name="idm46045086182336">
</a>
<a class="indexterm" name="idm46045086180848">
</a>
<p>
Preparing the NDB Cluster for replication consists of the
following steps:
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1">
<li class="listitem">
<p>
Check all MySQL servers for version compatibility (see
<a class="xref" href="mysql-cluster-replication-general.html" title="25.7.2 General Requirements for NDB Cluster Replication">
Section 25.7.2, “General Requirements for NDB Cluster Replication”
</a>
).
</p>
</li>
<li class="listitem">
<p>
Create a replication account on the source Cluster with the
appropriate privileges, using the following two SQL
statements:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa52016849"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql<em class="replaceable">S</em>></span> <span class="token keyword">CREATE</span> <span class="token keyword">USER</span> <span class="token string">'<em class="replaceable">replica_user</em>'</span>@<span class="token string">'<em class="replaceable">replica_host</em>'</span>
<span class="token prompt"> -></span> <span class="token keyword">IDENTIFIED</span> <span class="token keyword">BY</span> <span class="token string">'<em class="replaceable">replica_password</em>'</span><span class="token punctuation">;</span>
<span class="token prompt">mysql<em class="replaceable">S</em>></span> <span class="token keyword">GRANT</span> <span class="token keyword">REPLICATION</span> <span class="token keyword">SLAVE</span> <span class="token keyword">ON</span> <span class="token operator">*</span><span class="token punctuation">.</span><span class="token operator">*</span>
<span class="token prompt"> -></span> <span class="token keyword">TO</span> <span class="token string">'<em class="replaceable">replica_user</em>'</span>@<span class="token string">'<em class="replaceable">replica_host</em>'</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
In the previous statement,
<em class="replaceable">
<code>
replica_user
</code>
</em>
is the replication
account user name,
<em class="replaceable">
<code>
replica_host
</code>
</em>
is
the host name or IP address of the replica, and
<em class="replaceable">
<code>
replica_password
</code>
</em>
is the password to
assign to this account.
</p>
<p>
For example, to create a replica user account with the name
<code class="literal">
myreplica
</code>
, logging in from the host named
<code class="literal">
replica-host
</code>
, and using the password
<code class="literal">
53cr37
</code>
, use the following
<a class="link" href="create-user.html" title="15.7.1.3 CREATE USER Statement">
<code class="literal">
CREATE USER
</code>
</a>
and
<a class="link" href="grant.html" title="15.7.1.6 GRANT Statement">
<code class="literal">
GRANT
</code>
</a>
statements:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa64065804"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql<em class="replaceable">S</em>></span> <span class="token keyword">CREATE</span> <span class="token keyword">USER</span> <span class="token string">'myreplica'</span>@<span class="token string">'replica-host'</span>
<span class="token prompt"> -></span> <span class="token keyword">IDENTIFIED</span> <span class="token keyword">BY</span> <span class="token string">'53cr37'</span><span class="token punctuation">;</span>
<span class="token prompt">mysql<em class="replaceable">S</em>></span> <span class="token keyword">GRANT</span> <span class="token keyword">REPLICATION</span> <span class="token keyword">SLAVE</span> <span class="token keyword">ON</span> <span class="token operator">*</span><span class="token punctuation">.</span><span class="token operator">*</span>
<span class="token prompt"> -></span> <span class="token keyword">TO</span> <span class="token string">'myreplica'</span>@<span class="token string">'replica-host'</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
For security reasons, it is preferable to use a unique user
account—not employed for any other purpose—for the
replication account.
</p>
</li>
<li class="listitem">
<p>
<a class="indexterm" name="idm46045086155856">
</a>
Set up the replica to use the source. Using the
<a class="link" href="mysql.html" title="6.5.1 mysql — The MySQL Command-Line Client">
<span class="command">
<strong>
mysql
</strong>
</span>
</a>
client, this can be accomplished with
the
<a class="link" href="change-replication-source-to.html" title="15.4.2.2 CHANGE REPLICATION SOURCE TO Statement">
<code class="literal">
CHANGE REPLICATION SOURCE
TO
</code>
</a>
statement:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa13711370"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql">mysql<em class="replaceable">R</em><span class="token operator">></span> <span class="token keyword">CHANGE</span> <span class="token keyword">REPLICATION</span> <span class="token keyword">SOURCE</span> <span class="token keyword">TO</span>
<span class="token prompt"> -></span> <span class="token keyword">SOURCE_HOST</span><span class="token operator">=</span><span class="token string">'<em class="replaceable">source_host</em>'</span><span class="token punctuation">,</span>
<span class="token prompt"> -></span> <span class="token keyword">SOURCE_PORT</span><span class="token operator">=</span><span class="token keyword"><em class="replaceable">source_port</em></span><span class="token punctuation">,</span>
<span class="token prompt"> -></span> <span class="token keyword">SOURCE_USER</span><span class="token operator">=</span><span class="token string">'<em class="replaceable">replica_user</em>'</span><span class="token punctuation">,</span>
<span class="token prompt"> -></span> <span class="token keyword">SOURCE_PASSWORD</span><span class="token operator">=</span><span class="token string">'<em class="replaceable">replica_password</em>'</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
In the previous statement,
<em class="replaceable">
<code>
source_host
</code>
</em>
is the host name or IP
address of the replication source,
<em class="replaceable">
<code>
source_port
</code>
</em>
is the port for the
replica to use when connecting to the source,
<em class="replaceable">
<code>
replica_user
</code>
</em>
is the user name set
up for the replica on the source, and
<em class="replaceable">
<code>
replica_password
</code>
</em>
is the password
set for that user account in the previous step.
</p>
<p>
For example, to tell the replica to use the MySQL server whose
host name is
<code class="literal">
rep-source
</code>
with the
replication account created in the previous step, use the
following statement:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa63901856"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql">mysql<em class="replaceable">R</em><span class="token operator">></span> <span class="token keyword">CHANGE</span> <span class="token keyword">REPLICATION</span> <span class="token keyword">SOURCE</span> <span class="token keyword">TO</span>
<span class="token prompt"> -></span> <span class="token keyword">SOURCE_HOST</span><span class="token operator">=</span><span class="token string">'rep-source'</span><span class="token punctuation">,</span>
<span class="token prompt"> -></span> <span class="token keyword">SOURCE_PORT</span><span class="token operator">=</span><span class="token number">3306</span><span class="token punctuation">,</span>
<span class="token prompt"> -></span> <span class="token keyword">SOURCE_USER</span><span class="token operator">=</span><span class="token string">'myreplica'</span><span class="token punctuation">,</span>
<span class="token prompt"> -></span> <span class="token keyword">SOURCE_PASSWORD</span><span class="token operator">=</span><span class="token string">'53cr37'</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
For a complete list of options that can be used with this
statement, see
<a class="xref" href="change-replication-source-to.html" title="15.4.2.2 CHANGE REPLICATION SOURCE TO Statement">
Section 15.4.2.2, “CHANGE REPLICATION SOURCE TO Statement”
</a>
.
</p>
<p>
To provide replication backup capability, you also need to add
an
<a class="link" href="mysql-cluster-options-variables.html#option_mysqld_ndb-connectstring">
<code class="option">
--ndb-connectstring
</code>
</a>
option
to the replica's
<code class="filename">
my.cnf
</code>
file prior
to starting the replication process. See
<a class="xref" href="mysql-cluster-replication-backups.html" title="25.7.9 NDB Cluster Backups With NDB Cluster Replication">
Section 25.7.9, “NDB Cluster Backups With NDB Cluster Replication”
</a>
, for
details.
</p>
<p>
For additional options that can be set in
<code class="filename">
my.cnf
</code>
for replicas, see
<a class="xref" href="replication-options.html" title="19.1.6 Replication and Binary Logging Options and Variables">
Section 19.1.6, “Replication and Binary Logging Options and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
If the source cluster is already in use, you can create a
backup of the source and load this onto the replica to cut
down on the amount of time required for the replica to
synchronize itself with the source. If the replica is also
running NDB Cluster, this can be accomplished using the backup
and restore procedure described in
<a class="xref" href="mysql-cluster-replication-backups.html" title="25.7.9 NDB Cluster Backups With NDB Cluster Replication">
Section 25.7.9, “NDB Cluster Backups With NDB Cluster Replication”
</a>
.
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-simple"><div class="docs-select-all right" id="sa57996251"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-simple">ndb<span class="token operator">-</span>connectstring<span class="token operator">=</span><em class="replaceable">management_host</em><span class="token punctuation">[</span><span class="token operator">:</span><em class="replaceable">port</em><span class="token punctuation">]</span></code></pre>
</div>
<p>
In the event that you are
<span class="emphasis">
<em>
not
</em>
</span>
using NDB
Cluster on the replica, you can create a backup with this
command on the source:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa52961227"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal"><span class="token prompt">shell<em class="replaceable">S</em>></span><span class="token command"> mysqldump</span> <span class="token constant">--source-data</span><span class="token attr-value"><span class="token punctuation">=</span>1</span></code></pre>
</div>
<p>
Then import the resulting data dump onto the replica by
copying the dump file over to it. After this, you can use the
<a class="link" href="mysql.html" title="6.5.1 mysql — The MySQL Command-Line Client">
<span class="command">
<strong>
mysql
</strong>
</span>
</a>
client to import the data from the
dumpfile into the replica database as shown here, where
<em class="replaceable">
<code>
dump_file
</code>
</em>
is the name of the file
that was generated using
<a class="link" href="mysqldump.html" title="6.5.4 mysqldump — A Database Backup Program">
<span class="command">
<strong>
mysqldump
</strong>
</span>
</a>
on the
source, and
<em class="replaceable">
<code>
db_name
</code>
</em>
is the name of
the database to be replicated:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa33360950"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">shell<em class="replaceable">R</em>> mysql <span class="token property">-u</span> root <span class="token property">-p</span> <em class="replaceable">db_name</em> < <em class="replaceable">dump_file</em></code></pre>
</div>
<p>
For a complete list of options to use with
<a class="link" href="mysqldump.html" title="6.5.4 mysqldump — A Database Backup Program">
<span class="command">
<strong>
mysqldump
</strong>
</span>
</a>
, see
<a class="xref" href="mysqldump.html" title="6.5.4 mysqldump — A Database Backup Program">
Section 6.5.4, “mysqldump — A Database Backup Program”
</a>
.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
If you copy the data to the replica in this fashion, make
sure that you stop the replica from trying to connect to the
source to begin replicating before all the data has been
loaded. You can do this by starting the replica with
<a class="link" href="replication-options-replica.html#option_mysqld_skip-replica-start">
<code class="option">
--skip-replica-start
</code>
</a>
. Once
the data loading has completed, follow the additional steps
outlined in the next two sections.
</p>
</div>
</li>
<li class="listitem">
<p>
Ensure that each MySQL server acting as a replication source
is assigned a unique server ID, and has binary logging
enabled, using the row-based format. (See
<a class="xref" href="replication-formats.html" title="19.2.1 Replication Formats">
Section 19.2.1, “Replication Formats”
</a>
.) In addition, we
strongly recommend enabling the
<a class="link" href="mysql-cluster-options-variables.html#sysvar_replica_allow_batching">
<code class="literal">
replica_allow_batching
</code>
</a>
system
variable (the default).
</p>
<p>
Use
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_replica_batch_size">
<code class="option">
--ndb-replica-batch-size
</code>
</a>
to
set the batch size used for writes on the replica instead of
<code class="option">
--ndb-batch-size
</code>
, and
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_replica_blob_write_batch_bytes">
<code class="option">
--ndb-replica-blob-write-batch-bytes
</code>
</a>
rather than
<code class="option">
--ndb-blob-write-batch-bytes
</code>
to
determine the batch size used by the replication applier for
writing blob data. All of these options can be set either in
the source server's
<code class="filename">
my.cnf
</code>
file, or
on the command line when starting the source
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
process. See
<a class="xref" href="mysql-cluster-replication-starting.html" title="25.7.6 Starting NDB Cluster Replication (Single Replication Channel)">
Section 25.7.6, “Starting NDB Cluster Replication (Single Replication Channel)”
</a>
, for more
information.
</p>
</li>
</ol>
</div>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/pluggable-authentication-system-variables.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title">
<a name="pluggable-authentication-system-variables">
</a>
8.4.1.13 Pluggable Authentication System Variables
</h4>
</div>
</div>
</div>
<p>
These variables are unavailable unless the appropriate
server-side plugin is installed:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<code class="literal">
authentication_ldap_sasl
</code>
for system
variables with names of the form
<code class="literal">
authentication_ldap_sasl_
<em class="replaceable">
<code>
xxx
</code>
</em>
</code>
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
authentication_ldap_simple
</code>
for system
variables with names of the form
<code class="literal">
authentication_ldap_simple_
<em class="replaceable">
<code>
xxx
</code>
</em>
</code>
</p>
</li>
</ul>
</div>
<div class="table">
<a name="idm46045243764880">
</a>
<p class="title">
<b>
Table 8.28 Authentication Plugin System Variable
Summary
</b>
</p>
<div class="table-contents">
<table frame="box" rules="all" summary="Reference for authentication plugin system variables.">
<colgroup>
<col style="width: 20%"/>
<col style="width: 15%"/>
<col style="width: 15%"/>
<col style="width: 15%"/>
<col style="width: 15%"/>
<col style="width: 15%"/>
<col style="width: 15%"/>
</colgroup>
<thead>
<tr>
<th scope="col">
Name
</th>
<th scope="col">
Cmd-Line
</th>
<th scope="col">
Option File
</th>
<th scope="col">
System Var
</th>
<th scope="col">
Status Var
</th>
<th scope="col">
Var Scope
</th>
<th scope="col">
Dynamic
</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_kerberos_service_key_tab">
authentication_kerberos_service_key_tab
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_kerberos_service_principal">
authentication_kerberos_service_principal
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_auth_method_name">
authentication_ldap_sasl_auth_method_name
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_bind_base_dn">
authentication_ldap_sasl_bind_base_dn
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_bind_root_dn">
authentication_ldap_sasl_bind_root_dn
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_bind_root_pwd">
authentication_ldap_sasl_bind_root_pwd
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_ca_path">
authentication_ldap_sasl_ca_path
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_connect_timeout">
authentication_ldap_sasl_connect_timeout
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_group_search_attr">
authentication_ldap_sasl_group_search_attr
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_group_search_filter">
authentication_ldap_sasl_group_search_filter
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_init_pool_size">
authentication_ldap_sasl_init_pool_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_log_status">
authentication_ldap_sasl_log_status
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_max_pool_size">
authentication_ldap_sasl_max_pool_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_referral">
authentication_ldap_sasl_referral
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_response_timeout">
authentication_ldap_sasl_response_timeout
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_server_host">
authentication_ldap_sasl_server_host
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_server_port">
authentication_ldap_sasl_server_port
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_tls">
authentication_ldap_sasl_tls
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_user_search_attr">
authentication_ldap_sasl_user_search_attr
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_auth_method_name">
authentication_ldap_simple_auth_method_name
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_bind_base_dn">
authentication_ldap_simple_bind_base_dn
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_bind_root_dn">
authentication_ldap_simple_bind_root_dn
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_bind_root_pwd">
authentication_ldap_simple_bind_root_pwd
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_ca_path">
authentication_ldap_simple_ca_path
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_connect_timeout">
authentication_ldap_simple_connect_timeout
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_group_search_attr">
authentication_ldap_simple_group_search_attr
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_group_search_filter">
authentication_ldap_simple_group_search_filter
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_init_pool_size">
authentication_ldap_simple_init_pool_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_log_status">
authentication_ldap_simple_log_status
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_max_pool_size">
authentication_ldap_simple_max_pool_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_referral">
authentication_ldap_simple_referral
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_response_timeout">
authentication_ldap_simple_response_timeout
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_server_host">
authentication_ldap_simple_server_host
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_server_port">
authentication_ldap_simple_server_port
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_tls">
authentication_ldap_simple_tls
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_user_search_attr">
authentication_ldap_simple_user_search_attr
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_authentication_policy">
authentication_policy
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_webauthn_rp_id">
authentication_webauthn_rp_id
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_authentication_windows_log_level">
authentication_windows_log_level
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_authentication_windows_use_principal_name">
authentication_windows_use_principal_name
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
</tbody>
</table>
</div>
<div class="table-contents">
<table cellpadding="0" cellspacing="0" style="position: fixed; top: 0px; display: none; left: 401px; width: 739px;">
<thead>
<tr>
<th scope="col" style="width: 350.719px;">
Name
</th>
<th scope="col" style="width: 57.0781px;">
Cmd-Line
</th>
<th scope="col" style="width: 67px;">
Option File
</th>
<th scope="col" style="width: 69.0469px;">
System Var
</th>
<th scope="col" style="width: 63.9531px;">
Status Var
</th>
<th scope="col" style="width: 60.875px;">
Var Scope
</th>
<th scope="col" style="width: 69.3281px;">
Dynamic
</th>
</tr>
</thead>
</table>
</div>
</div>
<br class="table-break"/>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<a name="sysvar_authentication_kerberos_service_key_tab">
</a>
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_kerberos_service_key_tab">
<code class="literal">
authentication_kerberos_service_key_tab
</code>
</a>
</p>
<a class="indexterm" name="idm46045243463296">
</a>
<a class="indexterm" name="idm46045243462256">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for authentication_kerberos_service_key_tab">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--authentication-kerberos-service-key-tab=file_name
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_kerberos_service_key_tab">
authentication_kerberos_service_key_tab
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
No
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
File name
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
datadir/mysql.keytab
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045243440432">
</a>
<p>
The name of the server-side key-table
(
<span class="quote">
“
<span class="quote">
keytab
</span>
”
</span>
) file containing Kerberos service
keys to authenticate MySQL service tickets received from
clients. The file name should be given as an absolute path
name. If this variable is not set, the default is
<code class="filename">
mysql.keytab
</code>
in the data directory.
</p>
<p>
The file must exist and contain a valid key for the service
principal name (SPN) or authentication of clients will fail.
(The SPN and same key also must be created in the Kerberos
server.) The file may contain multiple service principal
names and their respective key combinations.
</p>
<p>
The file must be generated by the Kerberos server
administrator and be copied to a location accessible by the
MySQL server. The file can be validated to make sure that it
is correct and was copied properly using this command:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa34839798"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">klist <span class="token property">-k</span> <em class="replaceable">file_name</em></code></pre>
</div>
<p>
For information about keytab files, see
<a class="ulink" href="https://web.mit.edu/kerberos/krb5-latest/doc/basic/keytab_def.html" target="_blank">
https://web.mit.edu/kerberos/krb5-latest/doc/basic/keytab_def.html
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_authentication_kerberos_service_principal">
</a>
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_kerberos_service_principal">
<code class="literal">
authentication_kerberos_service_principal
</code>
</a>
</p>
<a class="indexterm" name="idm46045243430672">
</a>
<a class="indexterm" name="idm46045243429552">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for authentication_kerberos_service_principal">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--authentication-kerberos-service-principal=name
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_kerberos_service_principal">
authentication_kerberos_service_principal
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
mysql/host_name@realm_name
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
The Kerberos service principal name (SPN) that the MySQL
server sends to clients.
</p>
<p>
The value is composed from the service name
(
<code class="literal">
mysql
</code>
), a host name, and a realm name.
The default value is
<code class="literal">
mysql/
<em class="replaceable">
<code>
host_name
</code>
</em>
@
<em class="replaceable">
<code>
realm_name
</code>
</em>
</code>
.
The realm in the service principal name enables retrieving
the exact service key.
</p>
<p>
To use a nondefault value, set the value using the same
format. For example, to use a host name of
<code class="literal">
krbauth.example.com
</code>
and a realm of
<code class="literal">
MYSQL.LOCAL
</code>
, set
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_kerberos_service_principal">
<code class="literal">
authentication_kerberos_service_principal
</code>
</a>
to
<code class="literal">
mysql/[email protected]
</code>
.
</p>
<p>
The service principal name and service key must already be
present in the database managed by the KDC server.
</p>
<p>
There can be service principal names that differ only by
realm name.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_authentication_ldap_sasl_auth_method_name">
</a>
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_auth_method_name">
<code class="literal">
authentication_ldap_sasl_auth_method_name
</code>
</a>
</p>
<a class="indexterm" name="idm46045243396768">
</a>
<a class="indexterm" name="idm46045243395648">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for authentication_ldap_sasl_auth_method_name">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--authentication-ldap-sasl-auth-method-name=value
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_auth_method_name">
authentication_ldap_sasl_auth_method_name
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
SCRAM-SHA-1
</code>
</td>
</tr>
<tr>
<th>
Valid Values
</th>
<td>
<p class="valid-value">
<code class="literal">
SCRAM-SHA-1
</code>
</p>
<p class="valid-value">
<code class="literal">
SCRAM-SHA-256
</code>
</p>
<p class="valid-value">
<code class="literal">
GSSAPI
</code>
</p>
</td>
</tr>
</tbody>
</table>
</div>
<p>
For SASL LDAP authentication, the authentication method
name. Communication between the authentication plugin and
the LDAP server occurs according to this authentication
method to ensure password security.
</p>
<p>
These authentication method values are permitted:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
<code class="literal">
SCRAM-SHA-1
</code>
: Use a SASL
challenge-response mechanism.
</p>
<p>
The client-side
<code class="literal">
authentication_ldap_sasl_client
</code>
plugin communicates with the SASL server, using the
password to create a challenge and obtain a SASL request
buffer, then passes this buffer to the server-side
<code class="literal">
authentication_ldap_sasl
</code>
plugin. The
client-side and server-side SASL LDAP plugins use SASL
messages for secure transmission of credentials within
the LDAP protocol, to avoid sending the cleartext
password between the MySQL client and server.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
SCRAM-SHA-256
</code>
: Use a SASL
challenge-response mechanism.
</p>
<p>
This method is similar to
<code class="literal">
SCRAM-SHA-1
</code>
, but is more secure. It
requires an OpenLDAP server built using Cyrus SASL
2.1.27 or higher.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
GSSAPI
</code>
: Use Kerberos, a passwordless
and ticket-based protocol.
</p>
<p>
GSSAPI/Kerberos is supported as an authentication method
for MySQL clients and servers only on Linux. It is
useful in Linux environments where applications access
LDAP using Microsoft Active Directory, which has
Kerberos enabled by default.
</p>
<p>
The client-side
<code class="literal">
authentication_ldap_sasl_client
</code>
plugin obtains a service ticket using the
ticket-granting ticket (TGT) from Kerberos, but does not
use LDAP services directly. The server-side
<code class="literal">
authentication_ldap_sasl
</code>
plugin
routes Kerberos messages between the client-side plugin
and the LDAP server. Using the credentials thus
obtained, the server-side plugin then communicates with
the LDAP server to interpret LDAP authentication
messages and retrieve LDAP groups.
</p>
</li>
</ul>
</div>
</li>
<li class="listitem">
<p>
<a name="sysvar_authentication_ldap_sasl_bind_base_dn">
</a>
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_bind_base_dn">
<code class="literal">
authentication_ldap_sasl_bind_base_dn
</code>
</a>
</p>
<a class="indexterm" name="idm46045243353344">
</a>
<a class="indexterm" name="idm46045243352304">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for authentication_ldap_sasl_bind_base_dn">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--authentication-ldap-sasl-bind-base-dn=value
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_bind_base_dn">
authentication_ldap_sasl_bind_base_dn
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
NULL
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
For SASL LDAP authentication, the base distinguished name
(DN). This variable can be used to limit the scope of
searches by anchoring them at a certain location (the
<span class="quote">
“
<span class="quote">
base
</span>
”
</span>
) within the search tree.
</p>
<p>
Suppose that members of one set of LDAP user entries each
have this form:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-ini"><div class="docs-select-all right" id="sa94594129"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-ini"><span class="token constant">uid</span><span class="token attr-value"><span class="token punctuation">=</span><em class="replaceable">user_name</em>,ou=People,dc=example,dc=com</span></code></pre>
</div>
<p>
And that members of another set of LDAP user entries each
have this form:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-ini"><div class="docs-select-all right" id="sa29762506"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-ini"><span class="token constant">uid</span><span class="token attr-value"><span class="token punctuation">=</span><em class="replaceable">user_name</em>,ou=Admin,dc=example,dc=com</span></code></pre>
</div>
<p>
Then searches work like this for different base DN values:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
If the base DN is
<code class="literal">
ou=People,dc=example,dc=com
</code>
: Searches
find user entries only in the first set.
</p>
</li>
<li class="listitem">
<p>
If the base DN is
<code class="literal">
ou=Admin,dc=example,dc=com
</code>
: Searches
find user entries only in the second set.
</p>
</li>
<li class="listitem">
<p>
If the base DN is
<code class="literal">
ou=dc=example,dc=com
</code>
: Searches find
user entries in the first or second set.
</p>
</li>
</ul>
</div>
<p>
In general, more specific base DN values result in faster
searches because they limit the search scope more.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_authentication_ldap_sasl_bind_root_dn">
</a>
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_bind_root_dn">
<code class="literal">
authentication_ldap_sasl_bind_root_dn
</code>
</a>
</p>
<a class="indexterm" name="idm46045243316768">
</a>
<a class="indexterm" name="idm46045243315728">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for authentication_ldap_sasl_bind_root_dn">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--authentication-ldap-sasl-bind-root-dn=value
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_bind_root_dn">
authentication_ldap_sasl_bind_root_dn
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
NULL
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
For SASL LDAP authentication, the root distinguished name
(DN). This variable is used in conjunction with
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_bind_root_pwd">
<code class="literal">
authentication_ldap_sasl_bind_root_pwd
</code>
</a>
as the credentials for authenticating to the LDAP server for
the purpose of performing searches. Authentication uses
either one or two LDAP bind operations, depending on whether
the MySQL account names an LDAP user DN:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
If the account does not name a user DN:
<code class="literal">
authentication_ldap_sasl
</code>
performs an
initial LDAP binding using
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_bind_root_dn">
<code class="literal">
authentication_ldap_sasl_bind_root_dn
</code>
</a>
and
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_bind_root_pwd">
<code class="literal">
authentication_ldap_sasl_bind_root_pwd
</code>
</a>
.
(These are both empty by default, so if they are not
set, the LDAP server must permit anonymous connections.)
The resulting bind LDAP handle is used to search for the
user DN, based on the client user name.
<code class="literal">
authentication_ldap_sasl
</code>
performs a
second bind using the user DN and client-supplied
password.
</p>
</li>
<li class="listitem">
<p>
If the account does name a user DN: The first bind
operation is unnecessary in this case.
<code class="literal">
authentication_ldap_sasl
</code>
performs a
single bind using the user DN and client-supplied
password. This is faster than if the MySQL account does
not specify an LDAP user DN.
</p>
</li>
</ul>
</div>
</li>
<li class="listitem">
<p>
<a name="sysvar_authentication_ldap_sasl_bind_root_pwd">
</a>
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_bind_root_pwd">
<code class="literal">
authentication_ldap_sasl_bind_root_pwd
</code>
</a>
</p>
<a class="indexterm" name="idm46045243281664">
</a>
<a class="indexterm" name="idm46045243280624">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for authentication_ldap_sasl_bind_root_pwd">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--authentication-ldap-sasl-bind-root-pwd=value
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_bind_root_pwd">
authentication_ldap_sasl_bind_root_pwd
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
NULL
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
For SASL LDAP authentication, the password for the root
distinguished name. This variable is used in conjunction
with
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_bind_root_dn">
<code class="literal">
authentication_ldap_sasl_bind_root_dn
</code>
</a>
.
See the description of that variable.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_authentication_ldap_sasl_ca_path">
</a>
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_ca_path">
<code class="literal">
authentication_ldap_sasl_ca_path
</code>
</a>
</p>
<a class="indexterm" name="idm46045243254464">
</a>
<a class="indexterm" name="idm46045243253360">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for authentication_ldap_sasl_ca_path">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--authentication-ldap-sasl-ca-path=value
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_ca_path">
authentication_ldap_sasl_ca_path
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
NULL
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
For SASL LDAP authentication, the absolute path of the
certificate authority file. Specify this file if it is
desired that the authentication plugin perform verification
of the LDAP server certificate.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
In addition to setting the
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_ca_path">
<code class="literal">
authentication_ldap_sasl_ca_path
</code>
</a>
variable to the file name, you must add the appropriate
certificate authority certificates to the file and enable
the
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_tls">
<code class="literal">
authentication_ldap_sasl_tls
</code>
</a>
system variable. These variables can be set to override
the default OpenLDAP TLS configuration; see
<a class="xref" href="ldap-pluggable-authentication.html#ldap-pluggable-authentication-ldap-conf" title="LDAP Pluggable Authentication and ldap.conf">
LDAP Pluggable Authentication and ldap.conf
</a>
</p>
</div>
</li>
<li class="listitem">
<p>
<a name="sysvar_authentication_ldap_sasl_connect_timeout">
</a>
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_connect_timeout">
<code class="literal">
authentication_ldap_sasl_connect_timeout
</code>
</a>
</p>
<a class="indexterm" name="idm46045243224048">
</a>
<a class="indexterm" name="idm46045243222928">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for authentication_ldap_sasl_connect_timeout">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--authentication-ldap-sasl-connect-timeout=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_connect_timeout">
authentication_ldap_sasl_connect_timeout
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
30
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
31536000
</code>
</td>
</tr>
<tr>
<th>
Unit
</th>
<td>
seconds
</td>
</tr>
</tbody>
</table>
</div>
<p>
Specifies the time (in seconds) that MySQL server waits to
connect to the LDAP server using TCP.
</p>
<p>
When a MySQL account authenticates using LDAP, MySQL server
attempts to establish a TCP connection with the LDAP server,
which it uses to send an LDAP bind request over the
connection. If the LDAP server does not respond to TCP
handshake after a configured amount of time, MySQL abandons
the TCP handshake attempt and emits an error message. If the
timeout setting is zero, MySQL server ignores this system
variable setting. For more information, see
<a class="xref" href="ldap-pluggable-authentication.html#ldap-pluggable-authentication-timeouts" title="Setting Timeouts for LDAP Pluggable Authentication">
Setting Timeouts for LDAP Pluggable Authentication
</a>
.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
If you set this variable to a timeout value that is
greater than the host system's default value, the
shorter system timeout is used.
</p>
</div>
</li>
<li class="listitem">
<p>
<a name="sysvar_authentication_ldap_sasl_group_search_attr">
</a>
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_group_search_attr">
<code class="literal">
authentication_ldap_sasl_group_search_attr
</code>
</a>
</p>
<a class="indexterm" name="idm46045243188528">
</a>
<a class="indexterm" name="idm46045243187408">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for authentication_ldap_sasl_group_search_attr">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--authentication-ldap-sasl-group-search-attr=value
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_group_search_attr">
authentication_ldap_sasl_group_search_attr
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
cn
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
For SASL LDAP authentication, the name of the attribute that
specifies group names in LDAP directory entries. If
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_group_search_attr">
<code class="literal">
authentication_ldap_sasl_group_search_attr
</code>
</a>
has its default value of
<code class="literal">
cn
</code>
, searches
return the
<code class="literal">
cn
</code>
value as the group name.
For example, if an LDAP entry with a
<code class="literal">
uid
</code>
value of
<code class="literal">
user1
</code>
has a
<code class="literal">
cn
</code>
attribute of
<code class="literal">
mygroup
</code>
, searches for
<code class="literal">
user1
</code>
return
<code class="literal">
mygroup
</code>
as the group name.
</p>
<p>
This variable should be the empty string if you want no
group or proxy authentication.
</p>
<p>
If the group search attribute is
<code class="literal">
isMemberOf
</code>
, LDAP authentication directly
retrieves the user attribute
<code class="literal">
isMemberOf
</code>
value and assigns it as group information. If the group
search attribute is not
<code class="literal">
isMemberOf
</code>
, LDAP
authentication searches for all groups where the user is a
member. (The latter is the default behavior.) This behavior
is based on how LDAP group information can be stored two
ways: 1) A group entry can have an attribute named
<code class="literal">
memberUid
</code>
or
<code class="literal">
member
</code>
with a value that is a user name; 2) A user entry can have
an attribute named
<code class="literal">
isMemberOf
</code>
with values
that are group names.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_authentication_ldap_sasl_group_search_filter">
</a>
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_group_search_filter">
<code class="literal">
authentication_ldap_sasl_group_search_filter
</code>
</a>
</p>
<a class="indexterm" name="idm46045243149536">
</a>
<a class="indexterm" name="idm46045243148416">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for authentication_ldap_sasl_group_search_filter">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--authentication-ldap-sasl-group-search-filter=value
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_group_search_filter">
authentication_ldap_sasl_group_search_filter
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
(|(&(objectClass=posixGroup)(memberUid=%s))(&(objectClass=group)(member=%s)))
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
For SASL LDAP authentication, the custom group search
filter.
</p>
<p>
The search filter value can contain
<code class="literal">
{UA}
</code>
and
<code class="literal">
{UD}
</code>
notation to represent the user
name and the full user DN. For example,
<code class="literal">
{UA}
</code>
is replaced with a user name such as
<code class="literal">
"admin"
</code>
, whereas
<code class="literal">
{UD}
</code>
is replaced with a use full DN such as
<code class="literal">
"uid=admin,ou=People,dc=example,dc=com"
</code>
.
The following value is the default, which supports both
OpenLDAP and Active Directory:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-simple"><div class="docs-select-all right" id="sa47812841"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-simple"><span class="token punctuation">(</span><span class="token operator">|</span><span class="token punctuation">(</span><span class="token operator">&</span><span class="token punctuation">(</span>objectClass<span class="token operator">=</span>posixGroup<span class="token punctuation">)</span><span class="token punctuation">(</span>memberUid<span class="token operator">=</span><span class="token punctuation">{</span>UA<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">)</span>
<span class="token punctuation">(</span><span class="token operator">&</span><span class="token punctuation">(</span>objectClass<span class="token operator">=</span>group<span class="token punctuation">)</span><span class="token punctuation">(</span>member<span class="token operator">=</span><span class="token punctuation">{</span>UD<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">)</span></code></pre>
</div>
<p>
In some cases for the user scenario,
<code class="literal">
memberOf
</code>
is a simple user attribute that
holds no group information. For additional flexibility, an
optional
<code class="literal">
{GA}
</code>
prefix can be used with the
group search attribute. Any group attribute with a {GA}
prefix is treated as a user attribute having group names.
For example, with a value of
<code class="literal">
{GA}MemberOf
</code>
, if the group value is the
DN, the first attribute value from the group DN is returned
as the group name.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_authentication_ldap_sasl_init_pool_size">
</a>
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_init_pool_size">
<code class="literal">
authentication_ldap_sasl_init_pool_size
</code>
</a>
</p>
<a class="indexterm" name="idm46045243114240">
</a>
<a class="indexterm" name="idm46045243113200">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for authentication_ldap_sasl_init_pool_size">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--authentication-ldap-sasl-init-pool-size=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_init_pool_size">
authentication_ldap_sasl_init_pool_size
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
10
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
32767
</code>
</td>
</tr>
<tr>
<th>
Unit
</th>
<td>
connections
</td>
</tr>
</tbody>
</table>
</div>
<p>
For SASL LDAP authentication, the initial size of the pool
of connections to the LDAP server. Choose the value for this
variable based on the average number of concurrent
authentication requests to the LDAP server.
</p>
<p>
The plugin uses
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_init_pool_size">
<code class="literal">
authentication_ldap_sasl_init_pool_size
</code>
</a>
and
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_max_pool_size">
<code class="literal">
authentication_ldap_sasl_max_pool_size
</code>
</a>
together for connection-pool management:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
When the authentication plugin initializes, it creates
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_init_pool_size">
<code class="literal">
authentication_ldap_sasl_init_pool_size
</code>
</a>
connections, unless
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_max_pool_size">
<code class="literal">
authentication_ldap_sasl_max_pool_size=0
</code>
</a>
to disable pooling.
</p>
</li>
<li class="listitem">
<p>
If the plugin receives an authentication request when
there are no free connections in the current connection
pool, the plugin can create a new connection, up to the
maximum connection pool size given by
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_max_pool_size">
<code class="literal">
authentication_ldap_sasl_max_pool_size
</code>
</a>
.
</p>
</li>
<li class="listitem">
<p>
If the plugin receives a request when the pool size is
already at its maximum and there are no free
connections, authentication fails.
</p>
</li>
<li class="listitem">
<p>
When the plugin unloads, it closes all pooled
connections.
</p>
</li>
</ul>
</div>
<p>
Changes to plugin system variable settings may have no
effect on connections already in the pool. For example,
modifying the LDAP server host, port, or TLS settings does
not affect existing connections. However, if the original
variable values were invalid and the connection pool could
not be initialized, the plugin attempts to reinitialize the
pool for the next LDAP request. In this case, the new system
variable values are used for the reinitialization attempt.
</p>
<p>
If
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_max_pool_size">
<code class="literal">
authentication_ldap_sasl_max_pool_size=0
</code>
</a>
to disable pooling, each LDAP connection opened by the
plugin uses the values the system variables have at that
time.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_authentication_ldap_sasl_log_status">
</a>
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_log_status">
<code class="literal">
authentication_ldap_sasl_log_status
</code>
</a>
</p>
<a class="indexterm" name="idm46045243067040">
</a>
<a class="indexterm" name="idm46045243066000">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for authentication_ldap_sasl_log_status">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--authentication-ldap-sasl-log-status=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_log_status">
authentication_ldap_sasl_log_status
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
1
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
1
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
6
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045243039392">
</a>
<p>
For SASL LDAP authentication, the logging level for messages
written to the error log. The following table shows the
permitted level values and their meanings.
</p>
<div class="table">
<a name="idm46045243037296">
</a>
<p class="title">
<b>
Table 8.29 Log Levels for authentication_ldap_sasl_log_status
</b>
</p>
<div class="table-contents">
<table summary="authentication_ldap_sasl_log_status system variable option values and types of messages logged per value.">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<thead>
<tr>
<th>
Option Value
</th>
<th>
Types of Messages Logged
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<code class="literal">
1
</code>
</td>
<td>
No messages
</td>
</tr>
<tr>
<td>
<code class="literal">
2
</code>
</td>
<td>
Error messages
</td>
</tr>
<tr>
<td>
<code class="literal">
3
</code>
</td>
<td>
Error and warning messages
</td>
</tr>
<tr>
<td>
<code class="literal">
4
</code>
</td>
<td>
Error, warning, and information messages
</td>
</tr>
<tr>
<td>
<code class="literal">
5
</code>
</td>
<td>
Same as previous level plus debugging messages from MySQL
</td>
</tr>
<tr>
<td>
<code class="literal">
6
</code>
</td>
<td>
Same as previous level plus debugging messages from LDAP library
</td>
</tr>
</tbody>
</table>
</div>
</div>
<br class="table-break"/>
<a class="indexterm" name="idm46045243016256">
</a>
<a class="indexterm" name="idm46045243014768">
</a>
<a class="indexterm" name="idm46045243013664">
</a>
<p>
On the client side, messages can be logged to the standard
output by setting the
<code class="literal">
AUTHENTICATION_LDAP_CLIENT_LOG
</code>
environment variable. The permitted and default values are
the same as for
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_log_status">
<code class="literal">
authentication_ldap_sasl_log_status
</code>
</a>
.
</p>
<p>
The
<code class="literal">
AUTHENTICATION_LDAP_CLIENT_LOG
</code>
environment variable applies only to SASL LDAP
authentication. It has no effect for simple LDAP
authentication because the client plugin in that case is
<code class="literal">
mysql_clear_password
</code>
, which knows nothing
about LDAP operations.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_authentication_ldap_sasl_max_pool_size">
</a>
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_max_pool_size">
<code class="literal">
authentication_ldap_sasl_max_pool_size
</code>
</a>
</p>
<a class="indexterm" name="idm46045243004784">
</a>
<a class="indexterm" name="idm46045243003744">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for authentication_ldap_sasl_max_pool_size">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--authentication-ldap-sasl-max-pool-size=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_max_pool_size">
authentication_ldap_sasl_max_pool_size
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
1000
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
32767
</code>
</td>
</tr>
<tr>
<th>
Unit
</th>
<td>
connections
</td>
</tr>
</tbody>
</table>
</div>
<p>
For SASL LDAP authentication, the maximum size of the pool
of connections to the LDAP server. To disable connection
pooling, set this variable to 0.
</p>
<p>
This variable is used in conjunction with
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_init_pool_size">
<code class="literal">
authentication_ldap_sasl_init_pool_size
</code>
</a>
.
See the description of that variable.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_authentication_ldap_sasl_referral">
</a>
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_referral">
<code class="literal">
authentication_ldap_sasl_referral
</code>
</a>
</p>
<a class="indexterm" name="idm46045242970048">
</a>
<a class="indexterm" name="idm46045242969008">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for authentication_ldap_sasl_referral">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--authentication-ldap-sasl-referral[={OFF|ON}]
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_referral">
authentication_ldap_sasl_referral
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
OFF
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
For SASL LDAP authentication, whether to enable LDAP search
referral. See
<a class="xref" href="ldap-pluggable-authentication.html#ldap-pluggable-authentication-ldap-referral" title="LDAP Search Referral">
LDAP Search Referral
</a>
.
</p>
<p>
This variable can be set to override the default OpenLDAP
referral configuration; see
<a class="xref" href="ldap-pluggable-authentication.html#ldap-pluggable-authentication-ldap-conf" title="LDAP Pluggable Authentication and ldap.conf">
LDAP Pluggable Authentication and ldap.conf
</a>
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_authentication_ldap_sasl_response_timeout">
</a>
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_response_timeout">
<code class="literal">
authentication_ldap_sasl_response_timeout
</code>
</a>
</p>
<a class="indexterm" name="idm46045242942272">
</a>
<a class="indexterm" name="idm46045242941152">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for authentication_ldap_sasl_response_timeout">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--authentication-ldap-sasl-response-timeout=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_response_timeout">
authentication_ldap_sasl_response_timeout
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
30
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
31536000
</code>
</td>
</tr>
<tr>
<th>
Unit
</th>
<td>
seconds
</td>
</tr>
</tbody>
</table>
</div>
<p>
Specifies the time (in seconds) that MySQL server waits for
the LDAP server to response to an LDAP bind request.
</p>
<p>
When a MySQL account authenticates using LDAP, MySQL server
sends an LDAP bind request to the LDAP server. If the LDAP
server does not respond to the request after a configured
amount of time, MySQL abandons the request and emits an
error message. If the timeout setting is zero, MySQL server
ignores this system variable setting. For more information,
see
<a class="xref" href="ldap-pluggable-authentication.html#ldap-pluggable-authentication-timeouts" title="Setting Timeouts for LDAP Pluggable Authentication">
Setting Timeouts for LDAP Pluggable Authentication
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_authentication_ldap_sasl_server_host">
</a>
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_server_host">
<code class="literal">
authentication_ldap_sasl_server_host
</code>
</a>
</p>
<a class="indexterm" name="idm46045242907760">
</a>
<a class="indexterm" name="idm46045242906720">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for authentication_ldap_sasl_server_host">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--authentication-ldap-sasl-server-host=host_name
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_server_host">
authentication_ldap_sasl_server_host
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<p>
For SASL LDAP authentication, the LDAP server host. The
permitted values for this variable depend on the
authentication method:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
For
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_auth_method_name">
<code class="literal">
authentication_ldap_sasl_auth_method_name=SCRAM-SHA-1
</code>
</a>
:
The LDAP server host can be a host name or IP address.
</p>
</li>
<li class="listitem">
<p>
For
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_auth_method_name">
<code class="literal">
authentication_ldap_sasl_auth_method_name=SCRAM-SHA-256
</code>
</a>
:
The LDAP server host can be a host name or IP address.
</p>
</li>
</ul>
</div>
</li>
<li class="listitem">
<p>
<a name="sysvar_authentication_ldap_sasl_server_port">
</a>
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_server_port">
<code class="literal">
authentication_ldap_sasl_server_port
</code>
</a>
</p>
<a class="indexterm" name="idm46045242879488">
</a>
<a class="indexterm" name="idm46045242878448">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for authentication_ldap_sasl_server_port">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--authentication-ldap-sasl-server-port=port_num
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_server_port">
authentication_ldap_sasl_server_port
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
389
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
1
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
32376
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
For SASL LDAP authentication, the LDAP server TCP/IP port
number.
</p>
<p>
If the LDAP port number is configured as 636 or 3269, the
plugin uses LDAPS (LDAP over SSL) instead of LDAP. (LDAPS
differs from
<code class="literal">
startTLS
</code>
.)
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_authentication_ldap_sasl_tls">
</a>
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_tls">
<code class="literal">
authentication_ldap_sasl_tls
</code>
</a>
</p>
<a class="indexterm" name="idm46045242847552">
</a>
<a class="indexterm" name="idm46045242846448">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for authentication_ldap_sasl_tls">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--authentication-ldap-sasl-tls[={OFF|ON}]
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_tls">
authentication_ldap_sasl_tls
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
OFF
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
For SASL LDAP authentication, whether connections by the
plugin to the LDAP server are secure. If this variable is
enabled, the plugin uses TLS to connect securely to the LDAP
server. This variable can be set to override the default
OpenLDAP TLS configuration; see
<a class="xref" href="ldap-pluggable-authentication.html#ldap-pluggable-authentication-ldap-conf" title="LDAP Pluggable Authentication and ldap.conf">
LDAP Pluggable Authentication and ldap.conf
</a>
If
you enable this variable, you may also wish to set the
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_ca_path">
<code class="literal">
authentication_ldap_sasl_ca_path
</code>
</a>
variable.
</p>
<p>
MySQL LDAP plugins support the StartTLS method, which
initializes TLS on top of a plain LDAP connection.
</p>
<p>
LDAPS can be used by setting the
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_server_port">
<code class="literal">
authentication_ldap_sasl_server_port
</code>
</a>
system variable.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_authentication_ldap_sasl_user_search_attr">
</a>
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_user_search_attr">
<code class="literal">
authentication_ldap_sasl_user_search_attr
</code>
</a>
</p>
<a class="indexterm" name="idm46045242817040">
</a>
<a class="indexterm" name="idm46045242815920">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for authentication_ldap_sasl_user_search_attr">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--authentication-ldap-sasl-user-search-attr=value
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_user_search_attr">
authentication_ldap_sasl_user_search_attr
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
uid
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
For SASL LDAP authentication, the name of the attribute that
specifies user names in LDAP directory entries. If a user
distinguished name is not provided, the authentication
plugin searches for the name using this attribute. For
example, if the
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_user_search_attr">
<code class="literal">
authentication_ldap_sasl_user_search_attr
</code>
</a>
value is
<code class="literal">
uid
</code>
, a search for the user name
<code class="literal">
user1
</code>
finds entries with a
<code class="literal">
uid
</code>
value of
<code class="literal">
user1
</code>
.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_authentication_ldap_simple_auth_method_name">
</a>
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_auth_method_name">
<code class="literal">
authentication_ldap_simple_auth_method_name
</code>
</a>
</p>
<a class="indexterm" name="idm46045242786736">
</a>
<a class="indexterm" name="idm46045242785616">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for authentication_ldap_simple_auth_method_name">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--authentication-ldap-simple-auth-method-name=value
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_auth_method_name">
authentication_ldap_simple_auth_method_name
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
SIMPLE
</code>
</td>
</tr>
<tr>
<th>
Valid Values
</th>
<td>
<p class="valid-value">
<code class="literal">
SIMPLE
</code>
</p>
<p class="valid-value">
<code class="literal">
AD-FOREST
</code>
</p>
</td>
</tr>
</tbody>
</table>
</div>
<p>
For simple LDAP authentication, the authentication method
name. Communication between the authentication plugin and
the LDAP server occurs according to this authentication
method.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
For all simple LDAP authentication methods, it is
recommended to also set TLS parameters to require that
communication with the LDAP server take place over secure
connections.
</p>
</div>
<p>
These authentication method values are permitted:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
<code class="literal">
SIMPLE
</code>
: Use simple LDAP
authentication. This method uses either one or two LDAP
bind operations, depending on whether the MySQL account
names an LDAP user distinguished name. See the
description of
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_bind_root_dn">
<code class="literal">
authentication_ldap_simple_bind_root_dn
</code>
</a>
.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
AD-FOREST
</code>
: A variation on
<code class="literal">
SIMPLE
</code>
, such that authentication
searches all domains in the Active Directory forest,
performing an LDAP bind to each Active Directory domain
until the user is found in some domain.
</p>
</li>
</ul>
</div>
</li>
<li class="listitem">
<p>
<a name="sysvar_authentication_ldap_simple_bind_base_dn">
</a>
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_bind_base_dn">
<code class="literal">
authentication_ldap_simple_bind_base_dn
</code>
</a>
</p>
<a class="indexterm" name="idm46045242749360">
</a>
<a class="indexterm" name="idm46045242748320">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for authentication_ldap_simple_bind_base_dn">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--authentication-ldap-simple-bind-base-dn=value
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_bind_base_dn">
authentication_ldap_simple_bind_base_dn
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
NULL
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
For simple LDAP authentication, the base distinguished name
(DN). This variable can be used to limit the scope of
searches by anchoring them at a certain location (the
<span class="quote">
“
<span class="quote">
base
</span>
”
</span>
) within the search tree.
</p>
<p>
Suppose that members of one set of LDAP user entries each
have this form:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-ini"><div class="docs-select-all right" id="sa61943277"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-ini"><span class="token constant">uid</span><span class="token attr-value"><span class="token punctuation">=</span><em class="replaceable">user_name</em>,ou=People,dc=example,dc=com</span></code></pre>
</div>
<p>
And that members of another set of LDAP user entries each
have this form:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-ini"><div class="docs-select-all right" id="sa31753311"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-ini"><span class="token constant">uid</span><span class="token attr-value"><span class="token punctuation">=</span><em class="replaceable">user_name</em>,ou=Admin,dc=example,dc=com</span></code></pre>
</div>
<p>
Then searches work like this for different base DN values:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
If the base DN is
<code class="literal">
ou=People,dc=example,dc=com
</code>
: Searches
find user entries only in the first set.
</p>
</li>
<li class="listitem">
<p>
If the base DN is
<code class="literal">
ou=Admin,dc=example,dc=com
</code>
: Searches
find user entries only in the second set.
</p>
</li>
<li class="listitem">
<p>
If the base DN is
<code class="literal">
ou=dc=example,dc=com
</code>
: Searches find
user entries in the first or second set.
</p>
</li>
</ul>
</div>
<p>
In general, more specific base DN values result in faster
searches because they limit the search scope more.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_authentication_ldap_simple_bind_root_dn">
</a>
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_bind_root_dn">
<code class="literal">
authentication_ldap_simple_bind_root_dn
</code>
</a>
</p>
<a class="indexterm" name="idm46045242712768">
</a>
<a class="indexterm" name="idm46045242711728">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for authentication_ldap_simple_bind_root_dn">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--authentication-ldap-simple-bind-root-dn=value
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_bind_root_dn">
authentication_ldap_simple_bind_root_dn
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
NULL
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
For simple LDAP authentication, the root distinguished name
(DN). This variable is used in conjunction with
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_bind_root_pwd">
<code class="literal">
authentication_ldap_simple_bind_root_pwd
</code>
</a>
as the credentials for authenticating to the LDAP server for
the purpose of performing searches. Authentication uses
either one or two LDAP bind operations, depending on whether
the MySQL account names an LDAP user DN:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
If the account does not name a user DN:
<code class="literal">
authentication_ldap_simple
</code>
performs
an initial LDAP binding using
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_bind_root_dn">
<code class="literal">
authentication_ldap_simple_bind_root_dn
</code>
</a>
and
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_bind_root_pwd">
<code class="literal">
authentication_ldap_simple_bind_root_pwd
</code>
</a>
.
(These are both empty by default, so if they are not
set, the LDAP server must permit anonymous connections.)
The resulting bind LDAP handle is used to search for the
user DN, based on the client user name.
<code class="literal">
authentication_ldap_simple
</code>
performs a
second bind using the user DN and client-supplied
password.
</p>
</li>
<li class="listitem">
<p>
If the account does name a user DN: The first bind
operation is unnecessary in this case.
<code class="literal">
authentication_ldap_simple
</code>
performs a
single bind using the user DN and client-supplied
password. This is faster than if the MySQL account does
not specify an LDAP user DN.
</p>
</li>
</ul>
</div>
</li>
<li class="listitem">
<p>
<a name="sysvar_authentication_ldap_simple_bind_root_pwd">
</a>
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_bind_root_pwd">
<code class="literal">
authentication_ldap_simple_bind_root_pwd
</code>
</a>
</p>
<a class="indexterm" name="idm46045242677616">
</a>
<a class="indexterm" name="idm46045242676496">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for authentication_ldap_simple_bind_root_pwd">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--authentication-ldap-simple-bind-root-pwd=value
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_bind_root_pwd">
authentication_ldap_simple_bind_root_pwd
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
NULL
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
For simple LDAP authentication, the password for the root
distinguished name. This variable is used in conjunction
with
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_bind_root_dn">
<code class="literal">
authentication_ldap_simple_bind_root_dn
</code>
</a>
.
See the description of that variable.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_authentication_ldap_simple_ca_path">
</a>
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_ca_path">
<code class="literal">
authentication_ldap_simple_ca_path
</code>
</a>
</p>
<a class="indexterm" name="idm46045242650160">
</a>
<a class="indexterm" name="idm46045242649120">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for authentication_ldap_simple_ca_path">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--authentication-ldap-simple-ca-path=value
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_ca_path">
authentication_ldap_simple_ca_path
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
NULL
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
For simple LDAP authentication, the absolute path of the
certificate authority file. Specify this file if it is
desired that the authentication plugin perform verification
of the LDAP server certificate.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
In addition to setting the
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_ca_path">
<code class="literal">
authentication_ldap_simple_ca_path
</code>
</a>
variable to the file name, you must add the appropriate
certificate authority certificates to the file and enable
the
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_tls">
<code class="literal">
authentication_ldap_simple_tls
</code>
</a>
system variable. These variables can be set to override
the default OpenLDAP TLS configuration; see
<a class="xref" href="ldap-pluggable-authentication.html#ldap-pluggable-authentication-ldap-conf" title="LDAP Pluggable Authentication and ldap.conf">
LDAP Pluggable Authentication and ldap.conf
</a>
</p>
</div>
</li>
<li class="listitem">
<p>
<a name="sysvar_authentication_ldap_simple_connect_timeout">
</a>
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_connect_timeout">
<code class="literal">
authentication_ldap_simple_connect_timeout
</code>
</a>
</p>
<a class="indexterm" name="idm46045242619744">
</a>
<a class="indexterm" name="idm46045242618624">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for authentication_ldap_simple_connect_timeout">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--authentication-ldap-simple-connect-timeout=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_connect_timeout">
authentication_ldap_simple_connect_timeout
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
30
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
31536000
</code>
</td>
</tr>
<tr>
<th>
Unit
</th>
<td>
seconds
</td>
</tr>
</tbody>
</table>
</div>
<p>
Specifies the time (in seconds) that MySQL server waits to
connect to the LDAP server using TCP.
</p>
<p>
When a MySQL account authenticates using LDAP, MySQL server
attempts to establish a TCP connection with the LDAP server,
which it uses to send an LDAP bind request over the
connection. If the LDAP server does not respond to TCP
handshake after a configured amount of time, MySQL abandons
the TCP handshake attempt and emits an error message. If the
timeout setting is zero, MySQL server ignores this system
variable setting. For more information, see
<a class="xref" href="ldap-pluggable-authentication.html#ldap-pluggable-authentication-timeouts" title="Setting Timeouts for LDAP Pluggable Authentication">
Setting Timeouts for LDAP Pluggable Authentication
</a>
.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
If you set this variable to a timeout value that is
greater than the host system's default value, the
shorter system timeout is used.
</p>
</div>
</li>
<li class="listitem">
<p>
<a name="sysvar_authentication_ldap_simple_group_search_attr">
</a>
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_group_search_attr">
<code class="literal">
authentication_ldap_simple_group_search_attr
</code>
</a>
</p>
<a class="indexterm" name="idm46045242584208">
</a>
<a class="indexterm" name="idm46045242583088">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for authentication_ldap_simple_group_search_attr">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--authentication-ldap-simple-group-search-attr=value
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_group_search_attr">
authentication_ldap_simple_group_search_attr
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
cn
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
For simple LDAP authentication, the name of the attribute
that specifies group names in LDAP directory entries. If
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_group_search_attr">
<code class="literal">
authentication_ldap_simple_group_search_attr
</code>
</a>
has its default value of
<code class="literal">
cn
</code>
, searches
return the
<code class="literal">
cn
</code>
value as the group name.
For example, if an LDAP entry with a
<code class="literal">
uid
</code>
value of
<code class="literal">
user1
</code>
has a
<code class="literal">
cn
</code>
attribute of
<code class="literal">
mygroup
</code>
, searches for
<code class="literal">
user1
</code>
return
<code class="literal">
mygroup
</code>
as the group name.
</p>
<p>
If the group search attribute is
<code class="literal">
isMemberOf
</code>
, LDAP authentication directly
retrieves the user attribute
<code class="literal">
isMemberOf
</code>
value and assigns it as group information. If the group
search attribute is not
<code class="literal">
isMemberOf
</code>
, LDAP
authentication searches for all groups where the user is a
member. (The latter is the default behavior.) This behavior
is based on how LDAP group information can be stored two
ways: 1) A group entry can have an attribute named
<code class="literal">
memberUid
</code>
or
<code class="literal">
member
</code>
with a value that is a user name; 2) A user entry can have
an attribute named
<code class="literal">
isMemberOf
</code>
with values
that are group names.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_authentication_ldap_simple_group_search_filter">
</a>
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_group_search_filter">
<code class="literal">
authentication_ldap_simple_group_search_filter
</code>
</a>
</p>
<a class="indexterm" name="idm46045242545728">
</a>
<a class="indexterm" name="idm46045242544608">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for authentication_ldap_simple_group_search_filter">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--authentication-ldap-simple-group-search-filter=value
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_group_search_filter">
authentication_ldap_simple_group_search_filter
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
(|(&(objectClass=posixGroup)(memberUid=%s))(&(objectClass=group)(member=%s)))
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
For simple LDAP authentication, the custom group search
filter.
</p>
<p>
The search filter value can contain
<code class="literal">
{UA}
</code>
and
<code class="literal">
{UD}
</code>
notation to represent the user
name and the full user DN. For example,
<code class="literal">
{UA}
</code>
is replaced with a user name such as
<code class="literal">
"admin"
</code>
, whereas
<code class="literal">
{UD}
</code>
is replaced with a use full DN such as
<code class="literal">
"uid=admin,ou=People,dc=example,dc=com"
</code>
.
The following value is the default, which supports both
OpenLDAP and Active Directory:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-simple"><div class="docs-select-all right" id="sa14010286"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-simple"><span class="token punctuation">(</span><span class="token operator">|</span><span class="token punctuation">(</span><span class="token operator">&</span><span class="token punctuation">(</span>objectClass<span class="token operator">=</span>posixGroup<span class="token punctuation">)</span><span class="token punctuation">(</span>memberUid<span class="token operator">=</span><span class="token punctuation">{</span>UA<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">)</span>
<span class="token punctuation">(</span><span class="token operator">&</span><span class="token punctuation">(</span>objectClass<span class="token operator">=</span>group<span class="token punctuation">)</span><span class="token punctuation">(</span>member<span class="token operator">=</span><span class="token punctuation">{</span>UD<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">)</span></code></pre>
</div>
<p>
In some cases for the user scenario,
<code class="literal">
memberOf
</code>
is a simple user attribute that
holds no group information. For additional flexibility, an
optional
<code class="literal">
{GA}
</code>
prefix can be used with the
group search attribute. Any group attribute with a {GA}
prefix is treated as a user attribute having group names.
For example, with a value of
<code class="literal">
{GA}MemberOf
</code>
, if the group value is the
DN, the first attribute value from the group DN is returned
as the group name.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_authentication_ldap_simple_init_pool_size">
</a>
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_init_pool_size">
<code class="literal">
authentication_ldap_simple_init_pool_size
</code>
</a>
</p>
<a class="indexterm" name="idm46045242510480">
</a>
<a class="indexterm" name="idm46045242509360">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for authentication_ldap_simple_init_pool_size">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--authentication-ldap-simple-init-pool-size=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_init_pool_size">
authentication_ldap_simple_init_pool_size
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
10
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
32767
</code>
</td>
</tr>
<tr>
<th>
Unit
</th>
<td>
connections
</td>
</tr>
</tbody>
</table>
</div>
<p>
For simple LDAP authentication, the initial size of the pool
of connections to the LDAP server. Choose the value for this
variable based on the average number of concurrent
authentication requests to the LDAP server.
</p>
<p>
The plugin uses
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_init_pool_size">
<code class="literal">
authentication_ldap_simple_init_pool_size
</code>
</a>
and
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_max_pool_size">
<code class="literal">
authentication_ldap_simple_max_pool_size
</code>
</a>
together for connection-pool management:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
When the authentication plugin initializes, it creates
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_init_pool_size">
<code class="literal">
authentication_ldap_simple_init_pool_size
</code>
</a>
connections, unless
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_max_pool_size">
<code class="literal">
authentication_ldap_simple_max_pool_size=0
</code>
</a>
to disable pooling.
</p>
</li>
<li class="listitem">
<p>
If the plugin receives an authentication request when
there are no free connections in the current connection
pool, the plugin can create a new connection, up to the
maximum connection pool size given by
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_max_pool_size">
<code class="literal">
authentication_ldap_simple_max_pool_size
</code>
</a>
.
</p>
</li>
<li class="listitem">
<p>
If the plugin receives a request when the pool size is
already at its maximum and there are no free
connections, authentication fails.
</p>
</li>
<li class="listitem">
<p>
When the plugin unloads, it closes all pooled
connections.
</p>
</li>
</ul>
</div>
<p>
Changes to plugin system variable settings may have no
effect on connections already in the pool. For example,
modifying the LDAP server host, port, or TLS settings does
not affect existing connections. However, if the original
variable values were invalid and the connection pool could
not be initialized, the plugin attempts to reinitialize the
pool for the next LDAP request. In this case, the new system
variable values are used for the reinitialization attempt.
</p>
<p>
If
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_max_pool_size">
<code class="literal">
authentication_ldap_simple_max_pool_size=0
</code>
</a>
to disable pooling, each LDAP connection opened by the
plugin uses the values the system variables have at that
time.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_authentication_ldap_simple_log_status">
</a>
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_log_status">
<code class="literal">
authentication_ldap_simple_log_status
</code>
</a>
</p>
<a class="indexterm" name="idm46045242463088">
</a>
<a class="indexterm" name="idm46045242462048">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for authentication_ldap_simple_log_status">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--authentication-ldap-simple-log-status=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_log_status">
authentication_ldap_simple_log_status
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
1
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
1
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
6
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045242435424">
</a>
<p>
For simple LDAP authentication, the logging level for
messages written to the error log. The following table shows
the permitted level values and their meanings.
</p>
<div class="table">
<a name="idm46045242433328">
</a>
<p class="title">
<b>
Table 8.30 Log Levels for authentication_ldap_simple_log_status
</b>
</p>
<div class="table-contents">
<table summary="authentication_ldap_simple_log_status system variable option values and types of messages logged per value.">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<thead>
<tr>
<th>
Option Value
</th>
<th>
Types of Messages Logged
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<code class="literal">
1
</code>
</td>
<td>
No messages
</td>
</tr>
<tr>
<td>
<code class="literal">
2
</code>
</td>
<td>
Error messages
</td>
</tr>
<tr>
<td>
<code class="literal">
3
</code>
</td>
<td>
Error and warning messages
</td>
</tr>
<tr>
<td>
<code class="literal">
4
</code>
</td>
<td>
Error, warning, and information messages
</td>
</tr>
<tr>
<td>
<code class="literal">
5
</code>
</td>
<td>
Same as previous level plus debugging messages from MySQL
</td>
</tr>
<tr>
<td>
<code class="literal">
6
</code>
</td>
<td>
Same as previous level plus debugging messages from LDAP library
</td>
</tr>
</tbody>
</table>
</div>
</div>
<br class="table-break"/>
</li>
<li class="listitem">
<p>
<a name="sysvar_authentication_ldap_simple_max_pool_size">
</a>
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_max_pool_size">
<code class="literal">
authentication_ldap_simple_max_pool_size
</code>
</a>
</p>
<a class="indexterm" name="idm46045242409728">
</a>
<a class="indexterm" name="idm46045242408608">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for authentication_ldap_simple_max_pool_size">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--authentication-ldap-simple-max-pool-size=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_max_pool_size">
authentication_ldap_simple_max_pool_size
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
1000
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
32767
</code>
</td>
</tr>
<tr>
<th>
Unit
</th>
<td>
connections
</td>
</tr>
</tbody>
</table>
</div>
<p>
For simple LDAP authentication, the maximum size of the pool
of connections to the LDAP server. To disable connection
pooling, set this variable to 0.
</p>
<p>
This variable is used in conjunction with
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_init_pool_size">
<code class="literal">
authentication_ldap_simple_init_pool_size
</code>
</a>
.
See the description of that variable.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_authentication_ldap_simple_referral">
</a>
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_referral">
<code class="literal">
authentication_ldap_simple_referral
</code>
</a>
</p>
<a class="indexterm" name="idm46045242374864">
</a>
<a class="indexterm" name="idm46045242373824">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for authentication_ldap_simple_referral">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--authentication-ldap-simple-referral[={OFF|ON}]
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_referral">
authentication_ldap_simple_referral
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
OFF
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
For simple LDAP authentication, whether to enable LDAP
search referral. See
<a class="xref" href="ldap-pluggable-authentication.html#ldap-pluggable-authentication-ldap-referral" title="LDAP Search Referral">
LDAP Search Referral
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_authentication_ldap_simple_response_timeout">
</a>
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_response_timeout">
<code class="literal">
authentication_ldap_simple_response_timeout
</code>
</a>
</p>
<a class="indexterm" name="idm46045242348352">
</a>
<a class="indexterm" name="idm46045242347232">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for authentication_ldap_simple_response_timeout">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--authentication-ldap-simple-response-timeout=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_response_timeout">
authentication_ldap_simple_response_timeout
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
30
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
31536000
</code>
</td>
</tr>
<tr>
<th>
Unit
</th>
<td>
seconds
</td>
</tr>
</tbody>
</table>
</div>
<p>
Specifies the time (in seconds) that MySQL server waits for
the LDAP server to response to an LDAP bind request.
</p>
<p>
When a MySQL account authenticates using LDAP, MySQL server
sends an LDAP bind request to the LDAP server. If the LDAP
server does not respond to the request after a configured
amount of time, MySQL abandons the request and emits an
error message. If the timeout setting is zero, MySQL server
ignores this system variable setting. For more information,
see
<a class="xref" href="ldap-pluggable-authentication.html#ldap-pluggable-authentication-timeouts" title="Setting Timeouts for LDAP Pluggable Authentication">
Setting Timeouts for LDAP Pluggable Authentication
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_authentication_ldap_simple_server_host">
</a>
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_server_host">
<code class="literal">
authentication_ldap_simple_server_host
</code>
</a>
</p>
<a class="indexterm" name="idm46045242313904">
</a>
<a class="indexterm" name="idm46045242312864">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for authentication_ldap_simple_server_host">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--authentication-ldap-simple-server-host=host_name
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_server_host">
authentication_ldap_simple_server_host
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<p>
For simple LDAP authentication, the LDAP server host. The
permitted values for this variable depend on the
authentication method:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
For
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_auth_method_name">
<code class="literal">
authentication_ldap_simple_auth_method_name=SIMPLE
</code>
</a>
:
The LDAP server host can be a host name or IP address.
</p>
</li>
<li class="listitem">
<p>
For
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_auth_method_name">
<code class="literal">
authentication_ldap_simple_auth_method_name=AD-FOREST
</code>
</a>
.
The LDAP server host can be an Active Directory domain
name. For example, for an LDAP server URL of
<code class="literal">
ldap://example.mem.local:389
</code>
, the
domain name can be
<code class="literal">
mem.local
</code>
.
</p>
<a class="indexterm" name="idm46045242286880">
</a>
<p>
An Active Directory forest setup can have multiple
domains (LDAP server IPs), which can be discovered using
DNS. On Unix and Unix-like systems, some additional
setup may be required to configure your DNS server with
SRV records that specify the LDAP servers for the Active
Directory domain. For information about DNS SRV, see
<a class="ulink" href="https://tools.ietf.org/html/rfc2782" target="_blank">
RFC
2782
</a>
.
</p>
<p>
Suppose that your configuration has these properties:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: square; ">
<li class="listitem">
<p>
The name server that provides information about
Active Directory domains has IP address
<code class="literal">
10.172.166.100
</code>
.
</p>
</li>
<li class="listitem">
<p>
The LDAP servers have names
<code class="literal">
ldap1.mem.local
</code>
through
<code class="literal">
ldap3.mem.local
</code>
and IP addresses
<code class="literal">
10.172.166.101
</code>
through
<code class="literal">
10.172.166.103
</code>
.
</p>
</li>
</ul>
</div>
<p>
You want the LDAP servers to be discoverable using SRV
searches. For example, at the command line, a command
like this should list the LDAP servers:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa24917118"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">host <span class="token property">-t</span> SRV _ldap<span class="token punctuation">.</span>_tcp<span class="token punctuation">.</span>mem<span class="token punctuation">.</span>local</code></pre>
</div>
<p>
Perform the DNS configuration as follows:
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1">
<li class="listitem">
<p>
Add a line to
<code class="filename">
/etc/resolv.conf
</code>
to specify the name server that provides information
about Active Directory domains:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-none"><div class="docs-select-all right" id="sa361766"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-none">nameserver 10.172.166.100</code></pre>
</div>
</li>
<li class="listitem">
<p>
Configure the appropriate zone file for the name
server with SRV records for the LDAP servers:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-none"><div class="docs-select-all right" id="sa91738044"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-none">_ldap._tcp.mem.local. 86400 IN SRV 0 100 389 ldap1.mem.local.
_ldap._tcp.mem.local. 86400 IN SRV 0 100 389 ldap2.mem.local.
_ldap._tcp.mem.local. 86400 IN SRV 0 100 389 ldap3.mem.local.</code></pre>
</div>
</li>
<li class="listitem">
<p>
It may also be necessary to specify the IP address
for the LDAP servers in
<code class="filename">
/etc/hosts
</code>
if the server host
cannot be resolved. For example, add lines like this
to the file:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-none"><div class="docs-select-all right" id="sa5163526"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-none">10.172.166.101 ldap1.mem.local
10.172.166.102 ldap2.mem.local
10.172.166.103 ldap3.mem.local</code></pre>
</div>
</li>
</ol>
</div>
<p>
With the DNS configured as just described, the
server-side LDAP plugin can discover the LDAP servers
and tries to authenticate in all domains until
authentication succeeds or there are no more servers.
</p>
<p>
Windows needs no such settings as just described. Given
the LDAP server host in the
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_server_host">
<code class="literal">
authentication_ldap_simple_server_host
</code>
</a>
value, the Windows LDAP library searches all domains and
attempts to authenticate.
</p>
</li>
</ul>
</div>
</li>
<li class="listitem">
<p>
<a name="sysvar_authentication_ldap_simple_server_port">
</a>
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_server_port">
<code class="literal">
authentication_ldap_simple_server_port
</code>
</a>
</p>
<a class="indexterm" name="idm46045242261904">
</a>
<a class="indexterm" name="idm46045242260864">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for authentication_ldap_simple_server_port">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--authentication-ldap-simple-server-port=port_num
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_server_port">
authentication_ldap_simple_server_port
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
389
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
1
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
32376
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
For simple LDAP authentication, the LDAP server TCP/IP port
number.
</p>
<p>
If the LDAP port number is configured as 636 or 3269, the
plugin uses LDAPS (LDAP over SSL) instead of LDAP. (LDAPS
differs from
<code class="literal">
startTLS
</code>
.)
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_authentication_ldap_simple_tls">
</a>
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_tls">
<code class="literal">
authentication_ldap_simple_tls
</code>
</a>
</p>
<a class="indexterm" name="idm46045242230080">
</a>
<a class="indexterm" name="idm46045242228976">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for authentication_ldap_simple_tls">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--authentication-ldap-simple-tls[={OFF|ON}]
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_tls">
authentication_ldap_simple_tls
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
OFF
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
For simple LDAP authentication, whether connections by the
plugin to the LDAP server are secure. If this variable is
enabled, the plugin uses TLS to connect securely to the LDAP
server. This variable can be set to override the default
OpenLDAP TLS configuration; see
<a class="xref" href="ldap-pluggable-authentication.html#ldap-pluggable-authentication-ldap-conf" title="LDAP Pluggable Authentication and ldap.conf">
LDAP Pluggable Authentication and ldap.conf
</a>
If
you enable this variable, you may also wish to set the
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_ca_path">
<code class="literal">
authentication_ldap_simple_ca_path
</code>
</a>
variable.
</p>
<p>
MySQL LDAP plugins support the StartTLS method, which
initializes TLS on top of a plain LDAP connection.
</p>
<p>
LDAPS can be used by setting the
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_server_port">
<code class="literal">
authentication_ldap_simple_server_port
</code>
</a>
system variable.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_authentication_ldap_simple_user_search_attr">
</a>
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_user_search_attr">
<code class="literal">
authentication_ldap_simple_user_search_attr
</code>
</a>
</p>
<a class="indexterm" name="idm46045242199536">
</a>
<a class="indexterm" name="idm46045242198416">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for authentication_ldap_simple_user_search_attr">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--authentication-ldap-simple-user-search-attr=value
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_user_search_attr">
authentication_ldap_simple_user_search_attr
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
uid
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
For simple LDAP authentication, the name of the attribute
that specifies user names in LDAP directory entries. If a
user distinguished name is not provided, the authentication
plugin searches for the name using this attribute. For
example, if the
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_user_search_attr">
<code class="literal">
authentication_ldap_simple_user_search_attr
</code>
</a>
value is
<code class="literal">
uid
</code>
, a search for the user name
<code class="literal">
user1
</code>
finds entries with a
<code class="literal">
uid
</code>
value of
<code class="literal">
user1
</code>
.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_authentication_webauthn_rp_id">
</a>
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_webauthn_rp_id">
<code class="literal">
authentication_webauthn_rp_id
</code>
</a>
</p>
<a class="indexterm" name="idm46045242169248">
</a>
<a class="indexterm" name="idm46045242168144">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for authentication_webauthn_rp_id">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--authentication-webauthn-rp-id=value
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_webauthn_rp_id">
authentication_webauthn_rp_id
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<p>
This variable specifies the relying party ID used for
server-side plugin installation, device registration, and
WebAuthn authentication. If WebAuthn authentication is
attempted and this value is not the one expected by the
device, the device assumes that it is not talking to the
correct server and an error occurs. The maximum value length
is 255 characters.
</p>
</li>
</ul>
</div>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/server-system-variable-reference.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a name="server-system-variable-reference">
</a>
7.1.5 Server System Variable Reference
</h3>
</div>
</div>
</div>
<p>
The following table lists all system variables applicable within
<code class="literal">
mysqld
</code>
.
</p>
<p>
The table lists command-line options (Cmd-line), options valid in
configuration files (Option file), server system variables (System
Var), and status variables (Status var) in one unified list, with
an indication of where each option or variable is valid. If a
server option set on the command line or in an option file differs
from the name of the corresponding system variable, the variable
name is noted immediately below the corresponding option. The
scope of the variable (Var Scope) is Global, Session, or both.
Please see the corresponding item descriptions for details on
setting and using the variables. Where appropriate, direct links
to further information about the items are provided.
</p>
<div class="table">
<a name="idm46045289503024">
</a>
<p class="title">
<b>
Table 7.2 System Variable Summary
</b>
</p>
<div class="table-contents">
<table frame="box" rules="all" summary="Reference for mysqld system variables.">
<colgroup>
<col style="width: 20%"/>
<col style="width: 15%"/>
<col style="width: 15%"/>
<col style="width: 15%"/>
<col style="width: 15%"/>
<col style="width: 15%"/>
</colgroup>
<thead>
<tr>
<th scope="col">
Name
</th>
<th scope="col">
Cmd-Line
</th>
<th scope="col">
Option File
</th>
<th scope="col">
System Var
</th>
<th scope="col">
Var Scope
</th>
<th scope="col">
Dynamic
</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_activate_all_roles_on_login">
activate_all_roles_on_login
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_admin_address">
admin_address
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_admin_port">
admin_port
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_admin_ssl_ca">
admin_ssl_ca
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_admin_ssl_capath">
admin_ssl_capath
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_admin_ssl_cert">
admin_ssl_cert
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_admin_ssl_cipher">
admin_ssl_cipher
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_admin_ssl_crl">
admin_ssl_crl
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_admin_ssl_crlpath">
admin_ssl_crlpath
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_admin_ssl_key">
admin_ssl_key
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_admin_tls_ciphersuites">
admin_tls_ciphersuites
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_admin_tls_version">
admin_tls_version
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_buffer_size">
audit_log_buffer_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_compression">
audit_log_compression
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_connection_policy">
audit_log_connection_policy
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_current_session">
audit_log_current_session
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_database">
audit_log_database
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_disable">
audit_log_disable
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_encryption">
audit_log_encryption
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_exclude_accounts">
audit_log_exclude_accounts
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_file">
audit_log_file
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_filter_id">
audit_log_filter_id
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_flush">
audit_log_flush
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_flush_interval_seconds">
audit_log_flush_interval_seconds
</a>
</th>
<td>
Yes
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_format">
audit_log_format
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_format_unix_timestamp">
audit_log_format_unix_timestamp
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_include_accounts">
audit_log_include_accounts
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_max_size">
audit_log_max_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_password_history_keep_days">
audit_log_password_history_keep_days
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_policy">
audit_log_policy
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_prune_seconds">
audit_log_prune_seconds
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_read_buffer_size">
audit_log_read_buffer_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_rotate_on_size">
audit_log_rotate_on_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_statement_policy">
audit_log_statement_policy
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_strategy">
audit_log_strategy
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_kerberos_service_key_tab">
authentication_kerberos_service_key_tab
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_kerberos_service_principal">
authentication_kerberos_service_principal
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_auth_method_name">
authentication_ldap_sasl_auth_method_name
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_bind_base_dn">
authentication_ldap_sasl_bind_base_dn
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_bind_root_dn">
authentication_ldap_sasl_bind_root_dn
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_bind_root_pwd">
authentication_ldap_sasl_bind_root_pwd
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_ca_path">
authentication_ldap_sasl_ca_path
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_connect_timeout">
authentication_ldap_sasl_connect_timeout
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_group_search_attr">
authentication_ldap_sasl_group_search_attr
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_group_search_filter">
authentication_ldap_sasl_group_search_filter
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_init_pool_size">
authentication_ldap_sasl_init_pool_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_log_status">
authentication_ldap_sasl_log_status
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_max_pool_size">
authentication_ldap_sasl_max_pool_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_referral">
authentication_ldap_sasl_referral
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_response_timeout">
authentication_ldap_sasl_response_timeout
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_server_host">
authentication_ldap_sasl_server_host
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_server_port">
authentication_ldap_sasl_server_port
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_tls">
authentication_ldap_sasl_tls
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_sasl_user_search_attr">
authentication_ldap_sasl_user_search_attr
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_auth_method_name">
authentication_ldap_simple_auth_method_name
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_bind_base_dn">
authentication_ldap_simple_bind_base_dn
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_bind_root_dn">
authentication_ldap_simple_bind_root_dn
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_bind_root_pwd">
authentication_ldap_simple_bind_root_pwd
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_ca_path">
authentication_ldap_simple_ca_path
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_connect_timeout">
authentication_ldap_simple_connect_timeout
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_group_search_attr">
authentication_ldap_simple_group_search_attr
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_group_search_filter">
authentication_ldap_simple_group_search_filter
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_init_pool_size">
authentication_ldap_simple_init_pool_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_log_status">
authentication_ldap_simple_log_status
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_max_pool_size">
authentication_ldap_simple_max_pool_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_referral">
authentication_ldap_simple_referral
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_response_timeout">
authentication_ldap_simple_response_timeout
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_server_host">
authentication_ldap_simple_server_host
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_server_port">
authentication_ldap_simple_server_port
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_tls">
authentication_ldap_simple_tls
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_ldap_simple_user_search_attr">
authentication_ldap_simple_user_search_attr
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_authentication_policy">
authentication_policy
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="pluggable-authentication-system-variables.html#sysvar_authentication_webauthn_rp_id">
authentication_webauthn_rp_id
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_authentication_windows_log_level">
authentication_windows_log_level
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_authentication_windows_use_principal_name">
authentication_windows_use_principal_name
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_auto_generate_certs">
auto_generate_certs
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-source.html#sysvar_auto_increment_increment">
auto_increment_increment
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-source.html#sysvar_auto_increment_offset">
auto_increment_offset
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_autocommit">
autocommit
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_automatic_sp_privileges">
automatic_sp_privileges
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_back_log">
back_log
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_basedir">
basedir
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_big_tables">
big_tables
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_bind_address">
bind_address
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-binary-log.html#sysvar_binlog_cache_size">
binlog_cache_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-binary-log.html#sysvar_binlog_checksum">
binlog_checksum
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-binary-log.html#sysvar_binlog_direct_non_transactional_updates">
binlog_direct_non_transactional_updates
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-binary-log.html#sysvar_binlog_encryption">
binlog_encryption
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-binary-log.html#sysvar_binlog_error_action">
binlog_error_action
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-binary-log.html#sysvar_binlog_expire_logs_auto_purge">
binlog_expire_logs_auto_purge
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-binary-log.html#sysvar_binlog_expire_logs_seconds">
binlog_expire_logs_seconds
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-binary-log.html#sysvar_binlog_format">
binlog_format
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-binary-log.html#sysvar_binlog_group_commit_sync_delay">
binlog_group_commit_sync_delay
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-binary-log.html#sysvar_binlog_group_commit_sync_no_delay_count">
binlog_group_commit_sync_no_delay_count
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-gtids.html#sysvar_binlog_gtid_simple_recovery">
binlog_gtid_simple_recovery
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-binary-log.html#sysvar_binlog_max_flush_queue_time">
binlog_max_flush_queue_time
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-binary-log.html#sysvar_binlog_order_commits">
binlog_order_commits
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-binary-log.html#sysvar_binlog_rotate_encryption_master_key_at_startup">
binlog_rotate_encryption_master_key_at_startup
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-binary-log.html#option_mysqld_binlog-row-event-max-size">
binlog_row_event_max_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-binary-log.html#sysvar_binlog_row_image">
binlog_row_image
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-binary-log.html#sysvar_binlog_row_metadata">
binlog_row_metadata
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-binary-log.html#sysvar_binlog_row_value_options">
binlog_row_value_options
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-binary-log.html#sysvar_binlog_rows_query_log_events">
binlog_rows_query_log_events
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-binary-log.html#sysvar_binlog_stmt_cache_size">
binlog_stmt_cache_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-binary-log.html#sysvar_binlog_transaction_compression">
binlog_transaction_compression
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-binary-log.html#sysvar_binlog_transaction_compression_level_zstd">
binlog_transaction_compression_level_zstd
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-binary-log.html#sysvar_binlog_transaction_dependency_history_size">
binlog_transaction_dependency_history_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_block_encryption_mode">
block_encryption_mode
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_build_id">
build_id
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_bulk_insert_buffer_size">
bulk_insert_buffer_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_caching_sha2_password_auto_generate_rsa_keys">
caching_sha2_password_auto_generate_rsa_keys
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_caching_sha2_password_digest_rounds">
caching_sha2_password_digest_rounds
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_caching_sha2_password_private_key_path">
caching_sha2_password_private_key_path
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_caching_sha2_password_public_key_path">
caching_sha2_password_public_key_path
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_character_set_client">
character_set_client
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_character_set_connection">
character_set_connection
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_character_set_database">
character_set_database
</a>
(note 1)
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_character_set_filesystem">
character_set_filesystem
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_character_set_results">
character_set_results
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_character_set_server">
character_set_server
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_character_set_system">
character_set_system
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_character_sets_dir">
character_sets_dir
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_check_proxy_users">
check_proxy_users
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="clone-plugin-options-variables.html#sysvar_clone_autotune_concurrency">
clone_autotune_concurrency
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="clone-plugin-options-variables.html#sysvar_clone_block_ddl">
clone_block_ddl
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="clone-plugin-options-variables.html#sysvar_clone_buffer_size">
clone_buffer_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="clone-plugin-options-variables.html#sysvar_clone_ddl_timeout">
clone_ddl_timeout
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="clone-plugin-options-variables.html#sysvar_clone_delay_after_data_drop">
clone_delay_after_data_drop
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="clone-plugin-options-variables.html#sysvar_clone_donor_timeout_after_network_failure">
clone_donor_timeout_after_network_failure
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="clone-plugin-options-variables.html#sysvar_clone_enable_compression">
clone_enable_compression
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="clone-plugin-options-variables.html#sysvar_clone_max_concurrency">
clone_max_concurrency
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="clone-plugin-options-variables.html#sysvar_clone_max_data_bandwidth">
clone_max_data_bandwidth
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="clone-plugin-options-variables.html#sysvar_clone_max_network_bandwidth">
clone_max_network_bandwidth
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="clone-plugin-options-variables.html#sysvar_clone_ssl_ca">
clone_ssl_ca
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="clone-plugin-options-variables.html#sysvar_clone_ssl_cert">
clone_ssl_cert
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="clone-plugin-options-variables.html#sysvar_clone_ssl_key">
clone_ssl_key
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="clone-plugin-options-variables.html#sysvar_clone_valid_donor_list">
clone_valid_donor_list
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_collation_connection">
collation_connection
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_collation_database">
collation_database
</a>
(note 1)
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_collation_server">
collation_server
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_completion_type">
completion_type
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="data-masking-component-variables.html#sysvar_component_masking.dictionaries_flush_interval_seconds">
component_masking.dictionaries_flush_interval_seconds
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="data-masking-component-variables.html#sysvar_component_masking.masking_database">
component_masking.masking_database
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_component_scheduler.enabled">
component_scheduler.enabled
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_concurrent_insert">
concurrent_insert
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_connect_timeout">
connect_timeout
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="connection-control-variables.html#sysvar_connection_control_failed_connections_threshold">
connection_control_failed_connections_threshold
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="connection-control-variables.html#sysvar_connection_control_max_connection_delay">
connection_control_max_connection_delay
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="connection-control-variables.html#sysvar_connection_control_min_connection_delay">
connection_control_min_connection_delay
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_connection_memory_chunk_size">
connection_memory_chunk_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_connection_memory_limit">
connection_memory_limit
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_core_file">
core_file
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_create_admin_listener_thread">
create_admin_listener_thread
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_cte_max_recursion_depth">
cte_max_recursion_depth
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_datadir">
datadir
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-options.html#option_mysqld_debug">
debug
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_debug_sync">
debug_sync
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Session
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_default_collation_for_utf8mb4">
default_collation_for_utf8mb4
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_default_password_lifetime">
default_password_lifetime
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_default_storage_engine">
default_storage_engine
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_default_table_encryption">
default_table_encryption
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_default_tmp_storage_engine">
default_tmp_storage_engine
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_default_week_format">
default_week_format
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_delay_key_write">
delay_key_write
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_delayed_insert_limit">
delayed_insert_limit
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_delayed_insert_timeout">
delayed_insert_timeout
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_delayed_queue_size">
delayed_queue_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_disabled_storage_engines">
disabled_storage_engines
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_disconnect_on_expired_password">
disconnect_on_expired_password
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_div_precision_increment">
div_precision_increment
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_dragnet.log_error_filter_rules">
dragnet.log_error_filter_rules
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_end_markers_in_json">
end_markers_in_json
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-gtids.html#sysvar_enforce_gtid_consistency">
enforce_gtid_consistency
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_enterprise_encryption.maximum_rsa_key_size">
enterprise_encryption.maximum_rsa_key_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_enterprise_encryption.rsa_support_legacy_padding">
enterprise_encryption.rsa_support_legacy_padding
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_eq_range_index_dive_limit">
eq_range_index_dive_limit
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_error_count">
error_count
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Session
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_event_scheduler">
event_scheduler
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_explain_format">
explain_format
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_explain_json_format_version">
explain_json_format_version
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_explicit_defaults_for_timestamp">
explicit_defaults_for_timestamp
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_external_user">
external_user
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Session
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_flush">
flush
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_flush_time">
flush_time
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_foreign_key_checks">
foreign_key_checks
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_ft_boolean_syntax">
ft_boolean_syntax
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_ft_max_word_len">
ft_max_word_len
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_ft_min_word_len">
ft_min_word_len
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_ft_query_expansion_limit">
ft_query_expansion_limit
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_ft_stopword_file">
ft_stopword_file
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_general_log">
general_log
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_general_log_file">
general_log_file
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_generated_random_password_length">
generated_random_password_length
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_global_connection_memory_limit">
global_connection_memory_limit
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_global_connection_memory_tracking">
global_connection_memory_tracking
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_group_concat_max_len">
group_concat_max_len
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_advertise_recovery_endpoints">
group_replication_advertise_recovery_endpoints
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_allow_local_lower_version_join">
group_replication_allow_local_lower_version_join
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_auto_increment_increment">
group_replication_auto_increment_increment
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_autorejoin_tries">
group_replication_autorejoin_tries
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_bootstrap_group">
group_replication_bootstrap_group
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_clone_threshold">
group_replication_clone_threshold
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_communication_debug_options">
group_replication_communication_debug_options
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_communication_max_message_size">
group_replication_communication_max_message_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_communication_stack">
group_replication_communication_stack
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_components_stop_timeout">
group_replication_components_stop_timeout
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_compression_threshold">
group_replication_compression_threshold
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_consistency">
group_replication_consistency
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_enforce_update_everywhere_checks">
group_replication_enforce_update_everywhere_checks
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_exit_state_action">
group_replication_exit_state_action
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_flow_control_applier_threshold">
group_replication_flow_control_applier_threshold
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_flow_control_certifier_threshold">
group_replication_flow_control_certifier_threshold
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_flow_control_hold_percent">
group_replication_flow_control_hold_percent
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_flow_control_max_quota">
group_replication_flow_control_max_quota
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_flow_control_member_quota_percent">
group_replication_flow_control_member_quota_percent
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_flow_control_min_quota">
group_replication_flow_control_min_quota
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_flow_control_min_recovery_quota">
group_replication_flow_control_min_recovery_quota
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_flow_control_mode">
group_replication_flow_control_mode
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_flow_control_period">
group_replication_flow_control_period
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_flow_control_release_percent">
group_replication_flow_control_release_percent
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_force_members">
group_replication_force_members
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_group_name">
group_replication_group_name
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_group_seeds">
group_replication_group_seeds
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_gtid_assignment_block_size">
group_replication_gtid_assignment_block_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_ip_allowlist">
group_replication_ip_allowlist
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_local_address">
group_replication_local_address
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_member_expel_timeout">
group_replication_member_expel_timeout
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_member_weight">
group_replication_member_weight
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_message_cache_size">
group_replication_message_cache_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_paxos_single_leader">
group_replication_paxos_single_leader
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_poll_spin_loops">
group_replication_poll_spin_loops
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_preemptive_garbage_collection">
group_replication_preemptive_garbage_collection
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_preemptive_garbage_collection_rows_threshold">
group_replication_preemptive_garbage_collection_rows_threshold
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_compression_algorithms">
group_replication_recovery_compression_algorithms
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_get_public_key">
group_replication_recovery_get_public_key
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_public_key_path">
group_replication_recovery_public_key_path
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_reconnect_interval">
group_replication_recovery_reconnect_interval
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_retry_count">
group_replication_recovery_retry_count
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_ssl_ca">
group_replication_recovery_ssl_ca
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_ssl_capath">
group_replication_recovery_ssl_capath
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_ssl_cert">
group_replication_recovery_ssl_cert
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_ssl_cipher">
group_replication_recovery_ssl_cipher
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_ssl_crl">
group_replication_recovery_ssl_crl
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_ssl_crlpath">
group_replication_recovery_ssl_crlpath
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_ssl_key">
group_replication_recovery_ssl_key
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_ssl_verify_server_cert">
group_replication_recovery_ssl_verify_server_cert
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_tls_ciphersuites">
group_replication_recovery_tls_ciphersuites
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_tls_version">
group_replication_recovery_tls_version
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_use_ssl">
group_replication_recovery_use_ssl
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_zstd_compression_level">
group_replication_recovery_zstd_compression_level
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_single_primary_mode">
group_replication_single_primary_mode
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_ssl_mode">
group_replication_ssl_mode
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_start_on_boot">
group_replication_start_on_boot
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_tls_source">
group_replication_tls_source
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_transaction_size_limit">
group_replication_transaction_size_limit
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_unreachable_majority_timeout">
group_replication_unreachable_majority_timeout
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_view_change_uuid">
group_replication_view_change_uuid
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-gtids.html#sysvar_gtid_executed">
gtid_executed
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-gtids.html#sysvar_gtid_executed_compression_period">
gtid_executed_compression_period
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-gtids.html#sysvar_gtid_mode">
gtid_mode
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-gtids.html#sysvar_gtid_next">
gtid_next
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Session
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-gtids.html#sysvar_gtid_owned">
gtid_owned
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-gtids.html#sysvar_gtid_purged">
gtid_purged
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_have_compress">
have_compress
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_have_dynamic_loading">
have_dynamic_loading
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_have_geometry">
have_geometry
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_have_profiling">
have_profiling
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_have_query_cache">
have_query_cache
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_have_rtree_keys">
have_rtree_keys
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_have_statement_timeout">
have_statement_timeout
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_have_symlink">
have_symlink
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_histogram_generation_max_mem_size">
histogram_generation_max_mem_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_host_cache_size">
host_cache_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_hostname">
hostname
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_identity">
identity
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Session
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-source.html#sysvar_immediate_server_version">
immediate_server_version
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Session
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_information_schema_stats_expiry">
information_schema_stats_expiry
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_init_connect">
init_connect
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_init_file">
init_file
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_init_replica">
init_replica
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_init_slave">
init_slave
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_adaptive_flushing">
innodb_adaptive_flushing
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_adaptive_flushing_lwm">
innodb_adaptive_flushing_lwm
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_adaptive_hash_index">
innodb_adaptive_hash_index
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_adaptive_hash_index_parts">
innodb_adaptive_hash_index_parts
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_adaptive_max_sleep_delay">
innodb_adaptive_max_sleep_delay
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_autoextend_increment">
innodb_autoextend_increment
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_autoinc_lock_mode">
innodb_autoinc_lock_mode
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_background_drop_list_empty">
innodb_background_drop_list_empty
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_buffer_pool_chunk_size">
innodb_buffer_pool_chunk_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_buffer_pool_debug">
innodb_buffer_pool_debug
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_buffer_pool_dump_at_shutdown">
innodb_buffer_pool_dump_at_shutdown
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_buffer_pool_dump_now">
innodb_buffer_pool_dump_now
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_buffer_pool_dump_pct">
innodb_buffer_pool_dump_pct
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_buffer_pool_filename">
innodb_buffer_pool_filename
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_buffer_pool_in_core_file">
innodb_buffer_pool_in_core_file
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_buffer_pool_instances">
innodb_buffer_pool_instances
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_buffer_pool_load_abort">
innodb_buffer_pool_load_abort
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_buffer_pool_load_at_startup">
innodb_buffer_pool_load_at_startup
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_buffer_pool_load_now">
innodb_buffer_pool_load_now
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_buffer_pool_size">
innodb_buffer_pool_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_change_buffer_max_size">
innodb_change_buffer_max_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_change_buffering">
innodb_change_buffering
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_change_buffering_debug">
innodb_change_buffering_debug
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_checkpoint_disabled">
innodb_checkpoint_disabled
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_checksum_algorithm">
innodb_checksum_algorithm
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_cmp_per_index_enabled">
innodb_cmp_per_index_enabled
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_commit_concurrency">
innodb_commit_concurrency
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_compress_debug">
innodb_compress_debug
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_compression_failure_threshold_pct">
innodb_compression_failure_threshold_pct
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_compression_level">
innodb_compression_level
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_compression_pad_pct_max">
innodb_compression_pad_pct_max
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_concurrency_tickets">
innodb_concurrency_tickets
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_data_file_path">
innodb_data_file_path
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_data_home_dir">
innodb_data_home_dir
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_ddl_buffer_size">
innodb_ddl_buffer_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Session
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_ddl_log_crash_reset_debug">
innodb_ddl_log_crash_reset_debug
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_ddl_threads">
innodb_ddl_threads
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Session
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_deadlock_detect">
innodb_deadlock_detect
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#option_mysqld_innodb-dedicated-server">
innodb_dedicated_server
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_default_row_format">
innodb_default_row_format
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_directories">
innodb_directories
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_disable_sort_file_cache">
innodb_disable_sort_file_cache
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_doublewrite">
innodb_doublewrite
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_doublewrite_batch_size">
innodb_doublewrite_batch_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_doublewrite_dir">
innodb_doublewrite_dir
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_doublewrite_files">
innodb_doublewrite_files
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_doublewrite_pages">
innodb_doublewrite_pages
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_extend_and_initialize">
innodb_extend_and_initialize
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_fast_shutdown">
innodb_fast_shutdown
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_fil_make_page_dirty_debug">
innodb_fil_make_page_dirty_debug
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_file_per_table">
innodb_file_per_table
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_fill_factor">
innodb_fill_factor
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_flush_log_at_timeout">
innodb_flush_log_at_timeout
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_flush_log_at_trx_commit">
innodb_flush_log_at_trx_commit
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_flush_method">
innodb_flush_method
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_flush_neighbors">
innodb_flush_neighbors
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_flush_sync">
innodb_flush_sync
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_flushing_avg_loops">
innodb_flushing_avg_loops
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_force_load_corrupted">
innodb_force_load_corrupted
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_force_recovery">
innodb_force_recovery
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_fsync_threshold">
innodb_fsync_threshold
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_ft_aux_table">
innodb_ft_aux_table
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_ft_cache_size">
innodb_ft_cache_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_ft_enable_diag_print">
innodb_ft_enable_diag_print
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_ft_enable_stopword">
innodb_ft_enable_stopword
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_ft_max_token_size">
innodb_ft_max_token_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_ft_min_token_size">
innodb_ft_min_token_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_ft_num_word_optimize">
innodb_ft_num_word_optimize
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_ft_result_cache_limit">
innodb_ft_result_cache_limit
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_ft_server_stopword_table">
innodb_ft_server_stopword_table
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_ft_sort_pll_degree">
innodb_ft_sort_pll_degree
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_ft_total_cache_size">
innodb_ft_total_cache_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_ft_user_stopword_table">
innodb_ft_user_stopword_table
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_idle_flush_pct">
innodb_idle_flush_pct
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_io_capacity">
innodb_io_capacity
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_io_capacity_max">
innodb_io_capacity_max
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_limit_optimistic_insert_debug">
innodb_limit_optimistic_insert_debug
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_lock_wait_timeout">
innodb_lock_wait_timeout
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_log_buffer_size">
innodb_log_buffer_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_log_checkpoint_fuzzy_now">
innodb_log_checkpoint_fuzzy_now
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_log_checkpoint_now">
innodb_log_checkpoint_now
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_log_checksums">
innodb_log_checksums
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_log_compressed_pages">
innodb_log_compressed_pages
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_log_file_size">
innodb_log_file_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_log_files_in_group">
innodb_log_files_in_group
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_log_group_home_dir">
innodb_log_group_home_dir
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_log_spin_cpu_abs_lwm">
innodb_log_spin_cpu_abs_lwm
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_log_spin_cpu_pct_hwm">
innodb_log_spin_cpu_pct_hwm
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_log_wait_for_flush_spin_hwm">
innodb_log_wait_for_flush_spin_hwm
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_log_write_ahead_size">
innodb_log_write_ahead_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_log_writer_threads">
innodb_log_writer_threads
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_lru_scan_depth">
innodb_lru_scan_depth
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_max_dirty_pages_pct">
innodb_max_dirty_pages_pct
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_max_dirty_pages_pct_lwm">
innodb_max_dirty_pages_pct_lwm
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_max_purge_lag">
innodb_max_purge_lag
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_max_purge_lag_delay">
innodb_max_purge_lag_delay
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_max_undo_log_size">
innodb_max_undo_log_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_merge_threshold_set_all_debug">
innodb_merge_threshold_set_all_debug
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_monitor_disable">
innodb_monitor_disable
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_monitor_enable">
innodb_monitor_enable
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_monitor_reset">
innodb_monitor_reset
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_monitor_reset_all">
innodb_monitor_reset_all
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_numa_interleave">
innodb_numa_interleave
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_old_blocks_pct">
innodb_old_blocks_pct
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_old_blocks_time">
innodb_old_blocks_time
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_online_alter_log_max_size">
innodb_online_alter_log_max_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_open_files">
innodb_open_files
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_optimize_fulltext_only">
innodb_optimize_fulltext_only
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_page_cleaners">
innodb_page_cleaners
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_page_size">
innodb_page_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_parallel_read_threads">
innodb_parallel_read_threads
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Session
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_print_all_deadlocks">
innodb_print_all_deadlocks
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_print_ddl_logs">
innodb_print_ddl_logs
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_purge_batch_size">
innodb_purge_batch_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_purge_rseg_truncate_frequency">
innodb_purge_rseg_truncate_frequency
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_purge_threads">
innodb_purge_threads
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_random_read_ahead">
innodb_random_read_ahead
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_read_ahead_threshold">
innodb_read_ahead_threshold
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_read_io_threads">
innodb_read_io_threads
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_read_only">
innodb_read_only
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_redo_log_archive_dirs">
innodb_redo_log_archive_dirs
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_redo_log_capacity">
innodb_redo_log_capacity
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_redo_log_encrypt">
innodb_redo_log_encrypt
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_replication_delay">
innodb_replication_delay
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_rollback_on_timeout">
innodb_rollback_on_timeout
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_rollback_segments">
innodb_rollback_segments
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_saved_page_number_debug">
innodb_saved_page_number_debug
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_segment_reserve_factor">
innodb_segment_reserve_factor
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_sort_buffer_size">
innodb_sort_buffer_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_spin_wait_delay">
innodb_spin_wait_delay
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_spin_wait_pause_multiplier">
innodb_spin_wait_pause_multiplier
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_stats_auto_recalc">
innodb_stats_auto_recalc
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_stats_include_delete_marked">
innodb_stats_include_delete_marked
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_stats_method">
innodb_stats_method
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_stats_on_metadata">
innodb_stats_on_metadata
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_stats_persistent">
innodb_stats_persistent
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_stats_persistent_sample_pages">
innodb_stats_persistent_sample_pages
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_stats_transient_sample_pages">
innodb_stats_transient_sample_pages
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_status_output">
innodb_status_output
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_status_output_locks">
innodb_status_output_locks
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_strict_mode">
innodb_strict_mode
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_sync_array_size">
innodb_sync_array_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_sync_debug">
innodb_sync_debug
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_sync_spin_loops">
innodb_sync_spin_loops
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_table_locks">
innodb_table_locks
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_temp_data_file_path">
innodb_temp_data_file_path
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_temp_tablespaces_dir">
innodb_temp_tablespaces_dir
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_thread_concurrency">
innodb_thread_concurrency
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_thread_sleep_delay">
innodb_thread_sleep_delay
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_tmpdir">
innodb_tmpdir
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_trx_purge_view_update_only_debug">
innodb_trx_purge_view_update_only_debug
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_trx_rseg_n_slots_debug">
innodb_trx_rseg_n_slots_debug
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_undo_directory">
innodb_undo_directory
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_undo_log_encrypt">
innodb_undo_log_encrypt
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_undo_log_truncate">
innodb_undo_log_truncate
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_undo_tablespaces">
innodb_undo_tablespaces
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_use_fdatasync">
innodb_use_fdatasync
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_use_native_aio">
innodb_use_native_aio
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_validate_tablespace_paths">
innodb_validate_tablespace_paths
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_version">
innodb_version
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="innodb-parameters.html#sysvar_innodb_write_io_threads">
innodb_write_io_threads
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_insert_id">
insert_id
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Session
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_interactive_timeout">
interactive_timeout
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_internal_tmp_mem_storage_engine">
internal_tmp_mem_storage_engine
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_join_buffer_size">
join_buffer_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_keep_files_on_create">
keep_files_on_create
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_key_buffer_size">
key_buffer_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_key_cache_age_threshold">
key_cache_age_threshold
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_key_cache_block_size">
key_cache_block_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_key_cache_division_limit">
key_cache_division_limit
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="keyring-system-variables.html#sysvar_keyring_aws_cmk_id">
keyring_aws_cmk_id
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="keyring-system-variables.html#sysvar_keyring_aws_conf_file">
keyring_aws_conf_file
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="keyring-system-variables.html#sysvar_keyring_aws_data_file">
keyring_aws_data_file
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="keyring-system-variables.html#sysvar_keyring_aws_region">
keyring_aws_region
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="keyring-system-variables.html#sysvar_keyring_hashicorp_auth_path">
keyring_hashicorp_auth_path
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="keyring-system-variables.html#sysvar_keyring_hashicorp_ca_path">
keyring_hashicorp_ca_path
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="keyring-system-variables.html#sysvar_keyring_hashicorp_caching">
keyring_hashicorp_caching
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="keyring-system-variables.html#sysvar_keyring_hashicorp_commit_auth_path">
keyring_hashicorp_commit_auth_path
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="keyring-system-variables.html#sysvar_keyring_hashicorp_commit_ca_path">
keyring_hashicorp_commit_ca_path
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="keyring-system-variables.html#sysvar_keyring_hashicorp_commit_caching">
keyring_hashicorp_commit_caching
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="keyring-system-variables.html#sysvar_keyring_hashicorp_commit_role_id">
keyring_hashicorp_commit_role_id
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="keyring-system-variables.html#sysvar_keyring_hashicorp_commit_server_url">
keyring_hashicorp_commit_server_url
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="keyring-system-variables.html#sysvar_keyring_hashicorp_commit_store_path">
keyring_hashicorp_commit_store_path
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="keyring-system-variables.html#sysvar_keyring_hashicorp_role_id">
keyring_hashicorp_role_id
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="keyring-system-variables.html#sysvar_keyring_hashicorp_secret_id">
keyring_hashicorp_secret_id
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="keyring-system-variables.html#sysvar_keyring_hashicorp_server_url">
keyring_hashicorp_server_url
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="keyring-system-variables.html#sysvar_keyring_hashicorp_store_path">
keyring_hashicorp_store_path
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="keyring-system-variables.html#sysvar_keyring_okv_conf_dir">
keyring_okv_conf_dir
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="keyring-system-variables.html#sysvar_keyring_operations">
keyring_operations
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_large_files_support">
large_files_support
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_large_page_size">
large_page_size
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-options.html#option_mysqld_large-pages">
large_pages
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_last_insert_id">
last_insert_id
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Session
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-options.html#option_mysqld_lc-messages">
lc_messages
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-options.html#option_mysqld_lc-messages-dir">
lc_messages_dir
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_lc_time_names">
lc_time_names
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_license">
license
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_local_infile">
local_infile
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="lock-order-tool.html#sysvar_lock_order">
lock_order
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="lock-order-tool.html#sysvar_lock_order_debug_loop">
lock_order_debug_loop
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="lock-order-tool.html#sysvar_lock_order_debug_missing_arc">
lock_order_debug_missing_arc
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="lock-order-tool.html#sysvar_lock_order_debug_missing_key">
lock_order_debug_missing_key
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="lock-order-tool.html#sysvar_lock_order_debug_missing_unlock">
lock_order_debug_missing_unlock
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="lock-order-tool.html#sysvar_lock_order_dependencies">
lock_order_dependencies
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="lock-order-tool.html#sysvar_lock_order_extra_dependencies">
lock_order_extra_dependencies
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="lock-order-tool.html#sysvar_lock_order_output_directory">
lock_order_output_directory
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="lock-order-tool.html#sysvar_lock_order_print_txt">
lock_order_print_txt
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="lock-order-tool.html#sysvar_lock_order_trace_loop">
lock_order_trace_loop
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="lock-order-tool.html#sysvar_lock_order_trace_missing_arc">
lock_order_trace_missing_arc
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="lock-order-tool.html#sysvar_lock_order_trace_missing_key">
lock_order_trace_missing_key
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="lock-order-tool.html#sysvar_lock_order_trace_missing_unlock">
lock_order_trace_missing_unlock
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_lock_wait_timeout">
lock_wait_timeout
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_locked_in_memory">
locked_in_memory
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-binary-log.html#sysvar_log_bin">
log_bin
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-binary-log.html#sysvar_log_bin_basename">
log_bin_basename
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-binary-log.html#option_mysqld_log-bin-index">
log_bin_index
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-binary-log.html#sysvar_log_bin_trust_function_creators">
log_bin_trust_function_creators
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-options.html#option_mysqld_log-error">
log_error
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_log_error_services">
log_error_services
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_log_error_suppression_list">
log_error_suppression_list
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_log_error_verbosity">
log_error_verbosity
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_log_output">
log_output
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_log_queries_not_using_indexes">
log_queries_not_using_indexes
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-options.html#option_mysqld_log-raw">
log_raw
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-binary-log.html#sysvar_log_replica_updates">
log_replica_updates
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-binary-log.html#sysvar_log_slave_updates">
log_slave_updates
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_log_slow_admin_statements">
log_slow_admin_statements
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_log_slow_extra">
log_slow_extra
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_log_slow_replica_statements">
log_slow_replica_statements
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_log_slow_slave_statements">
log_slow_slave_statements
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-binary-log.html#sysvar_log_statements_unsafe_for_binlog">
log_statements_unsafe_for_binlog
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_log_throttle_queries_not_using_indexes">
log_throttle_queries_not_using_indexes
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_log_timestamps">
log_timestamps
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_long_query_time">
long_query_time
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_low_priority_updates">
low_priority_updates
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_lower_case_file_system">
lower_case_file_system
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_lower_case_table_names">
lower_case_table_names
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_mandatory_roles">
mandatory_roles
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-binary-log.html#sysvar_master_verify_checksum">
master_verify_checksum
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_max_allowed_packet">
max_allowed_packet
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-binary-log.html#sysvar_max_binlog_cache_size">
max_binlog_cache_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-binary-log.html#sysvar_max_binlog_size">
max_binlog_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-binary-log.html#sysvar_max_binlog_stmt_cache_size">
max_binlog_stmt_cache_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_max_connect_errors">
max_connect_errors
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_max_connections">
max_connections
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_max_delayed_threads">
max_delayed_threads
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_max_digest_length">
max_digest_length
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_max_error_count">
max_error_count
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_max_execution_time">
max_execution_time
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_max_heap_table_size">
max_heap_table_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_max_insert_delayed_threads">
max_insert_delayed_threads
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_max_join_size">
max_join_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_max_length_for_sort_data">
max_length_for_sort_data
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_max_points_in_geometry">
max_points_in_geometry
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_max_prepared_stmt_count">
max_prepared_stmt_count
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_max_relay_log_size">
max_relay_log_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_max_seeks_for_key">
max_seeks_for_key
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_max_sort_length">
max_sort_length
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_max_sp_recursion_depth">
max_sp_recursion_depth
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_max_user_connections">
max_user_connections
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_max_write_lock_count">
max_write_lock_count
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_mecab_rc_file">
mecab_rc_file
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_min_examined_row_limit">
min_examined_row_limit
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_myisam_data_pointer_size">
myisam_data_pointer_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_myisam_max_sort_file_size">
myisam_max_sort_file_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_myisam_mmap_size">
myisam_mmap_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_myisam_recover_options">
myisam_recover_options
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_myisam_sort_buffer_size">
myisam_sort_buffer_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_myisam_stats_method">
myisam_stats_method
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_myisam_use_mmap">
myisam_use_mmap
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="firewall-reference.html#sysvar_mysql_firewall_database">
mysql_firewall_database
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="firewall-reference.html#sysvar_mysql_firewall_mode">
mysql_firewall_mode
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="firewall-reference.html#sysvar_mysql_firewall_reload_interval_seconds">
mysql_firewall_reload_interval_seconds
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="firewall-reference.html#sysvar_mysql_firewall_trace">
mysql_firewall_trace
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_mysql_native_password_proxy_users">
mysql_native_password_proxy_users
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="x-plugin-options-system-variables.html#sysvar_mysqlx_bind_address">
mysqlx_bind_address
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="x-plugin-options-system-variables.html#sysvar_mysqlx_compression_algorithms">
mysqlx_compression_algorithms
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="x-plugin-options-system-variables.html#sysvar_mysqlx_connect_timeout">
mysqlx_connect_timeout
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="x-plugin-options-system-variables.html#sysvar_mysqlx_deflate_default_compression_level">
mysqlx_deflate_default_compression_level
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="x-plugin-options-system-variables.html#sysvar_mysqlx_deflate_max_client_compression_level">
mysqlx_deflate_max_client_compression_level
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="x-plugin-options-system-variables.html#sysvar_mysqlx_document_id_unique_prefix">
mysqlx_document_id_unique_prefix
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="x-plugin-options-system-variables.html#sysvar_mysqlx_enable_hello_notice">
mysqlx_enable_hello_notice
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="x-plugin-options-system-variables.html#sysvar_mysqlx_idle_worker_thread_timeout">
mysqlx_idle_worker_thread_timeout
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="x-plugin-options-system-variables.html#sysvar_mysqlx_interactive_timeout">
mysqlx_interactive_timeout
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="x-plugin-options-system-variables.html#sysvar_mysqlx_lz4_default_compression_level">
mysqlx_lz4_default_compression_level
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="x-plugin-options-system-variables.html#sysvar_mysqlx_lz4_max_client_compression_level">
mysqlx_lz4_max_client_compression_level
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="x-plugin-options-system-variables.html#sysvar_mysqlx_max_allowed_packet">
mysqlx_max_allowed_packet
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="x-plugin-options-system-variables.html#sysvar_mysqlx_max_connections">
mysqlx_max_connections
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="x-plugin-options-system-variables.html#sysvar_mysqlx_min_worker_threads">
mysqlx_min_worker_threads
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="x-plugin-options-system-variables.html#sysvar_mysqlx_port">
mysqlx_port
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="x-plugin-options-system-variables.html#sysvar_mysqlx_port_open_timeout">
mysqlx_port_open_timeout
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="x-plugin-options-system-variables.html#sysvar_mysqlx_read_timeout">
mysqlx_read_timeout
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Session
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="x-plugin-options-system-variables.html#sysvar_mysqlx_socket">
mysqlx_socket
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="x-plugin-options-system-variables.html#sysvar_mysqlx_ssl_ca">
mysqlx_ssl_ca
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="x-plugin-options-system-variables.html#sysvar_mysqlx_ssl_capath">
mysqlx_ssl_capath
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="x-plugin-options-system-variables.html#sysvar_mysqlx_ssl_cert">
mysqlx_ssl_cert
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="x-plugin-options-system-variables.html#sysvar_mysqlx_ssl_cipher">
mysqlx_ssl_cipher
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="x-plugin-options-system-variables.html#sysvar_mysqlx_ssl_crl">
mysqlx_ssl_crl
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="x-plugin-options-system-variables.html#sysvar_mysqlx_ssl_crlpath">
mysqlx_ssl_crlpath
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="x-plugin-options-system-variables.html#sysvar_mysqlx_ssl_key">
mysqlx_ssl_key
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="x-plugin-options-system-variables.html#sysvar_mysqlx_wait_timeout">
mysqlx_wait_timeout
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Session
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="x-plugin-options-system-variables.html#sysvar_mysqlx_write_timeout">
mysqlx_write_timeout
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Session
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="x-plugin-options-system-variables.html#sysvar_mysqlx_zstd_default_compression_level">
mysqlx_zstd_default_compression_level
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="x-plugin-options-system-variables.html#sysvar_mysqlx_zstd_max_client_compression_level">
mysqlx_zstd_max_client_compression_level
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_named_pipe">
named_pipe
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_named_pipe_full_access_group">
named_pipe_full_access_group
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#option_mysqld_ndb-allow-copying-alter-table">
ndb_allow_copying_alter_table
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#option_mysqld_ndb-applier-allow-skip-epoch">
ndb_applier_allow_skip_epoch
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_autoincrement_prefetch_sz">
ndb_autoincrement_prefetch_sz
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#option_mysqld_ndb-batch-size">
ndb_batch_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#option_mysqld_ndb-blob-read-batch-bytes">
ndb_blob_read_batch_bytes
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#option_mysqld_ndb-blob-write-batch-bytes">
ndb_blob_write_batch_bytes
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_clear_apply_status">
ndb_clear_apply_status
</a>
</th>
<td>
Yes
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#option_mysqld_ndb-cluster-connection-pool">
ndb_cluster_connection_pool
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#option_mysqld_ndb-cluster-connection-pool-nodeids">
ndb_cluster_connection_pool_nodeids
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_conflict_role">
ndb_conflict_role
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_data_node_neighbour">
ndb_data_node_neighbour
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_dbg_check_shares">
ndb_dbg_check_shares
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#option_mysqld_ndb-default-column-format">
ndb_default_column_format
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_default_column_format">
ndb_default_column_format
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#option_mysqld_ndb-deferred-constraints">
ndb_deferred_constraints
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_deferred_constraints">
ndb_deferred_constraints
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#option_mysqld_ndb-distribution">
ndb_distribution
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_distribution">
ndb_distribution
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_eventbuffer_free_percent">
ndb_eventbuffer_free_percent
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_eventbuffer_max_alloc">
ndb_eventbuffer_max_alloc
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_extra_logging">
ndb_extra_logging
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_force_send">
ndb_force_send
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_fully_replicated">
ndb_fully_replicated
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_index_stat_enable">
ndb_index_stat_enable
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_index_stat_option">
ndb_index_stat_option
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_join_pushdown">
ndb_join_pushdown
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#option_mysqld_ndb-log-apply-status">
ndb_log_apply_status
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_log_apply_status">
ndb_log_apply_status
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_log_bin">
ndb_log_bin
</a>
</th>
<td>
Yes
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_log_binlog_index">
ndb_log_binlog_index
</a>
</th>
<td>
Yes
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_log_cache_size">
ndb_log_cache_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#option_mysqld_ndb-log-empty-epochs">
ndb_log_empty_epochs
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_log_empty_epochs">
ndb_log_empty_epochs
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#option_mysqld_ndb-log-empty-update">
ndb_log_empty_update
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_log_empty_update">
ndb_log_empty_update
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#option_mysqld_ndb-log-exclusive-reads">
ndb_log_exclusive_reads
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_log_exclusive_reads">
ndb_log_exclusive_reads
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#option_mysqld_ndb-log-fail-terminate">
ndb_log_fail_terminate
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#option_mysqld_ndb-log-orig">
ndb_log_orig
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_log_orig">
ndb_log_orig
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_log_transaction_compression">
ndb_log_transaction_compression
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_log_transaction_compression_level_zstd">
ndb_log_transaction_compression_level_zstd
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#option_mysqld_ndb-log-transaction-dependency">
ndb_log_transaction_dependency
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#option_mysqld_ndb-log-transaction-id">
ndb_log_transaction_id
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_log_transaction_id">
ndb_log_transaction_id
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#option_mysqld_ndb-log-update-as-write">
ndb_log_update_as_write
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#option_mysqld_ndb-log-update-minimal">
ndb_log_update_minimal
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#option_mysqld_ndb-log-updated-only">
ndb_log_updated_only
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_metadata_check">
ndb_metadata_check
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_metadata_check_interval">
ndb_metadata_check_interval
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_metadata_sync">
ndb_metadata_sync
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#option_mysqld_ndb-mgm-tls">
ndb_mgm_tls
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
-
<span class="emphasis">
<em>
Variable
</em>
</span>
: yes
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#option_mysqld_ndb-optimization-delay">
ndb_optimization_delay
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_optimized_node_selection">
ndb_optimized_node_selection
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_read_backup">
ndb_read_backup
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_recv_thread_activation_threshold">
ndb_recv_thread_activation_threshold
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_recv_thread_cpu_mask">
ndb_recv_thread_cpu_mask
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_replica_batch_size">
ndb_replica_batch_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_replica_blob_write_batch_bytes">
ndb_replica_blob_write_batch_bytes
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_replica_max_replicated_epoch">
Ndb_replica_max_replicated_epoch
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_report_thresh_binlog_epoch_slip">
ndb_report_thresh_binlog_epoch_slip
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_report_thresh_binlog_mem_usage">
ndb_report_thresh_binlog_mem_usage
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_row_checksum">
ndb_row_checksum
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_schema_dist_lock_wait_timeout">
ndb_schema_dist_lock_wait_timeout
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#option_mysqld_ndb-schema-dist-timeout">
ndb_schema_dist_timeout
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_schema_dist_timeout">
ndb_schema_dist_timeout
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_schema_dist_upgrade_allowed">
ndb_schema_dist_upgrade_allowed
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_show_foreign_key_mock_tables">
ndb_show_foreign_key_mock_tables
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_slave_conflict_role">
ndb_slave_conflict_role
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_system_name">
Ndb_system_name
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_table_no_logging">
ndb_table_no_logging
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Session
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_table_temporary">
ndb_table_temporary
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Session
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#option_mysqld_ndb-tls-search-path">
ndb_tls_search_path
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
-
<span class="emphasis">
<em>
Variable
</em>
</span>
: yes
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_use_copying_alter_table">
ndb_use_copying_alter_table
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_use_exact_count">
ndb_use_exact_count
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_use_transactions">
ndb_use_transactions
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_version">
ndb_version
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_version_string">
ndb_version_string
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#option_mysqld_ndb-wait-connected">
ndb_wait_connected
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#option_mysqld_ndb-wait-setup">
ndb_wait_setup
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndbinfo_database">
ndbinfo_database
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndbinfo_max_bytes">
ndbinfo_max_bytes
</a>
</th>
<td>
Yes
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndbinfo_max_rows">
ndbinfo_max_rows
</a>
</th>
<td>
Yes
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndbinfo_offline">
ndbinfo_offline
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndbinfo_show_hidden">
ndbinfo_show_hidden
</a>
</th>
<td>
Yes
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndbinfo_table_prefix">
ndbinfo_table_prefix
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndbinfo_version">
ndbinfo_version
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_net_buffer_length">
net_buffer_length
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_net_read_timeout">
net_read_timeout
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_net_retry_count">
net_retry_count
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_net_write_timeout">
net_write_timeout
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_ngram_token_size">
ngram_token_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_offline_mode">
offline_mode
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_old_alter_table">
old_alter_table
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_open_files_limit">
open_files_limit
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_optimizer_prune_level">
optimizer_prune_level
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_optimizer_search_depth">
optimizer_search_depth
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_optimizer_switch">
optimizer_switch
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_optimizer_trace">
optimizer_trace
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_optimizer_trace_features">
optimizer_trace_features
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_optimizer_trace_limit">
optimizer_trace_limit
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_optimizer_trace_max_mem_size">
optimizer_trace_max_mem_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_optimizer_trace_offset">
optimizer_trace_offset
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-binary-log.html#sysvar_original_commit_timestamp">
original_commit_timestamp
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Session
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-source.html#sysvar_original_server_version">
original_server_version
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Session
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_parser_max_mem_size">
parser_max_mem_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_partial_revokes">
partial_revokes
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_password_history">
password_history
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_password_require_current">
password_require_current
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_password_reuse_interval">
password_reuse_interval
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="performance-schema-system-variables.html#sysvar_performance_schema">
performance_schema
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="performance-schema-system-variables.html#sysvar_performance_schema_accounts_size">
performance_schema_accounts_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="performance-schema-system-variables.html#sysvar_performance_schema_digests_size">
performance_schema_digests_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="performance-schema-system-variables.html#sysvar_performance_schema_error_size">
performance_schema_error_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="performance-schema-system-variables.html#sysvar_performance_schema_events_stages_history_long_size">
performance_schema_events_stages_history_long_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="performance-schema-system-variables.html#sysvar_performance_schema_events_stages_history_size">
performance_schema_events_stages_history_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="performance-schema-system-variables.html#sysvar_performance_schema_events_statements_history_long_size">
performance_schema_events_statements_history_long_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="performance-schema-system-variables.html#sysvar_performance_schema_events_statements_history_size">
performance_schema_events_statements_history_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="performance-schema-system-variables.html#sysvar_performance_schema_events_transactions_history_long_size">
performance_schema_events_transactions_history_long_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="performance-schema-system-variables.html#sysvar_performance_schema_events_transactions_history_size">
performance_schema_events_transactions_history_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="performance-schema-system-variables.html#sysvar_performance_schema_events_waits_history_long_size">
performance_schema_events_waits_history_long_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="performance-schema-system-variables.html#sysvar_performance_schema_events_waits_history_size">
performance_schema_events_waits_history_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="performance-schema-system-variables.html#sysvar_performance_schema_hosts_size">
performance_schema_hosts_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="performance-schema-system-variables.html#sysvar_performance_schema_max_cond_classes">
performance_schema_max_cond_classes
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="performance-schema-system-variables.html#sysvar_performance_schema_max_cond_instances">
performance_schema_max_cond_instances
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="performance-schema-system-variables.html#sysvar_performance_schema_max_digest_length">
performance_schema_max_digest_length
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="performance-schema-system-variables.html#sysvar_performance_schema_max_digest_sample_age">
performance_schema_max_digest_sample_age
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="performance-schema-system-variables.html#sysvar_performance_schema_max_file_classes">
performance_schema_max_file_classes
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="performance-schema-system-variables.html#sysvar_performance_schema_max_file_handles">
performance_schema_max_file_handles
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="performance-schema-system-variables.html#sysvar_performance_schema_max_file_instances">
performance_schema_max_file_instances
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="performance-schema-system-variables.html#sysvar_performance_schema_max_index_stat">
performance_schema_max_index_stat
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="performance-schema-system-variables.html#sysvar_performance_schema_max_memory_classes">
performance_schema_max_memory_classes
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="performance-schema-system-variables.html#sysvar_performance_schema_max_metadata_locks">
performance_schema_max_metadata_locks
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="performance-schema-system-variables.html#sysvar_performance_schema_max_meter_classes">
performance_schema_max_meter_classes
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="performance-schema-system-variables.html#sysvar_performance_schema_max_metric_classes">
performance_schema_max_metric_classes
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="performance-schema-system-variables.html#sysvar_performance_schema_max_mutex_classes">
performance_schema_max_mutex_classes
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="performance-schema-system-variables.html#sysvar_performance_schema_max_mutex_instances">
performance_schema_max_mutex_instances
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="performance-schema-system-variables.html#sysvar_performance_schema_max_prepared_statements_instances">
performance_schema_max_prepared_statements_instances
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="performance-schema-system-variables.html#sysvar_performance_schema_max_program_instances">
performance_schema_max_program_instances
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="performance-schema-system-variables.html#sysvar_performance_schema_max_rwlock_classes">
performance_schema_max_rwlock_classes
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="performance-schema-system-variables.html#sysvar_performance_schema_max_rwlock_instances">
performance_schema_max_rwlock_instances
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="performance-schema-system-variables.html#sysvar_performance_schema_max_socket_classes">
performance_schema_max_socket_classes
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="performance-schema-system-variables.html#sysvar_performance_schema_max_socket_instances">
performance_schema_max_socket_instances
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="performance-schema-system-variables.html#sysvar_performance_schema_max_sql_text_length">
performance_schema_max_sql_text_length
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="performance-schema-system-variables.html#sysvar_performance_schema_max_stage_classes">
performance_schema_max_stage_classes
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="performance-schema-system-variables.html#sysvar_performance_schema_max_statement_classes">
performance_schema_max_statement_classes
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="performance-schema-system-variables.html#sysvar_performance_schema_max_statement_stack">
performance_schema_max_statement_stack
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="performance-schema-system-variables.html#sysvar_performance_schema_max_table_handles">
performance_schema_max_table_handles
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="performance-schema-system-variables.html#sysvar_performance_schema_max_table_instances">
performance_schema_max_table_instances
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="performance-schema-system-variables.html#sysvar_performance_schema_max_table_lock_stat">
performance_schema_max_table_lock_stat
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="performance-schema-system-variables.html#sysvar_performance_schema_max_thread_classes">
performance_schema_max_thread_classes
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="performance-schema-system-variables.html#sysvar_performance_schema_max_thread_instances">
performance_schema_max_thread_instances
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="performance-schema-system-variables.html#sysvar_performance_schema_session_connect_attrs_size">
performance_schema_session_connect_attrs_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="performance-schema-system-variables.html#sysvar_performance_schema_setup_actors_size">
performance_schema_setup_actors_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="performance-schema-system-variables.html#sysvar_performance_schema_setup_objects_size">
performance_schema_setup_objects_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="performance-schema-system-variables.html#sysvar_performance_schema_show_processlist">
performance_schema_show_processlist
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="performance-schema-system-variables.html#sysvar_performance_schema_users_size">
performance_schema_users_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_persist_only_admin_x509_subject">
persist_only_admin_x509_subject
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_persist_sensitive_variables_in_plaintext">
persist_sensitive_variables_in_plaintext
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_persisted_globals_load">
persisted_globals_load
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_pid_file">
pid_file
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_plugin_dir">
plugin_dir
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-options.html#option_mysqld_port">
port
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_preload_buffer_size">
preload_buffer_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_print_identified_with_as_hex">
print_identified_with_as_hex
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_profiling">
profiling
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_profiling_history_size">
profiling_history_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_protocol_compression_algorithms">
protocol_compression_algorithms
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_protocol_version">
protocol_version
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_proxy_user">
proxy_user
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Session
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_pseudo_replica_mode">
pseudo_replica_mode
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Session
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_pseudo_slave_mode">
pseudo_slave_mode
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Session
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_pseudo_thread_id">
pseudo_thread_id
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Session
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_query_alloc_block_size">
query_alloc_block_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_query_prealloc_size">
query_prealloc_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_rand_seed1">
rand_seed1
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Session
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_rand_seed2">
rand_seed2
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Session
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_range_alloc_block_size">
range_alloc_block_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_range_optimizer_max_mem_size">
range_optimizer_max_mem_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_rbr_exec_mode">
rbr_exec_mode
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Session
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_read_buffer_size">
read_buffer_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_read_only">
read_only
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_read_rnd_buffer_size">
read_rnd_buffer_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_regexp_stack_limit">
regexp_stack_limit
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_regexp_time_limit">
regexp_time_limit
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_relay_log">
relay_log
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_relay_log_basename">
relay_log_basename
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_relay_log_index">
relay_log_index
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_relay_log_purge">
relay_log_purge
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_relay_log_recovery">
relay_log_recovery
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_relay_log_space_limit">
relay_log_space_limit
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_replica_allow_batching">
replica_allow_batching
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_replica_checkpoint_group">
replica_checkpoint_group
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_replica_checkpoint_period">
replica_checkpoint_period
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_replica_compressed_protocol">
replica_compressed_protocol
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_replica_exec_mode">
replica_exec_mode
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_replica_load_tmpdir">
replica_load_tmpdir
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_replica_max_allowed_packet">
replica_max_allowed_packet
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_replica_net_timeout">
replica_net_timeout
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_replica_parallel_type">
replica_parallel_type
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_replica_parallel_workers">
replica_parallel_workers
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_replica_pending_jobs_size_max">
replica_pending_jobs_size_max
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_replica_preserve_commit_order">
replica_preserve_commit_order
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_replica_skip_errors">
replica_skip_errors
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_replica_sql_verify_checksum">
replica_sql_verify_checksum
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_replica_transaction_retries">
replica_transaction_retries
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_replica_type_conversions">
replica_type_conversions
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_replication_optimize_for_static_plugin_config">
replication_optimize_for_static_plugin_config
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_replication_sender_observe_commit_only">
replication_sender_observe_commit_only
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_report_host">
report_host
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_report_password">
report_password
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_report_port">
report_port
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_report_user">
report_user
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_require_row_format">
require_row_format
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Session
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_require_secure_transport">
require_secure_transport
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_restrict_fk_on_non_standard_key">
restrict_fk_on_non_standard_key
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_resultset_metadata">
resultset_metadata
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Session
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="rewriter-query-rewrite-plugin-reference.html#sysvar_rewriter_enabled">
rewriter_enabled
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="rewriter-query-rewrite-plugin-reference.html#sysvar_rewriter_enabled_for_threads_without_privilege_checks">
rewriter_enabled_for_threads_without_privilege_checks
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="rewriter-query-rewrite-plugin-reference.html#sysvar_rewriter_verbose">
rewriter_verbose
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_rpl_read_size">
rpl_read_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_master_enabled">
rpl_semi_sync_master_enabled
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_master_timeout">
rpl_semi_sync_master_timeout
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_master_trace_level">
rpl_semi_sync_master_trace_level
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_master_wait_for_slave_count">
rpl_semi_sync_master_wait_for_slave_count
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_master_wait_no_slave">
rpl_semi_sync_master_wait_no_slave
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_master_wait_point">
rpl_semi_sync_master_wait_point
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_rpl_semi_sync_replica_enabled">
rpl_semi_sync_replica_enabled
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_rpl_semi_sync_replica_trace_level">
rpl_semi_sync_replica_trace_level
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_rpl_semi_sync_slave_enabled">
rpl_semi_sync_slave_enabled
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_rpl_semi_sync_slave_trace_level">
rpl_semi_sync_slave_trace_level
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_source_enabled">
rpl_semi_sync_source_enabled
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_source_timeout">
rpl_semi_sync_source_timeout
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_source_trace_level">
rpl_semi_sync_source_trace_level
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_source_wait_for_replica_count">
rpl_semi_sync_source_wait_for_replica_count
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_source_wait_no_replica">
rpl_semi_sync_source_wait_no_replica
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-source.html#sysvar_rpl_semi_sync_source_wait_point">
rpl_semi_sync_source_wait_point
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_rpl_stop_replica_timeout">
rpl_stop_replica_timeout
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_rpl_stop_slave_timeout">
rpl_stop_slave_timeout
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_schema_definition_cache">
schema_definition_cache
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_secondary_engine_cost_threshold">
secondary_engine_cost_threshold
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Session
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_secure_file_priv">
secure_file_priv
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_select_into_buffer_size">
select_into_buffer_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_select_into_disk_sync">
select_into_disk_sync
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_select_into_disk_sync_delay">
select_into_disk_sync_delay
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options.html#sysvar_server_id">
server_id
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_server_id_bits">
server_id_bits
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options.html#sysvar_server_uuid">
server_uuid
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_session_track_gtids">
session_track_gtids
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_session_track_schema">
session_track_schema
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_session_track_state_change">
session_track_state_change
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_session_track_system_variables">
session_track_system_variables
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_session_track_transaction_info">
session_track_transaction_info
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_set_operations_buffer_size">
set_operations_buffer_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_sha256_password_auto_generate_rsa_keys">
sha256_password_auto_generate_rsa_keys
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_sha256_password_private_key_path">
sha256_password_private_key_path
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_sha256_password_proxy_users">
sha256_password_proxy_users
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_sha256_password_public_key_path">
sha256_password_public_key_path
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_shared_memory">
shared_memory
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_shared_memory_base_name">
shared_memory_base_name
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_show_create_table_skip_secondary_engine">
show_create_table_skip_secondary_engine
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Session
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_show_create_table_verbosity">
show_create_table_verbosity
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_show_gipk_in_create_table_and_information_schema">
show_gipk_in_create_table_and_information_schema
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_skip_external_locking">
skip_external_locking
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_skip_name_resolve">
skip_name_resolve
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_skip_networking">
skip_networking
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#option_mysqld_skip-replica-start">
skip_replica_start
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-options.html#option_mysqld_skip-show-database">
skip_show_database
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#option_mysqld_skip-slave-start">
skip_slave_start
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_slave_allow_batching">
slave_allow_batching
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_slave_checkpoint_group">
slave_checkpoint_group
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_slave_checkpoint_period">
slave_checkpoint_period
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_slave_compressed_protocol">
slave_compressed_protocol
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_slave_exec_mode">
slave_exec_mode
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_slave_load_tmpdir">
slave_load_tmpdir
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_slave_max_allowed_packet">
slave_max_allowed_packet
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_slave_net_timeout">
slave_net_timeout
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_slave_parallel_type">
slave_parallel_type
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_slave_parallel_workers">
slave_parallel_workers
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_slave_pending_jobs_size_max">
slave_pending_jobs_size_max
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_slave_preserve_commit_order">
slave_preserve_commit_order
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#option_mysqld_slave-skip-errors">
slave_skip_errors
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_slave_sql_verify_checksum">
slave_sql_verify_checksum
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_slave_transaction_retries">
slave_transaction_retries
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_slave_type_conversions">
slave_type_conversions
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_slow_launch_time">
slow_launch_time
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_slow_query_log">
slow_query_log
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_slow_query_log_file">
slow_query_log_file
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-options.html#option_mysqld_socket">
socket
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_sort_buffer_size">
sort_buffer_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-binary-log.html#sysvar_source_verify_checksum">
source_verify_checksum
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_sql_auto_is_null">
sql_auto_is_null
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_sql_big_selects">
sql_big_selects
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_sql_buffer_result">
sql_buffer_result
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_sql_generate_invisible_primary_key">
sql_generate_invisible_primary_key
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-binary-log.html#sysvar_sql_log_bin">
sql_log_bin
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Session
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_sql_log_off">
sql_log_off
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-options.html#option_mysqld_sql-mode">
sql_mode
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_sql_notes">
sql_notes
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_sql_quote_show_create">
sql_quote_show_create
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_sql_replica_skip_counter">
sql_replica_skip_counter
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_sql_require_primary_key">
sql_require_primary_key
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_sql_safe_updates">
sql_safe_updates
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_sql_select_limit">
sql_select_limit
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_sql_slave_skip_counter">
sql_slave_skip_counter
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_sql_warnings">
sql_warnings
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_ssl_ca">
ssl_ca
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_ssl_capath">
ssl_capath
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_ssl_cert">
ssl_cert
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_ssl_cipher">
ssl_cipher
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_ssl_crl">
ssl_crl
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_ssl_crlpath">
ssl_crlpath
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_ssl_fips_mode">
ssl_fips_mode
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_ssl_key">
ssl_key
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_ssl_session_cache_mode">
ssl_session_cache_mode
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_ssl_session_cache_timeout">
ssl_session_cache_timeout
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_statement_id">
statement_id
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Session
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_stored_program_cache">
stored_program_cache
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_stored_program_definition_cache">
stored_program_definition_cache
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_super_read_only">
super_read_only
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-binary-log.html#sysvar_sync_binlog">
sync_binlog
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_sync_master_info">
sync_master_info
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_sync_relay_log">
sync_relay_log
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_sync_relay_log_info">
sync_relay_log_info
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_sync_source_info">
sync_source_info
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_syseventlog.facility">
syseventlog.facility
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_syseventlog.include_pid">
syseventlog.include_pid
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_syseventlog.tag">
syseventlog.tag
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_system_time_zone">
system_time_zone
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_table_definition_cache">
table_definition_cache
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_table_encryption_privilege_check">
table_encryption_privilege_check
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_table_open_cache">
table_open_cache
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_table_open_cache_instances">
table_open_cache_instances
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_tablespace_definition_cache">
tablespace_definition_cache
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="telemetry-metrics-configuration.html#sysvar_telemetry.metrics_reader_frequency_1">
telemetry.metrics_reader_frequency_1
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="telemetry-metrics-configuration.html#sysvar_telemetry.metrics_reader_frequency_2">
telemetry.metrics_reader_frequency_2
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="telemetry-metrics-configuration.html#sysvar_telemetry.metrics_reader_frequency_3">
telemetry.metrics_reader_frequency_3
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="telemetry-trace-configuration.html#sysvar_telemetry.otel_bsp_max_export_batch_size">
telemetry.otel_bsp_max_export_batch_size
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="telemetry-trace-configuration.html#sysvar_telemetry.otel_bsp_max_queue_size">
telemetry.otel_bsp_max_queue_size
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="telemetry-trace-configuration.html#sysvar_telemetry.otel_bsp_schedule_delay">
telemetry.otel_bsp_schedule_delay
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="telemetry-metrics-configuration.html#sysvar_telemetry.otel_exporter_otlp_metrics_certificates">
telemetry.otel_exporter_otlp_metrics_certificates
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="telemetry-metrics-configuration.html#sysvar_telemetry.otel_exporter_otlp_metrics_cipher">
telemetry.otel_exporter_otlp_metrics_cipher
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="telemetry-metrics-configuration.html#sysvar_telemetry.otel_exporter_otlp_metrics_cipher_suite">
telemetry.otel_exporter_otlp_metrics_cipher_suite
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="telemetry-metrics-configuration.html#sysvar_telemetry.otel_exporter_otlp_metrics_client_certificates">
telemetry.otel_exporter_otlp_metrics_client_certificates
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="telemetry-metrics-configuration.html#sysvar_telemetry.otel_exporter_otlp_metrics_client_key">
telemetry.otel_exporter_otlp_metrics_client_key
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="telemetry-metrics-configuration.html#sysvar_telemetry.otel_exporter_otlp_metrics_compression">
telemetry.otel_exporter_otlp_metrics_compression
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="telemetry-metrics-configuration.html#sysvar_telemetry.otel_exporter_otlp_metrics_endpoint">
telemetry.otel_exporter_otlp_metrics_endpoint
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="telemetry-metrics-configuration.html#sysvar_telemetry.otel_exporter_otlp_metrics_headers">
telemetry.otel_exporter_otlp_metrics_headers
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="telemetry-metrics-configuration.html#sysvar_telemetry.otel_exporter_otlp_metrics_min_tls">
telemetry.otel_exporter_otlp_metrics_max_tls
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="telemetry-metrics-configuration.html#sysvar_telemetry.otel_exporter_otlp_metrics_min_tls">
telemetry.otel_exporter_otlp_metrics_min_tls
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="telemetry-metrics-configuration.html#sysvar_telemetry.otel_exporter_otlp_metrics_protocol">
telemetry.otel_exporter_otlp_metrics_protocol
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="telemetry-metrics-configuration.html#sysvar_telemetry.otel_exporter_otlp_metrics_timeout">
telemetry.otel_exporter_otlp_metrics_timeout
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="telemetry-trace-configuration.html#sysvar_telemetry.otel_exporter_otlp_traces_certificates">
telemetry.otel_exporter_otlp_traces_certificates
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="telemetry-trace-configuration.html#sysvar_telemetry.otel_exporter_otlp_traces_cipher">
telemetry.otel_exporter_otlp_traces_cipher
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="telemetry-trace-configuration.html#sysvar_telemetry.otel_exporter_otlp_traces_cipher_suite">
telemetry.otel_exporter_otlp_traces_cipher_suite
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="telemetry-trace-configuration.html#sysvar_telemetry.otel_exporter_otlp_traces_client_certificates">
telemetry.otel_exporter_otlp_traces_client_certificates
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="telemetry-trace-configuration.html#sysvar_telemetry.otel_exporter_otlp_traces_client_key">
telemetry.otel_exporter_otlp_traces_client_key
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="telemetry-trace-configuration.html#sysvar_telemetry.otel_exporter_otlp_traces_compression">
telemetry.otel_exporter_otlp_traces_compression
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="telemetry-trace-configuration.html#sysvar_telemetry.otel_exporter_otlp_traces_endpoint">
telemetry.otel_exporter_otlp_traces_endpoint
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="telemetry-trace-configuration.html#sysvar_telemetry.otel_exporter_otlp_traces_headers">
telemetry.otel_exporter_otlp_traces_headers
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="telemetry-trace-configuration.html#sysvar_telemetry.otel_exporter_otlp_traces_max_tls">
telemetry.otel_exporter_otlp_traces_max_tls
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="telemetry-trace-configuration.html#sysvar_telemetry.otel_exporter_otlp_traces_min_tls">
telemetry.otel_exporter_otlp_traces_min_tls
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="telemetry-trace-configuration.html#sysvar_telemetry.otel_exporter_otlp_traces_protocol">
telemetry.otel_exporter_otlp_traces_protocol
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="telemetry-trace-configuration.html#sysvar_telemetry.otel_exporter_otlp_traces_timeout">
telemetry.otel_exporter_otlp_traces_timeout
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="telemetry-trace-configuration.html#sysvar_telemetry.otel_log_level">
telemetry.otel_log_level
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="telemetry-trace-configuration.html#sysvar_telemetry.otel_resource_attributes">
telemetry.otel_resource_attributes
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="telemetry-trace-configuration.html#sysvar_telemetry.query_text_enabled">
telemetry.query_text_enabled
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="telemetry-trace-configuration.html#sysvar_telemetry.trace_enabled">
telemetry.trace_enabled
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_temptable_max_mmap">
temptable_max_mmap
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_temptable_max_ram">
temptable_max_ram
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_temptable_use_mmap">
temptable_use_mmap
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="replication-options-replica.html#sysvar_terminology_use_previous">
terminology_use_previous
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_thread_cache_size">
thread_cache_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_thread_handling">
thread_handling
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_thread_pool_algorithm">
thread_pool_algorithm
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_thread_pool_dedicated_listeners">
thread_pool_dedicated_listeners
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_thread_pool_high_priority_connection">
thread_pool_high_priority_connection
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_thread_pool_longrun_trx_limit">
thread_pool_longrun_trx_limit
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_thread_pool_max_active_query_threads">
thread_pool_max_active_query_threads
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_thread_pool_max_transactions_limit">
thread_pool_max_transactions_limit
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_thread_pool_max_unused_threads">
thread_pool_max_unused_threads
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_thread_pool_prio_kickup_timer">
thread_pool_prio_kickup_timer
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_thread_pool_query_threads_per_group">
thread_pool_query_threads_per_group
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_thread_pool_size">
thread_pool_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_thread_pool_stall_limit">
thread_pool_stall_limit
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_thread_pool_transaction_delay">
thread_pool_transaction_delay
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_thread_stack">
thread_stack
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_time_zone">
time_zone
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_timestamp">
timestamp
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Session
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_tls_certificates_enforced_validation">
tls_certificates_enforced_validation
</a>
</th>
<td>
Yes
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_tls_ciphersuites">
tls_ciphersuites
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_tls_version">
tls_version
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_tmp_table_size">
tmp_table_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-options.html#option_mysqld_tmpdir">
tmpdir
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_transaction_alloc_block_size">
transaction_alloc_block_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_transaction_allow_batching">
transaction_allow_batching
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Session
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-options.html#option_mysqld_transaction-isolation">
transaction_isolation
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_transaction_prealloc_size">
transaction_prealloc_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-options.html#option_mysqld_transaction-read-only">
transaction_read_only
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_unique_checks">
unique_checks
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_updatable_views_with_limit">
updatable_views_with_limit
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_use_secondary_engine">
use_secondary_engine
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Session
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="validate-password-options-variables.html#sysvar_validate_password_check_user_name">
validate_password_check_user_name
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="validate-password-options-variables.html#sysvar_validate_password_dictionary_file">
validate_password_dictionary_file
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="validate-password-options-variables.html#sysvar_validate_password_length">
validate_password_length
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="validate-password-options-variables.html#sysvar_validate_password_mixed_case_count">
validate_password_mixed_case_count
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="validate-password-options-variables.html#sysvar_validate_password_number_count">
validate_password_number_count
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="validate-password-options-variables.html#sysvar_validate_password_policy">
validate_password_policy
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="validate-password-options-variables.html#sysvar_validate_password_special_char_count">
validate_password_special_char_count
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="validate-password-options-variables.html#sysvar_validate_password.changed_characters_percentage">
validate_password.changed_characters_percentage
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="validate-password-options-variables.html#sysvar_validate_password.check_user_name">
validate_password.check_user_name
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="validate-password-options-variables.html#sysvar_validate_password.dictionary_file">
validate_password.dictionary_file
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="validate-password-options-variables.html#sysvar_validate_password.length">
validate_password.length
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="validate-password-options-variables.html#sysvar_validate_password.mixed_case_count">
validate_password.mixed_case_count
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="validate-password-options-variables.html#sysvar_validate_password.number_count">
validate_password.number_count
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="validate-password-options-variables.html#sysvar_validate_password.policy">
validate_password.policy
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="validate-password-options-variables.html#sysvar_validate_password.special_char_count">
validate_password.special_char_count
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_version">
version
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_version_comment">
version_comment
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_version_compile_machine">
version_compile_machine
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_version_compile_os">
version_compile_os
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_version_compile_zlib">
version_compile_zlib
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="version-tokens-reference.html#sysvar_version_tokens_session">
version_tokens_session
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="version-tokens-reference.html#sysvar_version_tokens_session_number">
version_tokens_session_number
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_wait_timeout">
wait_timeout
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_warning_count">
warning_count
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Session
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_windowing_use_high_precision">
windowing_use_high_precision
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="server-system-variables.html#sysvar_xa_detach_on_prepare">
xa_detach_on_prepare
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
</tbody>
</table>
</div>
<div class="table-contents">
<table cellpadding="0" cellspacing="0" style="position: fixed; top: 0px; display: none; left: 401px; width: 756px;">
<thead>
<tr>
<th scope="col" style="width: 472.031px;">
Name
</th>
<th scope="col" style="width: 43.6875px;">
Cmd-Line
</th>
<th scope="col" style="width: 56.0938px;">
Option File
</th>
<th scope="col" style="width: 58.6406px;">
System Var
</th>
<th scope="col" style="width: 54.8594px;">
Var Scope
</th>
<th scope="col" style="width: 69.2969px;">
Dynamic
</th>
</tr>
</thead>
</table>
</div>
</div>
<br class="table-break"/>
<p>
<span class="bold">
<strong>
Notes:
</strong>
</span>
</p>
<p>
1. This option is dynamic, but should be set only by server. You should not set this variable manually.
</p>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/mysql-cluster-ndbinfo.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a name="mysql-cluster-ndbinfo">
</a>
25.6.17 ndbinfo: The NDB Cluster Information Database
</h3>
</div>
</div>
</div>
<div class="toc">
<dl class="toc">
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-arbitrator-validity-detail.html">
25.6.17.1 The ndbinfo arbitrator_validity_detail Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-arbitrator-validity-summary.html">
25.6.17.2 The ndbinfo arbitrator_validity_summary Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-backup-id.html">
25.6.17.3 The ndbinfo backup_id Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-blobs.html">
25.6.17.4 The ndbinfo blobs Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-blocks.html">
25.6.17.5 The ndbinfo blocks Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-certificates.html">
25.6.17.6 The ndbinfo certificates Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-cluster-locks.html">
25.6.17.7 The ndbinfo cluster_locks Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-cluster-operations.html">
25.6.17.8 The ndbinfo cluster_operations Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-cluster-transactions.html">
25.6.17.9 The ndbinfo cluster_transactions Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-config-nodes.html">
25.6.17.10 The ndbinfo config_nodes Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-config-params.html">
25.6.17.11 The ndbinfo config_params Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-config-values.html">
25.6.17.12 The ndbinfo config_values Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-counters.html">
25.6.17.13 The ndbinfo counters Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-cpudata.html">
25.6.17.14 The ndbinfo cpudata Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-cpudata-1sec.html">
25.6.17.15 The ndbinfo cpudata_1sec Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-cpudata-20sec.html">
25.6.17.16 The ndbinfo cpudata_20sec Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-cpudata-50ms.html">
25.6.17.17 The ndbinfo cpudata_50ms Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-cpuinfo.html">
25.6.17.18 The ndbinfo cpuinfo Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-cpustat.html">
25.6.17.19 The ndbinfo cpustat Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-cpustat-50ms.html">
25.6.17.20 The ndbinfo cpustat_50ms Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-cpustat-1sec.html">
25.6.17.21 The ndbinfo cpustat_1sec Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-cpustat-20sec.html">
25.6.17.22 The ndbinfo cpustat_20sec Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-dictionary-columns.html">
25.6.17.23 The ndbinfo dictionary_columns Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-dictionary-tables.html">
25.6.17.24 The ndbinfo dictionary_tables Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-dict-obj-info.html">
25.6.17.25 The ndbinfo dict_obj_info Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-dict-obj-tree.html">
25.6.17.26 The ndbinfo dict_obj_tree Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-dict-obj-types.html">
25.6.17.27 The ndbinfo dict_obj_types Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-disk-write-speed-base.html">
25.6.17.28 The ndbinfo disk_write_speed_base Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-disk-write-speed-aggregate.html">
25.6.17.29 The ndbinfo disk_write_speed_aggregate Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-disk-write-speed-aggregate-node.html">
25.6.17.30 The ndbinfo disk_write_speed_aggregate_node Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-diskpagebuffer.html">
25.6.17.31 The ndbinfo diskpagebuffer Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-diskstat.html">
25.6.17.32 The ndbinfo diskstat Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-diskstats-1sec.html">
25.6.17.33 The ndbinfo diskstats_1sec Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-error-messages.html">
25.6.17.34 The ndbinfo error_messages Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-events.html">
25.6.17.35 The ndbinfo events Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-files.html">
25.6.17.36 The ndbinfo files Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-foreign-keys.html">
25.6.17.37 The ndbinfo foreign_keys Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-hash-maps.html">
25.6.17.38 The ndbinfo hash_maps Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-hwinfo.html">
25.6.17.39 The ndbinfo hwinfo Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-index-columns.html">
25.6.17.40 The ndbinfo index_columns Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-index-stats.html">
25.6.17.41 The ndbinfo index_stats Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-locks-per-fragment.html">
25.6.17.42 The ndbinfo locks_per_fragment Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-logbuffers.html">
25.6.17.43 The ndbinfo logbuffers Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-logspaces.html">
25.6.17.44 The ndbinfo logspaces Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-membership.html">
25.6.17.45 The ndbinfo membership Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-memoryusage.html">
25.6.17.46 The ndbinfo memoryusage Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-memory-per-fragment.html">
25.6.17.47 The ndbinfo memory_per_fragment Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-nodes.html">
25.6.17.48 The ndbinfo nodes Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-operations-per-fragment.html">
25.6.17.49 The ndbinfo operations_per_fragment Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-pgman-time-track-stats.html">
25.6.17.50 The ndbinfo pgman_time_track_stats Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-processes.html">
25.6.17.51 The ndbinfo processes Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-resources.html">
25.6.17.52 The ndbinfo resources Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-restart-info.html">
25.6.17.53 The ndbinfo restart_info Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-server-locks.html">
25.6.17.54 The ndbinfo server_locks Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-server-operations.html">
25.6.17.55 The ndbinfo server_operations Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-server-transactions.html">
25.6.17.56 The ndbinfo server_transactions Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-table-distribution-status.html">
25.6.17.57 The ndbinfo table_distribution_status Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-table-fragments.html">
25.6.17.58 The ndbinfo table_fragments Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-table-info.html">
25.6.17.59 The ndbinfo table_info Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-table-replicas.html">
25.6.17.60 The ndbinfo table_replicas Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-tc-time-track-stats.html">
25.6.17.61 The ndbinfo tc_time_track_stats Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-threadblocks.html">
25.6.17.62 The ndbinfo threadblocks Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-threads.html">
25.6.17.63 The ndbinfo threads Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-threadstat.html">
25.6.17.64 The ndbinfo threadstat Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-transporter-details.html">
25.6.17.65 The ndbinfo transporter_details Table
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-cluster-ndbinfo-transporters.html">
25.6.17.66 The ndbinfo transporters Table
</a>
</span>
</dt>
</dl>
</div>
<a class="indexterm" name="idm46045090673808">
</a>
<p>
<code class="literal">
ndbinfo
</code>
is a database containing information
specific to NDB Cluster.
</p>
<p>
This database contains a number of tables, each providing a
different sort of data about NDB Cluster node status, resource
usage, and operations. You can find more detailed information
about each of these tables in the next several sections.
</p>
<a class="indexterm" name="idm46045090670192">
</a>
<p>
<code class="literal">
ndbinfo
</code>
is included with NDB Cluster support in
the MySQL Server; no special compilation or configuration steps
are required; the tables are created by the MySQL Server when it
connects to the cluster. You can verify that
<code class="literal">
ndbinfo
</code>
support is active in a given MySQL
Server instance using
<a class="link" href="show-plugins.html" title="15.7.7.27 SHOW PLUGINS Statement">
<code class="literal">
SHOW PLUGINS
</code>
</a>
;
if
<code class="literal">
ndbinfo
</code>
support is enabled, you should see a
row containing
<code class="literal">
ndbinfo
</code>
in the
<code class="literal">
Name
</code>
column and
<code class="literal">
ACTIVE
</code>
in
the
<code class="literal">
Status
</code>
column, as shown here (emphasized
text):
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa62533786"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SHOW</span> <span class="token keyword">PLUGINS</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Name <span class="token punctuation">|</span> Status <span class="token punctuation">|</span> Type <span class="token punctuation">|</span> Library <span class="token punctuation">|</span> License <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> binlog <span class="token punctuation">|</span> ACTIVE <span class="token punctuation">|</span> STORAGE ENGINE <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> GPL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> sha256_password <span class="token punctuation">|</span> ACTIVE <span class="token punctuation">|</span> AUTHENTICATION <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> GPL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> caching_sha2_password <span class="token punctuation">|</span> ACTIVE <span class="token punctuation">|</span> AUTHENTICATION <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> GPL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> sha2_cache_cleaner <span class="token punctuation">|</span> ACTIVE <span class="token punctuation">|</span> AUDIT <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> GPL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> daemon_keyring_proxy_plugin <span class="token punctuation">|</span> ACTIVE <span class="token punctuation">|</span> DAEMON <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> GPL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> CSV <span class="token punctuation">|</span> ACTIVE <span class="token punctuation">|</span> STORAGE ENGINE <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> GPL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> MEMORY <span class="token punctuation">|</span> ACTIVE <span class="token punctuation">|</span> STORAGE ENGINE <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> GPL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> InnoDB <span class="token punctuation">|</span> ACTIVE <span class="token punctuation">|</span> STORAGE ENGINE <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> GPL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> INNODB_TRX <span class="token punctuation">|</span> ACTIVE <span class="token punctuation">|</span> INFORMATION SCHEMA <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> GPL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> INNODB_CMP <span class="token punctuation">|</span> ACTIVE <span class="token punctuation">|</span> INFORMATION SCHEMA <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> GPL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> INNODB_CMP_RESET <span class="token punctuation">|</span> ACTIVE <span class="token punctuation">|</span> INFORMATION SCHEMA <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> GPL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> INNODB_CMPMEM <span class="token punctuation">|</span> ACTIVE <span class="token punctuation">|</span> INFORMATION SCHEMA <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> GPL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> INNODB_CMPMEM_RESET <span class="token punctuation">|</span> ACTIVE <span class="token punctuation">|</span> INFORMATION SCHEMA <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> GPL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> INNODB_CMP_PER_INDEX <span class="token punctuation">|</span> ACTIVE <span class="token punctuation">|</span> INFORMATION SCHEMA <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> GPL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> INNODB_CMP_PER_INDEX_RESET <span class="token punctuation">|</span> ACTIVE <span class="token punctuation">|</span> INFORMATION SCHEMA <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> GPL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> INNODB_BUFFER_PAGE <span class="token punctuation">|</span> ACTIVE <span class="token punctuation">|</span> INFORMATION SCHEMA <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> GPL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> INNODB_BUFFER_PAGE_LRU <span class="token punctuation">|</span> ACTIVE <span class="token punctuation">|</span> INFORMATION SCHEMA <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> GPL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> INNODB_BUFFER_POOL_STATS <span class="token punctuation">|</span> ACTIVE <span class="token punctuation">|</span> INFORMATION SCHEMA <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> GPL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> INNODB_TEMP_TABLE_INFO <span class="token punctuation">|</span> ACTIVE <span class="token punctuation">|</span> INFORMATION SCHEMA <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> GPL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> INNODB_METRICS <span class="token punctuation">|</span> ACTIVE <span class="token punctuation">|</span> INFORMATION SCHEMA <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> GPL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> INNODB_FT_DEFAULT_STOPWORD <span class="token punctuation">|</span> ACTIVE <span class="token punctuation">|</span> INFORMATION SCHEMA <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> GPL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> INNODB_FT_DELETED <span class="token punctuation">|</span> ACTIVE <span class="token punctuation">|</span> INFORMATION SCHEMA <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> GPL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> INNODB_FT_BEING_DELETED <span class="token punctuation">|</span> ACTIVE <span class="token punctuation">|</span> INFORMATION SCHEMA <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> GPL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> INNODB_FT_CONFIG <span class="token punctuation">|</span> ACTIVE <span class="token punctuation">|</span> INFORMATION SCHEMA <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> GPL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> INNODB_FT_INDEX_CACHE <span class="token punctuation">|</span> ACTIVE <span class="token punctuation">|</span> INFORMATION SCHEMA <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> GPL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> INNODB_FT_INDEX_TABLE <span class="token punctuation">|</span> ACTIVE <span class="token punctuation">|</span> INFORMATION SCHEMA <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> GPL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> INNODB_TABLES <span class="token punctuation">|</span> ACTIVE <span class="token punctuation">|</span> INFORMATION SCHEMA <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> GPL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> INNODB_TABLESTATS <span class="token punctuation">|</span> ACTIVE <span class="token punctuation">|</span> INFORMATION SCHEMA <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> GPL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> INNODB_INDEXES <span class="token punctuation">|</span> ACTIVE <span class="token punctuation">|</span> INFORMATION SCHEMA <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> GPL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> INNODB_TABLESPACES <span class="token punctuation">|</span> ACTIVE <span class="token punctuation">|</span> INFORMATION SCHEMA <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> GPL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> INNODB_COLUMNS <span class="token punctuation">|</span> ACTIVE <span class="token punctuation">|</span> INFORMATION SCHEMA <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> GPL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> INNODB_VIRTUAL <span class="token punctuation">|</span> ACTIVE <span class="token punctuation">|</span> INFORMATION SCHEMA <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> GPL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> INNODB_CACHED_INDEXES <span class="token punctuation">|</span> ACTIVE <span class="token punctuation">|</span> INFORMATION SCHEMA <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> GPL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> INNODB_SESSION_TEMP_TABLESPACES <span class="token punctuation">|</span> ACTIVE <span class="token punctuation">|</span> INFORMATION SCHEMA <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> GPL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> MyISAM <span class="token punctuation">|</span> ACTIVE <span class="token punctuation">|</span> STORAGE ENGINE <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> GPL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> MRG_MYISAM <span class="token punctuation">|</span> ACTIVE <span class="token punctuation">|</span> STORAGE ENGINE <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> GPL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> PERFORMANCE_SCHEMA <span class="token punctuation">|</span> ACTIVE <span class="token punctuation">|</span> STORAGE ENGINE <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> GPL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> TempTable <span class="token punctuation">|</span> ACTIVE <span class="token punctuation">|</span> STORAGE ENGINE <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> GPL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> ARCHIVE <span class="token punctuation">|</span> ACTIVE <span class="token punctuation">|</span> STORAGE ENGINE <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> GPL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> BLACKHOLE <span class="token punctuation">|</span> ACTIVE <span class="token punctuation">|</span> STORAGE ENGINE <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> GPL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> ndbcluster <span class="token punctuation">|</span> ACTIVE <span class="token punctuation">|</span> STORAGE ENGINE <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> GPL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation"></span><em><span class="token punctuation">|</span> ndbinfo <span class="token punctuation">|</span> ACTIVE <span class="token punctuation">|</span> STORAGE ENGINE <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> GPL <span class="token punctuation">|</span></em><span class="token punctuation"></span></span>
<span class="token output"><span class="token punctuation">|</span> ndb_transid_mysql_connection_map <span class="token punctuation">|</span> ACTIVE <span class="token punctuation">|</span> INFORMATION SCHEMA <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> GPL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> ngram <span class="token punctuation">|</span> ACTIVE <span class="token punctuation">|</span> FTPARSER <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> GPL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> mysqlx_cache_cleaner <span class="token punctuation">|</span> ACTIVE <span class="token punctuation">|</span> AUDIT <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> GPL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> mysqlx <span class="token punctuation">|</span> ACTIVE <span class="token punctuation">|</span> DAEMON <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> GPL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> mysql_native_password <span class="token punctuation">|</span> ACTIVE <span class="token punctuation">|</span> AUTHENTICATION <span class="token punctuation">|</span> NULL <span class="token punctuation">|</span> GPL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output">47 rows in set (0.00 sec)</span></code></pre>
</div>
<p>
You can also do this by checking the output of
<a class="link" href="show-engines.html" title="15.7.7.17 SHOW ENGINES Statement">
<code class="literal">
SHOW ENGINES
</code>
</a>
for a line including
<code class="literal">
ndbinfo
</code>
in the
<code class="literal">
Engine
</code>
column
and
<code class="literal">
YES
</code>
in the
<code class="literal">
Support
</code>
column, as shown here (emphasized text):
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa31700780"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SHOW</span> <span class="token keyword">ENGINES</span>\G
<span class="token output"><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 1. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
Engine<span class="token punctuation">:</span> MEMORY
Support<span class="token punctuation">:</span> YES
Comment<span class="token punctuation">:</span> Hash based, stored in memory, useful for temporary tables
Transactions<span class="token punctuation">:</span> NO
XA<span class="token punctuation">:</span> NO
Savepoints<span class="token punctuation">:</span> NO
<span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 2. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
Engine<span class="token punctuation">:</span> InnoDB
Support<span class="token punctuation">:</span> DEFAULT
Comment<span class="token punctuation">:</span> Supports transactions, row-level locking, and foreign keys
Transactions<span class="token punctuation">:</span> YES
XA<span class="token punctuation">:</span> YES
Savepoints<span class="token punctuation">:</span> YES
<span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 3. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
Engine<span class="token punctuation">:</span> PERFORMANCE_SCHEMA
Support<span class="token punctuation">:</span> YES
Comment<span class="token punctuation">:</span> Performance Schema
Transactions<span class="token punctuation">:</span> NO
XA<span class="token punctuation">:</span> NO
Savepoints<span class="token punctuation">:</span> NO
<span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 4. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
Engine<span class="token punctuation">:</span> MyISAM
Support<span class="token punctuation">:</span> YES
Comment<span class="token punctuation">:</span> MyISAM storage engine
Transactions<span class="token punctuation">:</span> NO
XA<span class="token punctuation">:</span> NO
Savepoints<span class="token punctuation">:</span> NO
<span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 5. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
<em>Engine<span class="token punctuation">:</span> ndbinfo</em>
<em>Support<span class="token punctuation">:</span> YES</em>
Comment<span class="token punctuation">:</span> MySQL Cluster system information storage engine
Transactions<span class="token punctuation">:</span> NO
XA<span class="token punctuation">:</span> NO
Savepoints<span class="token punctuation">:</span> NO
<span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 6. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
Engine<span class="token punctuation">:</span> MRG_MYISAM
Support<span class="token punctuation">:</span> YES
Comment<span class="token punctuation">:</span> Collection of identical MyISAM tables
Transactions<span class="token punctuation">:</span> NO
XA<span class="token punctuation">:</span> NO
Savepoints<span class="token punctuation">:</span> NO
<span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 7. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
Engine<span class="token punctuation">:</span> BLACKHOLE
Support<span class="token punctuation">:</span> YES
Comment<span class="token punctuation">:</span> /dev/null storage engine (anything you write to it disappears)
Transactions<span class="token punctuation">:</span> NO
XA<span class="token punctuation">:</span> NO
Savepoints<span class="token punctuation">:</span> NO
<span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 8. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
Engine<span class="token punctuation">:</span> CSV
Support<span class="token punctuation">:</span> YES
Comment<span class="token punctuation">:</span> CSV storage engine
Transactions<span class="token punctuation">:</span> NO
XA<span class="token punctuation">:</span> NO
Savepoints<span class="token punctuation">:</span> NO
<span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 9. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
Engine<span class="token punctuation">:</span> ARCHIVE
Support<span class="token punctuation">:</span> YES
Comment<span class="token punctuation">:</span> Archive storage engine
Transactions<span class="token punctuation">:</span> NO
XA<span class="token punctuation">:</span> NO
Savepoints<span class="token punctuation">:</span> NO
<span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 10. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
Engine<span class="token punctuation">:</span> ndbcluster
Support<span class="token punctuation">:</span> YES
Comment<span class="token punctuation">:</span> Clustered, fault-tolerant tables
Transactions<span class="token punctuation">:</span> YES
XA<span class="token punctuation">:</span> NO
Savepoints<span class="token punctuation">:</span> NO
</span><span class="token output">10 rows in set (0.01 sec)</span></code></pre>
</div>
<p>
If
<code class="literal">
ndbinfo
</code>
support is enabled, then you can
access
<code class="literal">
ndbinfo
</code>
using SQL statements in
<a class="link" href="mysql.html" title="6.5.1 mysql — The MySQL Command-Line Client">
<span class="command">
<strong>
mysql
</strong>
</span>
</a>
or another MySQL client. For example, you
can see
<code class="literal">
ndbinfo
</code>
listed in the output of
<a class="link" href="show-databases.html" title="15.7.7.15 SHOW DATABASES Statement">
<code class="literal">
SHOW DATABASES
</code>
</a>
, as shown here
(emphasized text):
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa33720633"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SHOW</span> <span class="token keyword">DATABASES</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Database <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> information_schema <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> mysql <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation"></span><em><span class="token punctuation">|</span> ndbinfo <span class="token punctuation">|</span></em><span class="token punctuation"></span></span>
<span class="token output"><span class="token punctuation">|</span> performance_schema <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> sys <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output">5 rows in set (0.04 sec)</span></code></pre>
</div>
<p>
If the
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
process was not started with the
<a class="link" href="mysql-cluster-options-variables.html#option_mysqld_ndbcluster">
<code class="option">
--ndbcluster
</code>
</a>
option,
<code class="literal">
ndbinfo
</code>
is not available and is not displayed
by
<a class="link" href="show-databases.html" title="15.7.7.15 SHOW DATABASES Statement">
<code class="literal">
SHOW DATABASES
</code>
</a>
. If
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
was formerly connected to an NDB Cluster
but the cluster becomes unavailable (due to events such as cluster
shutdown, loss of network connectivity, and so forth),
<code class="literal">
ndbinfo
</code>
and its tables remain visible, but an
attempt to access any tables (other than
<code class="literal">
blocks
</code>
or
<code class="literal">
config_params
</code>
) fails with
<span class="errortext">
Got
error 157 'Connection to NDB failed' from NDBINFO
</span>
.
</p>
<p>
With the exception of the
<a class="link" href="mysql-cluster-ndbinfo-blocks.html" title="25.6.17.5 The ndbinfo blocks Table">
<code class="literal">
blocks
</code>
</a>
and
<a class="link" href="mysql-cluster-ndbinfo-config-params.html" title="25.6.17.11 The ndbinfo config_params Table">
<code class="literal">
config_params
</code>
</a>
tables, what
we refer to as
<code class="literal">
ndbinfo
</code>
<span class="quote">
“
<span class="quote">
tables
</span>
”
</span>
are actually views generated from internal
<a class="link" href="mysql-cluster.html" title="Chapter 25 MySQL NDB Cluster 8.4">
<code class="literal">
NDB
</code>
</a>
tables not normally visible to
the MySQL Server. You can make these tables visible by setting the
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndbinfo_show_hidden">
<code class="literal">
ndbinfo_show_hidden
</code>
</a>
system
variable to
<code class="literal">
ON
</code>
(or
<code class="literal">
1
</code>
), but
this is normally not necessary.
</p>
<p>
All
<code class="literal">
ndbinfo
</code>
tables are read-only, and are
generated on demand when queried. Because many of them are
generated in parallel by the data nodes while other are specific
to a given SQL node, they are not guaranteed to provide a
consistent snapshot.
</p>
<p>
In addition, pushing down of joins is not supported on
<code class="literal">
ndbinfo
</code>
tables; so joining large
<code class="literal">
ndbinfo
</code>
tables can require transfer of a large
amount of data to the requesting API node, even when the query
makes use of a
<code class="literal">
WHERE
</code>
clause.
</p>
<a class="indexterm" name="idm46045090612832">
</a>
<a class="indexterm" name="idm46045090611344">
</a>
<p>
<code class="literal">
ndbinfo
</code>
tables are not included in the query
cache. (Bug #59831)
</p>
<p>
You can select the
<code class="literal">
ndbinfo
</code>
database with a
<a class="link" href="use.html" title="15.8.4 USE Statement">
<code class="literal">
USE
</code>
</a>
statement, and then issue a
<a class="link" href="show-tables.html" title="15.7.7.39 SHOW TABLES Statement">
<code class="literal">
SHOW TABLES
</code>
</a>
statement to obtain a
list of tables, just as for any other database, like this:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa792111"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">USE</span> ndbinfo<span class="token punctuation">;</span>
<span class="token keyword">Database</span> <span class="token keyword">changed</span>
<span class="token prompt">mysql></span> <span class="token keyword">SHOW</span> <span class="token keyword">TABLES</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Tables_in_ndbinfo <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> arbitrator_validity_detail <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> arbitrator_validity_summary <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> backup_id <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> blobs <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> blocks <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> certificates <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> cluster_locks <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> cluster_operations <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> cluster_transactions <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> config_nodes <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> config_params <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> config_values <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> counters <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> cpudata <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> cpudata_1sec <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> cpudata_20sec <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> cpudata_50ms <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> cpuinfo <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> cpustat <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> cpustat_1sec <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> cpustat_20sec <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> cpustat_50ms <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> dict_obj_info <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> dict_obj_tree <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> dict_obj_types <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> dictionary_columns <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> dictionary_tables <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> disk_write_speed_aggregate <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> disk_write_speed_aggregate_node <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> disk_write_speed_base <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> diskpagebuffer <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> diskstat <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> diskstats_1sec <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> error_messages <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> events <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> files <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> foreign_keys <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> hash_maps <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> hwinfo <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> index_columns <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> index_stats <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> locks_per_fragment <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> logbuffers <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> logspaces <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> membership <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> memory_per_fragment <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> memoryusage <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> nodes <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> operations_per_fragment <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> pgman_time_track_stats <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> processes <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> resources <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> restart_info <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> server_locks <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> server_operations <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> server_transactions <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> table_distribution_status <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> table_fragments <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> table_info <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> table_replicas <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> tc_time_track_stats <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> threadblocks <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> threads <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> threadstat <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> transporter_details <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> transporters <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output">66 rows in set (0.00 sec)</span></code></pre>
</div>
<p>
All
<code class="literal">
ndbinfo
</code>
tables use the
<code class="literal">
NDB
</code>
storage engine; however, an
<code class="literal">
ndbinfo
</code>
entry still appears in the output of
<a class="link" href="show-engines.html" title="15.7.7.17 SHOW ENGINES Statement">
<code class="literal">
SHOW ENGINES
</code>
</a>
and
<a class="link" href="show-plugins.html" title="15.7.7.27 SHOW PLUGINS Statement">
<code class="literal">
SHOW PLUGINS
</code>
</a>
as described
previously.
</p>
<a class="indexterm" name="idm46045090594336">
</a>
<p>
You can execute
<a class="link" href="select.html" title="15.2.13 SELECT Statement">
<code class="literal">
SELECT
</code>
</a>
statements
against these tables, just as you would normally expect:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa35629905"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> <span class="token operator">*</span> <span class="token keyword">FROM</span> memoryusage<span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> node_id <span class="token punctuation">|</span> memory_type <span class="token punctuation">|</span> used <span class="token punctuation">|</span> used_pages <span class="token punctuation">|</span> total <span class="token punctuation">|</span> total_pages <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> 5 <span class="token punctuation">|</span> Data memory <span class="token punctuation">|</span> 425984 <span class="token punctuation">|</span> 13 <span class="token punctuation">|</span> 2147483648 <span class="token punctuation">|</span> 65536 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> 5 <span class="token punctuation">|</span> Long message buffer <span class="token punctuation">|</span> 393216 <span class="token punctuation">|</span> 1536 <span class="token punctuation">|</span> 67108864 <span class="token punctuation">|</span> 262144 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> 6 <span class="token punctuation">|</span> Data memory <span class="token punctuation">|</span> 425984 <span class="token punctuation">|</span> 13 <span class="token punctuation">|</span> 2147483648 <span class="token punctuation">|</span> 65536 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> 6 <span class="token punctuation">|</span> Long message buffer <span class="token punctuation">|</span> 393216 <span class="token punctuation">|</span> 1536 <span class="token punctuation">|</span> 67108864 <span class="token punctuation">|</span> 262144 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> 7 <span class="token punctuation">|</span> Data memory <span class="token punctuation">|</span> 425984 <span class="token punctuation">|</span> 13 <span class="token punctuation">|</span> 2147483648 <span class="token punctuation">|</span> 65536 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> 7 <span class="token punctuation">|</span> Long message buffer <span class="token punctuation">|</span> 393216 <span class="token punctuation">|</span> 1536 <span class="token punctuation">|</span> 67108864 <span class="token punctuation">|</span> 262144 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> 8 <span class="token punctuation">|</span> Data memory <span class="token punctuation">|</span> 425984 <span class="token punctuation">|</span> 13 <span class="token punctuation">|</span> 2147483648 <span class="token punctuation">|</span> 65536 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> 8 <span class="token punctuation">|</span> Long message buffer <span class="token punctuation">|</span> 393216 <span class="token punctuation">|</span> 1536 <span class="token punctuation">|</span> 67108864 <span class="token punctuation">|</span> 262144 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output">8 rows in set (0.09 sec)</span></code></pre>
</div>
<p>
More complex queries, such as the two following
<a class="link" href="select.html" title="15.2.13 SELECT Statement">
<code class="literal">
SELECT
</code>
</a>
statements using the
<a class="link" href="mysql-cluster-ndbinfo-memoryusage.html" title="25.6.17.46 The ndbinfo memoryusage Table">
<code class="literal">
memoryusage
</code>
</a>
table, are possible:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa18356496"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> <span class="token function">SUM</span><span class="token punctuation">(</span>used<span class="token punctuation">)</span> <span class="token keyword">as</span> <span class="token string">'Data Memory Used, All Nodes'</span>
<span class="token operator">></span> <span class="token keyword">FROM</span> memoryusage
<span class="token operator">></span> <span class="token keyword">WHERE</span> memory_type <span class="token operator">=</span> <span class="token string">'Data memory'</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Data Memory Used, All Nodes <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> 6460 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output">1 row in set (0.09 sec)</span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> <span class="token function">SUM</span><span class="token punctuation">(</span>used<span class="token punctuation">)</span> <span class="token keyword">as</span> <span class="token string">'Long Message Buffer, All Nodes'</span>
<span class="token operator">></span> <span class="token keyword">FROM</span> memoryusage
<span class="token operator">></span> <span class="token keyword">WHERE</span> memory_type <span class="token operator">=</span> <span class="token string">'Long message buffer'</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Long Message Buffer Used, All Nodes <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> 1179648 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output">1 row in set (0.08 sec)</span></code></pre>
</div>
<p>
<code class="literal">
ndbinfo
</code>
table and column names are
case-sensitive (as is the name of the
<code class="literal">
ndbinfo
</code>
database itself). These identifiers are in lowercase. Trying to
use the wrong lettercase results in an error, as shown in this
example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa93346723"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> <span class="token operator">*</span> <span class="token keyword">FROM</span> nodes<span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> node_id <span class="token punctuation">|</span> uptime <span class="token punctuation">|</span> status <span class="token punctuation">|</span> start_phase <span class="token punctuation">|</span> config_generation <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> 5 <span class="token punctuation">|</span> 17707 <span class="token punctuation">|</span> STARTED <span class="token punctuation">|</span> 0 <span class="token punctuation">|</span> 1 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> 6 <span class="token punctuation">|</span> 17706 <span class="token punctuation">|</span> STARTED <span class="token punctuation">|</span> 0 <span class="token punctuation">|</span> 1 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> 7 <span class="token punctuation">|</span> 17705 <span class="token punctuation">|</span> STARTED <span class="token punctuation">|</span> 0 <span class="token punctuation">|</span> 1 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> 8 <span class="token punctuation">|</span> 17704 <span class="token punctuation">|</span> STARTED <span class="token punctuation">|</span> 0 <span class="token punctuation">|</span> 1 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output">4 rows in set (0.06 sec)</span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> <span class="token operator">*</span> <span class="token keyword">FROM</span> Nodes<span class="token punctuation">;</span>
<span class="token output">ERROR 1146 (42S02)<span class="token punctuation">:</span> Table 'ndbinfo.Nodes' doesn't exist</span></code></pre>
</div>
<p>
<a class="link" href="mysqldump.html" title="6.5.4 mysqldump — A Database Backup Program">
<span class="command">
<strong>
mysqldump
</strong>
</span>
</a>
ignores the
<code class="literal">
ndbinfo
</code>
database entirely, and excludes it from
any output. This is true even when using the
<a class="link" href="mysqldump.html#option_mysqldump_databases">
<code class="option">
--databases
</code>
</a>
or
<a class="link" href="mysqldump.html#option_mysqldump_all-databases">
<code class="option">
--all-databases
</code>
</a>
option.
</p>
<p>
NDB Cluster also maintains tables in the
<code class="literal">
INFORMATION_SCHEMA
</code>
information database,
including the
<a class="link" href="information-schema-files-table.html" title="28.3.15 The INFORMATION_SCHEMA FILES Table">
<code class="literal">
FILES
</code>
</a>
table which
contains information about files used for NDB Cluster Disk Data
storage, and the
<a class="link" href="information-schema-ndb-transid-mysql-connection-map-table.html" title="28.3.18 The INFORMATION_SCHEMA ndb_transid_mysql_connection_map Table">
<code class="literal">
ndb_transid_mysql_connection_map
</code>
</a>
table, which shows the relationships between transactions,
transaction coordinators, and NDB Cluster API nodes. For more
information, see the descriptions of the tables or
<a class="xref" href="mysql-cluster-information-schema-tables.html" title="25.6.18 INFORMATION_SCHEMA Tables for NDB Cluster">
Section 25.6.18, “INFORMATION_SCHEMA Tables for NDB Cluster”
</a>
.
</p>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/backup-types.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title">
<a name="backup-types">
</a>
9.1 Backup and Recovery Types
</h2>
</div>
</div>
</div>
<p>
This section describes the characteristics of different types of
backups.
</p>
<h3>
<a name="idm46045231384208">
</a>
Physical (Raw) Versus Logical Backups
</h3>
<p>
Physical backups consist of raw copies of the directories and
files that store database contents. This type of backup is
suitable for large, important databases that need to be recovered
quickly when problems occur.
</p>
<p>
Logical backups save information represented as logical database
structure (
<a class="link" href="create-database.html" title="15.1.12 CREATE DATABASE Statement">
<code class="literal">
CREATE DATABASE
</code>
</a>
,
<a class="link" href="create-table.html" title="15.1.20 CREATE TABLE Statement">
<code class="literal">
CREATE TABLE
</code>
</a>
statements) and
content (
<a class="link" href="insert.html" title="15.2.7 INSERT Statement">
<code class="literal">
INSERT
</code>
</a>
statements or
delimited-text files). This type of backup is suitable for smaller
amounts of data where you might edit the data values or table
structure, or recreate the data on a different machine
architecture.
</p>
<p>
Physical backup methods have these characteristics:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
The backup consists of exact copies of database directories
and files. Typically this is a copy of all or part of the
MySQL data directory.
</p>
</li>
<li class="listitem">
<p>
Physical backup methods are faster than logical because they
involve only file copying without conversion.
</p>
</li>
<li class="listitem">
<p>
Output is more compact than for logical backup.
</p>
</li>
<li class="listitem">
<p>
Because backup speed and compactness are important for busy,
important databases, the MySQL Enterprise Backup product performs physical
backups. For an overview of the MySQL Enterprise Backup product, see
<a class="xref" href="mysql-enterprise-backup.html" title="32.1 MySQL Enterprise Backup Overview">
Section 32.1, “MySQL Enterprise Backup Overview”
</a>
.
</p>
</li>
<li class="listitem">
<p>
Backup and restore granularity ranges from the level of the
entire data directory down to the level of individual files.
This may or may not provide for table-level granularity,
depending on storage engine. For example,
<code class="literal">
InnoDB
</code>
tables can each be in a separate
file, or share file storage with other
<code class="literal">
InnoDB
</code>
tables; each
<code class="literal">
MyISAM
</code>
table corresponds uniquely to a set
of files.
</p>
</li>
<li class="listitem">
<p>
In addition to databases, the backup can include any related
files such as log or configuration files.
</p>
</li>
<li class="listitem">
<p>
Data from
<code class="literal">
MEMORY
</code>
tables is tricky to back
up this way because their contents are not stored on disk.
(The MySQL Enterprise Backup product has a feature where you can retrieve data
from
<code class="literal">
MEMORY
</code>
tables during a backup.)
</p>
</li>
<li class="listitem">
<p>
Backups are portable only to other machines that have
identical or similar hardware characteristics.
</p>
</li>
<li class="listitem">
<p>
Backups can be performed while the MySQL server is not
running. If the server is running, it is necessary to perform
appropriate locking so that the server does not change
database contents during the backup. MySQL Enterprise Backup does this locking
automatically for tables that require it.
</p>
</li>
<li class="listitem">
<p>
Physical backup tools include the
<span class="command">
<strong>
mysqlbackup
</strong>
</span>
of MySQL Enterprise Backup for
<code class="literal">
InnoDB
</code>
or any other tables, or file
system-level commands (such as
<span class="command">
<strong>
cp
</strong>
</span>
,
<span class="command">
<strong>
scp
</strong>
</span>
,
<span class="command">
<strong>
tar
</strong>
</span>
,
<span class="command">
<strong>
rsync
</strong>
</span>
) for
<code class="literal">
MyISAM
</code>
tables.
</p>
</li>
<li class="listitem">
<p>
For restore:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
MySQL Enterprise Backup restores
<code class="literal">
InnoDB
</code>
and other tables
that it backed up.
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="mysql-cluster-programs-ndb-restore.html" title="25.5.23 ndb_restore — Restore an NDB Cluster Backup">
<span class="command">
<strong>
ndb_restore
</strong>
</span>
</a>
restores
<a class="link" href="mysql-cluster.html" title="Chapter 25 MySQL NDB Cluster 8.4">
<code class="literal">
NDB
</code>
</a>
tables.
</p>
</li>
<li class="listitem">
<p>
Files copied at the file system level can be copied back
to their original locations with file system commands.
</p>
</li>
</ul>
</div>
</li>
</ul>
</div>
<p>
Logical backup methods have these characteristics:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
The backup is done by querying the MySQL server to obtain
database structure and content information.
</p>
</li>
<li class="listitem">
<p>
Backup is slower than physical methods because the server must
access database information and convert it to logical format.
If the output is written on the client side, the server must
also send it to the backup program.
</p>
</li>
<li class="listitem">
<p>
Output is larger than for physical backup, particularly when
saved in text format.
</p>
</li>
<li class="listitem">
<p>
Backup and restore granularity is available at the server
level (all databases), database level (all tables in a
particular database), or table level. This is true regardless
of storage engine.
</p>
</li>
<li class="listitem">
<p>
The backup does not include log or configuration files, or
other database-related files that are not part of databases.
</p>
</li>
<li class="listitem">
<p>
Backups stored in logical format are machine independent and
highly portable.
</p>
</li>
<li class="listitem">
<p>
Logical backups are performed with the MySQL server running.
The server is not taken offline.
</p>
</li>
<li class="listitem">
<p>
Logical backup tools include the
<a class="link" href="mysqldump.html" title="6.5.4 mysqldump — A Database Backup Program">
<span class="command">
<strong>
mysqldump
</strong>
</span>
</a>
program and the
<a class="link" href="select.html" title="15.2.13 SELECT Statement">
<code class="literal">
SELECT
... INTO OUTFILE
</code>
</a>
statement. These work for any
storage engine, even
<code class="literal">
MEMORY
</code>
.
</p>
</li>
<li class="listitem">
<p>
To restore logical backups, SQL-format dump files can be
processed using the
<a class="link" href="mysql.html" title="6.5.1 mysql — The MySQL Command-Line Client">
<span class="command">
<strong>
mysql
</strong>
</span>
</a>
client. To load
delimited-text files, use the
<a class="link" href="load-data.html" title="15.2.9 LOAD DATA Statement">
<code class="literal">
LOAD
DATA
</code>
</a>
statement or the
<a class="link" href="mysqlimport.html" title="6.5.5 mysqlimport — A Data Import Program">
<span class="command">
<strong>
mysqlimport
</strong>
</span>
</a>
client.
</p>
</li>
</ul>
</div>
<h3>
<a name="idm46045231335104">
</a>
Online Versus Offline Backups
</h3>
<p>
Online backups take place while the MySQL server is running so
that the database information can be obtained from the server.
Offline backups take place while the server is stopped. This
distinction can also be described as
<span class="quote">
“
<span class="quote">
hot
</span>
”
</span>
versus
<span class="quote">
“
<span class="quote">
cold
</span>
”
</span>
backups; a
<span class="quote">
“
<span class="quote">
warm
</span>
”
</span>
backup is one
where the server remains running but locked against modifying data
while you access database files externally.
</p>
<p>
Online backup methods have these characteristics:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
The backup is less intrusive to other clients, which can
connect to the MySQL server during the backup and may be able
to access data depending on what operations they need to
perform.
</p>
</li>
<li class="listitem">
<p>
Care must be taken to impose appropriate locking so that data
modifications do not take place that would compromise backup
integrity. The MySQL Enterprise Backup product does such locking automatically.
</p>
</li>
</ul>
</div>
<p>
Offline backup methods have these characteristics:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
Clients can be affected adversely because the server is
unavailable during backup. For that reason, such backups are
often taken from a replica that can be taken offline without
harming availability.
</p>
</li>
<li class="listitem">
<p>
The backup procedure is simpler because there is no
possibility of interference from client activity.
</p>
</li>
</ul>
</div>
<p>
A similar distinction between online and offline applies for
recovery operations, and similar characteristics apply. However,
it is more likely for clients to be affected by online recovery
than by online backup because recovery requires stronger locking.
During backup, clients might be able to read data while it is
being backed up. Recovery modifies data and does not just read it,
so clients must be prevented from accessing data while it is being
restored.
</p>
<h3>
<a name="idm46045231325680">
</a>
Local Versus Remote Backups
</h3>
<p>
A local backup is performed on the same host where the MySQL
server runs, whereas a remote backup is done from a different
host. For some types of backups, the backup can be initiated from
a remote host even if the output is written locally on the server.
host.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<a class="link" href="mysqldump.html" title="6.5.4 mysqldump — A Database Backup Program">
<span class="command">
<strong>
mysqldump
</strong>
</span>
</a>
can connect to local or remote
servers. For SQL output (
<code class="literal">
CREATE
</code>
and
<a class="link" href="insert.html" title="15.2.7 INSERT Statement">
<code class="literal">
INSERT
</code>
</a>
statements), local or
remote dumps can be done and generate output on the client.
For delimited-text output (with the
<a class="link" href="mysqldump.html#option_mysqldump_tab">
<code class="option">
--tab
</code>
</a>
option), data files
are created on the server host.
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="select-into.html" title="15.2.13.1 SELECT ... INTO Statement">
<code class="literal">
SELECT ... INTO
OUTFILE
</code>
</a>
can be initiated from a local or remote
client host, but the output file is created on the server
host.
</p>
</li>
<li class="listitem">
<p>
Physical backup methods typically are initiated locally on the
MySQL server host so that the server can be taken offline,
although the destination for copied files might be remote.
</p>
</li>
</ul>
</div>
<h3>
<a name="idm46045231315600">
</a>
Snapshot Backups
</h3>
<p>
Some file system implementations enable
<span class="quote">
“
<span class="quote">
snapshots
</span>
”
</span>
to be taken. These provide logical copies of the file system at a
given point in time, without requiring a physical copy of the
entire file system. (For example, the implementation may use
copy-on-write techniques so that only parts of the file system
modified after the snapshot time need be copied.) MySQL itself
does not provide the capability for taking file system snapshots.
It is available through third-party solutions such as Veritas,
LVM, or ZFS.
</p>
<h3>
<a name="idm46045231313520">
</a>
Full Versus Incremental Backups
</h3>
<p>
A full backup includes all data managed by a MySQL server at a
given point in time. An incremental backup consists of the changes
made to the data during a given time span (from one point in time
to another). MySQL has different ways to perform full backups,
such as those described earlier in this section. Incremental
backups are made possible by enabling the server's binary log,
which the server uses to record data changes.
</p>
<h3>
<a name="idm46045231311920">
</a>
Full Versus Point-in-Time (Incremental) Recovery
</h3>
<p>
A full recovery restores all data from a full backup. This
restores the server instance to the state that it had when the
backup was made. If that state is not sufficiently current, a full
recovery can be followed by recovery of incremental backups made
since the full backup, to bring the server to a more up-to-date
state.
</p>
<p>
Incremental recovery is recovery of changes made during a given
time span. This is also called point-in-time recovery because it
makes a server's state current up to a given time. Point-in-time
recovery is based on the binary log and typically follows a full
recovery from the backup files that restores the server to its
state when the backup was made. Then the data changes written in
the binary log files are applied as incremental recovery to redo
data modifications and bring the server up to the desired point in
time.
</p>
<h3>
<a name="idm46045231309040">
</a>
Table Maintenance
</h3>
<p>
Data integrity can be compromised if tables become corrupt. For
<a class="link" href="innodb-storage-engine.html" title="Chapter 17 The InnoDB Storage Engine">
<code class="literal">
InnoDB
</code>
</a>
tables, this is not a typical
issue. For programs to check
<a class="link" href="myisam-storage-engine.html" title="18.2 The MyISAM Storage Engine">
<code class="literal">
MyISAM
</code>
</a>
tables and repair them if problems are found, see
<a class="xref" href="myisam-table-maintenance.html" title="9.6 MyISAM Table Maintenance and Crash Recovery">
Section 9.6, “MyISAM Table Maintenance and Crash Recovery”
</a>
.
</p>
<h3>
<a name="idm46045231304560">
</a>
Backup Scheduling, Compression, and Encryption
</h3>
<p>
Backup scheduling is valuable for automating backup procedures.
Compression of backup output reduces space requirements, and
encryption of the output provides better security against
unauthorized access of backed-up data. MySQL itself does not
provide these capabilities. The MySQL Enterprise Backup product can compress
<code class="literal">
InnoDB
</code>
backups, and compression or encryption
of backup output can be achieved using file system utilities.
Other third-party solutions may be available.
</p>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/keyring-options.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title">
<a name="keyring-options">
</a>
8.4.4.15 Keyring Command Options
</h4>
</div>
</div>
</div>
<p>
MySQL supports the following keyring-related command-line
options:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<a name="option_mysqld_keyring-migration-destination">
</a>
<a class="link" href="keyring-options.html#option_mysqld_keyring-migration-destination">
<code class="option">
--keyring-migration-destination=
<em class="replaceable">
<code>
plugin
</code>
</em>
</code>
</a>
</p>
<a class="indexterm" name="idm46045239360176">
</a>
<a class="indexterm" name="idm46045239358672">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for keyring-migration-destination">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--keyring-migration-destination=plugin_name
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<p>
The destination keyring plugin or component for key
migration. See
<a class="xref" href="keyring-key-migration.html" title="8.4.4.11 Migrating Keys Between Keyring Keystores">
Section 8.4.4.11, “Migrating Keys Between Keyring Keystores”
</a>
. The
option value interpretation depends on whether
<a class="link" href="keyring-options.html#option_mysqld_keyring-migration-to-component">
<code class="option">
--keyring-migration-to-component
</code>
</a>
or
<a class="link" href="keyring-options.html#option_mysqld_keyring-migration-from-component">
<code class="option">
--keyring-migration-from-component
</code>
</a>
is specified:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
If
<code class="option">
--keyring-migration-to-component
</code>
is
used, the option value is a keyring plugin, interpreted
the same way as for
<a class="link" href="keyring-options.html#option_mysqld_keyring-migration-source">
<code class="option">
--keyring-migration-source
</code>
</a>
.
</p>
</li>
<li class="listitem">
<p>
If
<code class="option">
--keyring-migration-to-component
</code>
is
used, the option value is a keyring component, specified
as the component library name in the plugin directory,
including any platform-specific extension such as
<code class="filename">
.so
</code>
or
<code class="filename">
.dll
</code>
.
</p>
</li>
</ul>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
<a class="link" href="keyring-options.html#option_mysqld_keyring-migration-source">
<code class="option">
--keyring-migration-source
</code>
</a>
and
<a class="link" href="keyring-options.html#option_mysqld_keyring-migration-destination">
<code class="option">
--keyring-migration-destination
</code>
</a>
are mandatory for all keyring migration operations. The
source and destination must differ, and the migration
server must support both.
</p>
</div>
</li>
<li class="listitem">
<p>
<a name="option_mysqld_keyring-migration-from-component">
</a>
<a class="link" href="keyring-options.html#option_mysqld_keyring-migration-from-component">
<code class="option">
--keyring-migration-from-component
</code>
</a>
</p>
<a class="indexterm" name="idm46045239335280">
</a>
<a class="indexterm" name="idm46045239333776">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for keyring-migration-from-component">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--keyring-migration-from-component[={OFF|ON}]
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
OFF
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Indicates that a key migration is from a keyring component
to a keyring plugin. This option makes it possible to
migrate keys from a keyring component to a keyring plugin.
</p>
<p>
For migration from a keyring plugin to a keyring component,
use the
<a class="link" href="keyring-options.html#option_mysqld_keyring-migration-to-component">
<code class="option">
--keyring-migration-to-component
</code>
</a>
option. For key migration from one keyring component to
another, use the
<a class="link" href="mysql-migrate-keyring.html" title="6.6.8 mysql_migrate_keyring — Keyring Key Migration Utility">
<span class="command">
<strong>
mysql_migrate_keyring
</strong>
</span>
</a>
utility. See
<a class="xref" href="keyring-key-migration.html" title="8.4.4.11 Migrating Keys Between Keyring Keystores">
Section 8.4.4.11, “Migrating Keys Between Keyring Keystores”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqld_keyring-migration-host">
</a>
<a class="link" href="keyring-options.html#option_mysqld_keyring-migration-host">
<code class="option">
--keyring-migration-host=
<em class="replaceable">
<code>
host_name
</code>
</em>
</code>
</a>
</p>
<a class="indexterm" name="idm46045239315696">
</a>
<a class="indexterm" name="idm46045239314192">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for keyring-migration-host">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--keyring-migration-host=host_name
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
localhost
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
The host location of the running server that is currently
using one of the key migration keystores. See
<a class="xref" href="keyring-key-migration.html" title="8.4.4.11 Migrating Keys Between Keyring Keystores">
Section 8.4.4.11, “Migrating Keys Between Keyring Keystores”
</a>
. Migration always
occurs on the local host, so the option always specifies a
value for connecting to a local server, such as
<code class="literal">
localhost
</code>
,
<code class="literal">
127.0.0.1
</code>
,
<code class="literal">
::1
</code>
, or the local host IP address or host
name.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqld_keyring-migration-password">
</a>
<a class="link" href="keyring-options.html#option_mysqld_keyring-migration-password">
<code class="option">
--keyring-migration-password[=
<em class="replaceable">
<code>
password
</code>
</em>
]
</code>
</a>
</p>
<a class="indexterm" name="idm46045239296400">
</a>
<a class="indexterm" name="idm46045239294896">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for keyring-migration-password">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--keyring-migration-password[=password]
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<p>
The password of the MySQL account used for connecting to the
running server that is currently using one of the key
migration keystores. See
<a class="xref" href="keyring-key-migration.html" title="8.4.4.11 Migrating Keys Between Keyring Keystores">
Section 8.4.4.11, “Migrating Keys Between Keyring Keystores”
</a>
.
</p>
<p>
The password value is optional. If not given, the server
prompts for one. If given, there must be
<span class="emphasis">
<em>
no
space
</em>
</span>
between
<a class="link" href="keyring-options.html#option_mysqld_keyring-migration-password">
<code class="option">
--keyring-migration-password=
</code>
</a>
and the password following it. If no password option is
specified, the default is to send no password.
</p>
<p>
Specifying a password on the command line should be
considered insecure. See
<a class="xref" href="password-security-user.html" title="8.1.2.1 End-User Guidelines for Password Security">
Section 8.1.2.1, “End-User Guidelines for Password Security”
</a>
. You can use an
option file to avoid giving the password on the command
line. In this case, the file should have a restrictive mode
and be accessible only to the account used to run the
migration server.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqld_keyring-migration-port">
</a>
<a class="link" href="keyring-options.html#option_mysqld_keyring-migration-port">
<code class="option">
--keyring-migration-port=
<em class="replaceable">
<code>
port_num
</code>
</em>
</code>
</a>
</p>
<a class="indexterm" name="idm46045239278528">
</a>
<a class="indexterm" name="idm46045239277024">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for keyring-migration-port">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--keyring-migration-port=port_num
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Numeric
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
3306
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
For TCP/IP connections, the port number for connecting to
the running server that is currently using one of the key
migration keystores. See
<a class="xref" href="keyring-key-migration.html" title="8.4.4.11 Migrating Keys Between Keyring Keystores">
Section 8.4.4.11, “Migrating Keys Between Keyring Keystores”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqld_keyring-migration-socket">
</a>
<a class="link" href="keyring-options.html#option_mysqld_keyring-migration-socket">
<code class="option">
--keyring-migration-socket=
<em class="replaceable">
<code>
path
</code>
</em>
</code>
</a>
</p>
<a class="indexterm" name="idm46045239261728">
</a>
<a class="indexterm" name="idm46045239260224">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for keyring-migration-socket">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--keyring-migration-socket={file_name|pipe_name}
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<p>
For Unix socket file or Windows named pipe connections, the
socket file or named pipe for connecting to the running
server that is currently using one of the key migration
keystores. See
<a class="xref" href="keyring-key-migration.html" title="8.4.4.11 Migrating Keys Between Keyring Keystores">
Section 8.4.4.11, “Migrating Keys Between Keyring Keystores”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqld_keyring-migration-source">
</a>
<a class="link" href="keyring-options.html#option_mysqld_keyring-migration-source">
<code class="option">
--keyring-migration-source=
<em class="replaceable">
<code>
plugin
</code>
</em>
</code>
</a>
</p>
<a class="indexterm" name="idm46045239247312">
</a>
<a class="indexterm" name="idm46045239245808">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for keyring-migration-source">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--keyring-migration-source=plugin_name
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<p>
The source keyring plugin for key migration. See
<a class="xref" href="keyring-key-migration.html" title="8.4.4.11 Migrating Keys Between Keyring Keystores">
Section 8.4.4.11, “Migrating Keys Between Keyring Keystores”
</a>
.
</p>
<p>
The option value is similar to that for
<a class="link" href="server-options.html#option_mysqld_plugin-load">
<code class="option">
--plugin-load
</code>
</a>
, except that
only one plugin library can be specified. The value is given
as
<em class="replaceable">
<code>
plugin_library
</code>
</em>
or
<em class="replaceable">
<code>
name
</code>
</em>
<code class="literal">
=
</code>
<em class="replaceable">
<code>
plugin_library
</code>
</em>
,
where
<em class="replaceable">
<code>
plugin_library
</code>
</em>
is the name
of a library file that contains plugin code, and
<em class="replaceable">
<code>
name
</code>
</em>
is the name of a plugin to
load. If a plugin library is named without any preceding
plugin name, the server loads all plugins in the library.
With a preceding plugin name, the server loads only the
named plugin from the library. The server looks for plugin
library files in the directory named by the
<a class="link" href="server-system-variables.html#sysvar_plugin_dir">
<code class="literal">
plugin_dir
</code>
</a>
system variable.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
<a class="link" href="keyring-options.html#option_mysqld_keyring-migration-source">
<code class="option">
--keyring-migration-source
</code>
</a>
and
<a class="link" href="keyring-options.html#option_mysqld_keyring-migration-destination">
<code class="option">
--keyring-migration-destination
</code>
</a>
are mandatory for all keyring migration operations. The
source and destination plugins must differ, and the
migration server must support both plugins.
</p>
</div>
</li>
<li class="listitem">
<p>
<a name="option_mysqld_keyring-migration-to-component">
</a>
<a class="link" href="keyring-options.html#option_mysqld_keyring-migration-to-component">
<code class="option">
--keyring-migration-to-component
</code>
</a>
</p>
<a class="indexterm" name="idm46045239224464">
</a>
<a class="indexterm" name="idm46045239222960">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for keyring-migration-to-component">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--keyring-migration-to-component[={OFF|ON}]
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
OFF
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Indicates that a key migration is from a keyring plugin to a
keyring component. This option makes it possible to migrate
keys from a keyring plugin to a keyring component.
</p>
<p>
For migration from a keyring component to a keyring plugin,
use the
<a class="link" href="keyring-options.html#option_mysqld_keyring-migration-from-component">
<code class="option">
--keyring-migration-from-component
</code>
</a>
option. For key migration from one keyring component to
another, use the
<a class="link" href="mysql-migrate-keyring.html" title="6.6.8 mysql_migrate_keyring — Keyring Key Migration Utility">
<span class="command">
<strong>
mysql_migrate_keyring
</strong>
</span>
</a>
utility. See
<a class="xref" href="keyring-key-migration.html" title="8.4.4.11 Migrating Keys Between Keyring Keystores">
Section 8.4.4.11, “Migrating Keys Between Keyring Keystores”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqld_keyring-migration-user">
</a>
<a class="link" href="keyring-options.html#option_mysqld_keyring-migration-user">
<code class="option">
--keyring-migration-user=
<em class="replaceable">
<code>
user_name
</code>
</em>
</code>
</a>
</p>
<a class="indexterm" name="idm46045239204816">
</a>
<a class="indexterm" name="idm46045239203312">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for keyring-migration-user">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--keyring-migration-user=user_name
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<p>
The user name of the MySQL account used for connecting to
the running server that is currently using one of the key
migration keystores. See
<a class="xref" href="keyring-key-migration.html" title="8.4.4.11 Migrating Keys Between Keyring Keystores">
Section 8.4.4.11, “Migrating Keys Between Keyring Keystores”
</a>
.
</p>
</li>
</ul>
</div>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/replication-features-timezone.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title">
<a name="replication-features-timezone">
</a>
19.5.1.33 Replication and Time Zones
</h4>
</div>
</div>
</div>
<a class="indexterm" name="idm46045135061856">
</a>
<a class="indexterm" name="idm46045135060368">
</a>
<p>
By default, source and replica servers assume that they are in
the same time zone. If you are replicating between servers in
different time zones, the time zone must be set on both source
and replica. Otherwise, statements depending on the local time
on the source are not replicated properly, such as statements
that use the
<a class="link" href="date-and-time-functions.html#function_now">
<code class="literal">
NOW()
</code>
</a>
or
<a class="link" href="date-and-time-functions.html#function_from-unixtime">
<code class="literal">
FROM_UNIXTIME()
</code>
</a>
functions.
</p>
<p>
Verify that your combination of settings for the system time
zone (
<a class="link" href="server-system-variables.html#sysvar_system_time_zone">
<code class="literal">
system_time_zone
</code>
</a>
), server
current time zone (the global value of
<a class="link" href="server-system-variables.html#sysvar_time_zone">
<code class="literal">
time_zone
</code>
</a>
), and per-session
time zones (the session value of
<a class="link" href="server-system-variables.html#sysvar_time_zone">
<code class="literal">
time_zone
</code>
</a>
) on the source and
replica is producing the correct results. In particular, if the
<a class="link" href="server-system-variables.html#sysvar_time_zone">
<code class="literal">
time_zone
</code>
</a>
system variable is
set to the value
<code class="literal">
SYSTEM
</code>
, indicating that the
server time zone is the same as the system time zone, this can
cause the source and replica to apply different time zones. For
example, a source could write the following statement in the
binary log:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa67267700"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SET</span> <span class="token variable">@@session.time_zone</span><span class="token operator">=</span><span class="token string">'SYSTEM'</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
If this source and its replica have a different setting for
their system time zones, this statement can produce unexpected
results on the replica, even if the replica's global
<a class="link" href="server-system-variables.html#sysvar_time_zone">
<code class="literal">
time_zone
</code>
</a>
value has been set to
match the source's. For an explanation of MySQL Server's time
zone settings, and how to change them, see
<a class="xref" href="time-zone-support.html" title="7.1.15 MySQL Server Time Zone Support">
Section 7.1.15, “MySQL Server Time Zone Support”
</a>
.
</p>
<p>
See also
<a class="xref" href="replication-features-functions.html" title="19.5.1.14 Replication and System Functions">
Section 19.5.1.14, “Replication and System Functions”
</a>
.
</p>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/show-character-set.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title">
<a name="show-character-set">
</a>
15.7.7.4 SHOW CHARACTER SET Statement
</h4>
</div>
</div>
</div>
<a class="indexterm" name="idm46045171139120">
</a>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa46268649"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SHOW</span> {<span class="token keyword">CHARACTER</span> <span class="token keyword">SET</span> <span class="token operator">|</span> <span class="token keyword">CHARSET</span>}
<span class="token punctuation">[</span><span class="token operator">LIKE</span> <span class="token string">'<em class="replaceable">pattern</em>'</span> <span class="token operator">|</span> <span class="token keyword">WHERE</span> <em class="replaceable">expr</em><span class="token punctuation">]</span></code></pre>
</div>
<p>
The
<a class="link" href="show-character-set.html" title="15.7.7.4 SHOW CHARACTER SET Statement">
<code class="literal">
SHOW CHARACTER SET
</code>
</a>
statement
shows all available character sets. The
<a class="link" href="string-comparison-functions.html#operator_like">
<code class="literal">
LIKE
</code>
</a>
clause, if present, indicates
which character set names to match. The
<code class="literal">
WHERE
</code>
clause can be given to select rows using more general
conditions, as discussed in
<a class="xref" href="extended-show.html" title="28.8 Extensions to SHOW Statements">
Section 28.8, “Extensions to SHOW Statements”
</a>
. For
example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa6614027"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SHOW</span> <span class="token keyword">CHARACTER</span> <span class="token keyword">SET</span> <span class="token operator">LIKE</span> <span class="token string">'latin%'</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Charset <span class="token punctuation">|</span> Description <span class="token punctuation">|</span> Default collation <span class="token punctuation">|</span> Maxlen <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> latin1 <span class="token punctuation">|</span> cp1252 West European <span class="token punctuation">|</span> latin1_swedish_ci <span class="token punctuation">|</span> 1 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> latin2 <span class="token punctuation">|</span> ISO 8859<span class="token punctuation">-</span>2 Central European <span class="token punctuation">|</span> latin2_general_ci <span class="token punctuation">|</span> 1 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> latin5 <span class="token punctuation">|</span> ISO 8859<span class="token punctuation">-</span>9 Turkish <span class="token punctuation">|</span> latin5_turkish_ci <span class="token punctuation">|</span> 1 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> latin7 <span class="token punctuation">|</span> ISO 8859<span class="token punctuation">-</span>13 Baltic <span class="token punctuation">|</span> latin7_general_ci <span class="token punctuation">|</span> 1 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
<p>
<a class="link" href="show-character-set.html" title="15.7.7.4 SHOW CHARACTER SET Statement">
<code class="literal">
SHOW CHARACTER SET
</code>
</a>
output has
these columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<code class="literal">
Charset
</code>
</p>
<p>
The character set name.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
Description
</code>
</p>
<p>
A description of the character set.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
Default collation
</code>
</p>
<p>
The default collation for the character set.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
Maxlen
</code>
</p>
<p>
The maximum number of bytes required to store one character.
</p>
</li>
</ul>
</div>
<p>
The
<code class="literal">
filename
</code>
character set is for internal
use only; consequently,
<a class="link" href="show-character-set.html" title="15.7.7.4 SHOW CHARACTER SET Statement">
<code class="literal">
SHOW CHARACTER
SET
</code>
</a>
does not display it.
</p>
<p>
Character set information is also available from the
<code class="literal">
INFORMATION_SCHEMA
</code>
<a class="link" href="information-schema-character-sets-table.html" title="28.3.4 The INFORMATION_SCHEMA CHARACTER_SETS Table">
<code class="literal">
CHARACTER_SETS
</code>
</a>
table.
</p>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/information-schema-views-table.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a name="information-schema-views-table">
</a>
28.3.47 The INFORMATION_SCHEMA VIEWS Table
</h3>
</div>
</div>
</div>
<a class="indexterm" name="idm46045078024464">
</a>
<p>
The
<a class="link" href="information-schema-views-table.html" title="28.3.47 The INFORMATION_SCHEMA VIEWS Table">
<code class="literal">
VIEWS
</code>
</a>
table provides information
about views in databases. You must have the
<a class="link" href="privileges-provided.html#priv_show-view">
<code class="literal">
SHOW VIEW
</code>
</a>
privilege to access this
table.
</p>
<p>
The
<a class="link" href="information-schema-views-table.html" title="28.3.47 The INFORMATION_SCHEMA VIEWS Table">
<code class="literal">
VIEWS
</code>
</a>
table has these columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<code class="literal">
TABLE_CATALOG
</code>
</p>
<p>
The name of the catalog to which the view belongs. This value
is always
<code class="literal">
def
</code>
.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
TABLE_SCHEMA
</code>
</p>
<p>
The name of the schema (database) to which the view belongs.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
TABLE_NAME
</code>
</p>
<p>
The name of the view.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
VIEW_DEFINITION
</code>
</p>
<p>
The
<a class="link" href="select.html" title="15.2.13 SELECT Statement">
<code class="literal">
SELECT
</code>
</a>
statement that
provides the definition of the view. This column has most of
what you see in the
<code class="literal">
Create Table
</code>
column
that
<a class="link" href="show-create-view.html" title="15.7.7.14 SHOW CREATE VIEW Statement">
<code class="literal">
SHOW CREATE VIEW
</code>
</a>
produces.
Skip the words before
<a class="link" href="select.html" title="15.2.13 SELECT Statement">
<code class="literal">
SELECT
</code>
</a>
and skip the words
<code class="literal">
WITH CHECK OPTION
</code>
.
Suppose that the original statement was:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa45235563"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">CREATE</span> <span class="token keyword">VIEW</span> v <span class="token keyword">AS</span>
<span class="token keyword">SELECT</span> s2<span class="token punctuation">,</span>s1 <span class="token keyword">FROM</span> t
<span class="token keyword">WHERE</span> s1 <span class="token operator">></span> <span class="token number">5</span>
<span class="token keyword">ORDER</span> <span class="token keyword">BY</span> s1
<span class="token keyword">WITH</span> <span class="token keyword">CHECK</span> <span class="token keyword">OPTION</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
Then the view definition looks like this:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa73397262"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SELECT</span> s2<span class="token punctuation">,</span>s1 <span class="token keyword">FROM</span> t <span class="token keyword">WHERE</span> s1 <span class="token operator">></span> <span class="token number">5</span> <span class="token keyword">ORDER</span> <span class="token keyword">BY</span> s1</code></pre>
</div>
</li>
<li class="listitem">
<p>
<code class="literal">
CHECK_OPTION
</code>
</p>
<p>
The value of the
<code class="literal">
CHECK_OPTION
</code>
attribute.
The value is one of
<code class="literal">
NONE
</code>
,
<code class="literal">
CASCADE
</code>
, or
<code class="literal">
LOCAL
</code>
.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
IS_UPDATABLE
</code>
</p>
<p>
MySQL sets a flag, called the view updatability flag, at
<a class="link" href="create-view.html" title="15.1.23 CREATE VIEW Statement">
<code class="literal">
CREATE VIEW
</code>
</a>
time. The flag is
set to
<code class="literal">
YES
</code>
(true) if
<a class="link" href="update.html" title="15.2.17 UPDATE Statement">
<code class="literal">
UPDATE
</code>
</a>
and
<a class="link" href="delete.html" title="15.2.2 DELETE Statement">
<code class="literal">
DELETE
</code>
</a>
(and similar operations)
are legal for the view. Otherwise, the flag is set to
<code class="literal">
NO
</code>
(false). The
<code class="literal">
IS_UPDATABLE
</code>
column in the
<a class="link" href="information-schema-views-table.html" title="28.3.47 The INFORMATION_SCHEMA VIEWS Table">
<code class="literal">
VIEWS
</code>
</a>
table displays the status
of this flag. It means that the server always knows whether a
view is updatable.
</p>
<p>
If a view is not updatable, statements such
<a class="link" href="update.html" title="15.2.17 UPDATE Statement">
<code class="literal">
UPDATE
</code>
</a>
,
<a class="link" href="delete.html" title="15.2.2 DELETE Statement">
<code class="literal">
DELETE
</code>
</a>
, and
<a class="link" href="insert.html" title="15.2.7 INSERT Statement">
<code class="literal">
INSERT
</code>
</a>
are illegal and are
rejected. (Even if a view is updatable, it might not be
possible to insert into it; for details, refer to
<a class="xref" href="view-updatability.html" title="27.5.3 Updatable and Insertable Views">
Section 27.5.3, “Updatable and Insertable Views”
</a>
.)
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
DEFINER
</code>
</p>
<p>
The account of the user who created the view, in
<code class="literal">
'
<em class="replaceable">
<code>
user_name
</code>
</em>
'@'
<em class="replaceable">
<code>
host_name
</code>
</em>
'
</code>
format.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
SECURITY_TYPE
</code>
</p>
<p>
The view
<code class="literal">
SQL SECURITY
</code>
characteristic. The
value is one of
<code class="literal">
DEFINER
</code>
or
<code class="literal">
INVOKER
</code>
.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
CHARACTER_SET_CLIENT
</code>
</p>
<p>
The session value of the
<a class="link" href="server-system-variables.html#sysvar_character_set_client">
<code class="literal">
character_set_client
</code>
</a>
system
variable when the view was created.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
COLLATION_CONNECTION
</code>
</p>
<p>
The session value of the
<a class="link" href="server-system-variables.html#sysvar_collation_connection">
<code class="literal">
collation_connection
</code>
</a>
system
variable when the view was created.
</p>
</li>
</ul>
</div>
<h4>
<a name="idm46045077968720">
</a>
Notes
</h4>
<p>
MySQL permits different
<a class="link" href="server-system-variables.html#sysvar_sql_mode">
<code class="literal">
sql_mode
</code>
</a>
settings to tell the server the type of SQL syntax to support. For
example, you might use the
<a class="link" href="sql-mode.html#sqlmode_ansi">
<code class="literal">
ANSI
</code>
</a>
SQL mode to ensure MySQL correctly interprets the standard SQL
concatenation operator, the double bar (
<code class="literal">
||
</code>
), in
your queries. If you then create a view that concatenates items,
you might worry that changing the
<a class="link" href="server-system-variables.html#sysvar_sql_mode">
<code class="literal">
sql_mode
</code>
</a>
setting to a value
different from
<a class="link" href="sql-mode.html#sqlmode_ansi">
<code class="literal">
ANSI
</code>
</a>
could cause
the view to become invalid. But this is not the case. No matter
how you write out a view definition, MySQL always stores it the
same way, in a canonical form. Here is an example that shows how
the server changes a double bar concatenation operator to a
<a class="link" href="string-functions.html#function_concat">
<code class="literal">
CONCAT()
</code>
</a>
function:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa76485587"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SET</span> sql_mode <span class="token operator">=</span> <span class="token string">'ANSI'</span><span class="token punctuation">;</span>
<span class="token output">Query OK, 0 rows affected (0.00 sec)</span>
<span class="token prompt">mysql></span> <span class="token keyword">CREATE</span> <span class="token keyword">VIEW</span> test<span class="token punctuation">.</span>v <span class="token keyword">AS</span> <span class="token keyword">SELECT</span> <span class="token string">'a'</span> <span class="token operator">||</span> <span class="token string">'b'</span> <span class="token keyword">as</span> col1<span class="token punctuation">;</span>
<span class="token output">Query OK, 0 rows affected (0.00 sec)</span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> VIEW_DEFINITION <span class="token keyword">FROM</span> INFORMATION_SCHEMA<span class="token punctuation">.</span>VIEWS
<span class="token keyword">WHERE</span> TABLE_SCHEMA <span class="token operator">=</span> <span class="token string">'test'</span> <span class="token operator">AND</span> <span class="token keyword">TABLE_NAME</span> <span class="token operator">=</span> <span class="token string">'v'</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> VIEW_DEFINITION <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> select concat('a','b') AS `col1` <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output">1 row in set (0.00 sec)</span></code></pre>
</div>
<p>
The advantage of storing a view definition in canonical form is
that changes made later to the value of
<a class="link" href="server-system-variables.html#sysvar_sql_mode">
<code class="literal">
sql_mode
</code>
</a>
do not affect the
results from the view. However, an additional consequence is that
comments prior to
<a class="link" href="select.html" title="15.2.13 SELECT Statement">
<code class="literal">
SELECT
</code>
</a>
are
stripped from the definition by the server.
</p>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/performance-schema-user-defined-functions-table.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title">
<a name="performance-schema-user-defined-functions-table">
</a>
29.12.22.10 The user_defined_functions Table
</h4>
</div>
</div>
</div>
<a class="indexterm" name="idm46045066962528">
</a>
<a class="indexterm" name="idm46045066961024">
</a>
<p>
The
<a class="link" href="performance-schema-user-defined-functions-table.html" title="29.12.22.10 The user_defined_functions Table">
<code class="literal">
user_defined_functions
</code>
</a>
table
contains a row for each loadable function registered
automatically by a component or plugin, or manually by a
<a class="link" href="create-function-loadable.html" title="15.7.4.1 CREATE FUNCTION Statement for Loadable Functions">
<code class="literal">
CREATE
FUNCTION
</code>
</a>
statement. For information about operations
that add or remove table rows, see
<a class="xref" href="function-loading.html" title="7.7.1 Installing and Uninstalling Loadable Functions">
Section 7.7.1, “Installing and Uninstalling Loadable Functions”
</a>
.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
The name of the
<a class="link" href="performance-schema-user-defined-functions-table.html" title="29.12.22.10 The user_defined_functions Table">
<code class="literal">
user_defined_functions
</code>
</a>
table
stems from the terminology used at its inception for the
type of function now known as a loadable function (that is,
user-defined function, or UDF).
</p>
</div>
<p>
The
<a class="link" href="performance-schema-user-defined-functions-table.html" title="29.12.22.10 The user_defined_functions Table">
<code class="literal">
user_defined_functions
</code>
</a>
table
has these columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<code class="literal">
UDF_NAME
</code>
</p>
<p>
The function name as referred to in SQL statements. The
value is
<code class="literal">
NULL
</code>
if the function was
registered by a
<a class="link" href="create-function.html" title="15.1.14 CREATE FUNCTION Statement">
<code class="literal">
CREATE
FUNCTION
</code>
</a>
statement and is in the process of
unloading.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
UDF_RETURN_TYPE
</code>
</p>
<p>
The function return value type. The value is one of
<code class="literal">
int
</code>
,
<code class="literal">
decimal
</code>
,
<code class="literal">
real
</code>
,
<code class="literal">
char
</code>
, or
<code class="literal">
row
</code>
.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
UDF_TYPE
</code>
</p>
<p>
The function type. The value is one of
<code class="literal">
function
</code>
(scalar) or
<code class="literal">
aggregate
</code>
.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
UDF_LIBRARY
</code>
</p>
<p>
The name of the library file containing the executable
function code. The file is located in the directory named
by the
<a class="link" href="server-system-variables.html#sysvar_plugin_dir">
<code class="literal">
plugin_dir
</code>
</a>
system
variable. The value is
<code class="literal">
NULL
</code>
if the
function was registered by a component or plugin rather
than by a
<a class="link" href="create-function.html" title="15.1.14 CREATE FUNCTION Statement">
<code class="literal">
CREATE FUNCTION
</code>
</a>
statement.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
UDF_USAGE_COUNT
</code>
</p>
<p>
The current function usage count. This is used to tell
whether statements currently are accessing the function.
</p>
</li>
</ul>
</div>
<p>
The
<a class="link" href="performance-schema-user-defined-functions-table.html" title="29.12.22.10 The user_defined_functions Table">
<code class="literal">
user_defined_functions
</code>
</a>
table
has these indexes:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
Primary key on (
<code class="literal">
UDF_NAME
</code>
)
</p>
</li>
</ul>
</div>
<p>
<a class="link" href="truncate-table.html" title="15.1.37 TRUNCATE TABLE Statement">
<code class="literal">
TRUNCATE TABLE
</code>
</a>
is not permitted
for the
<a class="link" href="performance-schema-user-defined-functions-table.html" title="29.12.22.10 The user_defined_functions Table">
<code class="literal">
user_defined_functions
</code>
</a>
table.
</p>
<p>
The
<code class="literal">
mysql.func
</code>
system table also lists
installed loadable functions, but only those installed using
<a class="link" href="create-function-loadable.html" title="15.7.4.1 CREATE FUNCTION Statement for Loadable Functions">
<code class="literal">
CREATE
FUNCTION
</code>
</a>
. The
<a class="link" href="performance-schema-user-defined-functions-table.html" title="29.12.22.10 The user_defined_functions Table">
<code class="literal">
user_defined_functions
</code>
</a>
table
lists loadable functions installed using
<a class="link" href="create-function-loadable.html" title="15.7.4.1 CREATE FUNCTION Statement for Loadable Functions">
<code class="literal">
CREATE
FUNCTION
</code>
</a>
as well as loadable functions installed
automatically by components or plugins. This difference makes
<a class="link" href="performance-schema-user-defined-functions-table.html" title="29.12.22.10 The user_defined_functions Table">
<code class="literal">
user_defined_functions
</code>
</a>
preferable
to
<code class="literal">
mysql.func
</code>
for checking which loadable
functions are installed.
</p>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/replication-gtids-howto.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title">
<a name="replication-gtids-howto">
</a>
19.1.3.4 Setting Up Replication Using GTIDs
</h4>
</div>
</div>
</div>
<a class="indexterm" name="idm46045146049808">
</a>
<p>
This section describes a process for configuring and starting
GTID-based replication in MySQL 8.4. This is a
<span class="quote">
“
<span class="quote">
cold start
</span>
”
</span>
procedure that assumes either that you
are starting the source server for the first time, or that it is
possible to stop it; for information about provisioning replicas
using GTIDs from a running source server, see
<a class="xref" href="replication-gtids-failover.html" title="19.1.3.5 Using GTIDs for Failover and Scaleout">
Section 19.1.3.5, “Using GTIDs for Failover and Scaleout”
</a>
. For information
about changing GTID mode on servers online, see
<a class="xref" href="replication-mode-change-online.html" title="19.1.4 Changing GTID Mode on Online Servers">
Section 19.1.4, “Changing GTID Mode on Online Servers”
</a>
.
</p>
<p>
The key steps in this startup process for the simplest possible
GTID replication topology, consisting of one source and one
replica, are as follows:
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1">
<li class="listitem">
<p>
If replication is already running, synchronize both servers by
making them read-only.
</p>
</li>
<li class="listitem">
<p>
Stop both servers.
</p>
</li>
<li class="listitem">
<p>
Restart both servers with GTIDs enabled and the correct
options configured.
</p>
<p>
The
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
options necessary to start the
servers as described are discussed in the example that follows
later in this section.
</p>
</li>
<li class="listitem">
<p>
Instruct the replica to use the source as the replication data
source and to use auto-positioning. The SQL statements needed
to accomplish this step are described in the example that
follows later in this section.
</p>
</li>
<li class="listitem">
<p>
Take a new backup. Binary logs containing transactions without
GTIDs cannot be used on servers where GTIDs are enabled, so
backups taken before this point cannot be used with your new
configuration.
</p>
</li>
<li class="listitem">
<p>
Start the replica, then disable read-only mode on both
servers, so that they can accept updates.
</p>
</li>
</ol>
</div>
<p>
In the following example, two servers are already running as
source and replica, using MySQL's binary log position-based
replication protocol. If you are starting with new servers, see
<a class="xref" href="replication-howto-repuser.html" title="19.1.2.3 Creating a User for Replication">
Section 19.1.2.3, “Creating a User for Replication”
</a>
for information about
adding a specific user for replication connections and
<a class="xref" href="replication-howto-masterbaseconfig.html" title="19.1.2.1 Setting the Replication Source Configuration">
Section 19.1.2.1, “Setting the Replication Source Configuration”
</a>
for
information about setting the
<a class="link" href="replication-options.html#sysvar_server_id">
<code class="literal">
server_id
</code>
</a>
variable. The following
examples show how to store
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
startup
options in server's option file, see
<a class="xref" href="option-files.html" title="6.2.2.2 Using Option Files">
Section 6.2.2.2, “Using Option Files”
</a>
for more information. Alternatively
you can use startup options when running
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
.
</p>
<p>
Most of the steps that follow require the use of the MySQL
<code class="literal">
root
</code>
account or another MySQL user account that
has the
<a class="link" href="privileges-provided.html#priv_super">
<code class="literal">
SUPER
</code>
</a>
privilege.
<a class="link" href="mysqladmin.html" title="6.5.2 mysqladmin — A MySQL Server Administration Program">
<span class="command">
<strong>
mysqladmin
</strong>
</span>
</a>
<code class="literal">
shutdown
</code>
requires
either the
<code class="literal">
SUPER
</code>
privilege or the
<a class="link" href="privileges-provided.html#priv_shutdown">
<code class="literal">
SHUTDOWN
</code>
</a>
privilege.
</p>
<p>
<b>
Step 1: Synchronize the servers.
</b>
This step is only required when working with servers which are
already replicating without using GTIDs. For new servers proceed
to Step 3. Make the servers read-only by setting the
<a class="link" href="server-system-variables.html#sysvar_read_only">
<code class="literal">
read_only
</code>
</a>
system variable to
<code class="literal">
ON
</code>
on each server by issuing the following:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa9126271"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SET</span> <span class="token variable">@@GLOBAL.read_only</span> <span class="token operator">=</span> <span class="token keyword">ON</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
Wait for all ongoing transactions to commit or roll back. Then,
allow the replica to catch up with the source.
<span class="emphasis">
<em>
It is
extremely important that you make sure the replica has processed
all updates before continuing
</em>
</span>
.
</p>
<p>
If you use binary logs for anything other than replication, for
example to do point in time backup and restore, wait until you do
not need the old binary logs containing transactions without
GTIDs. Ideally, wait for the server to purge all binary logs, and
wait for any existing backup to expire.
</p>
<div class="important" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Important
</div>
<p>
It is important to understand that logs containing transactions
without GTIDs cannot be used on servers where GTIDs are enabled.
Before proceeding, you must be sure that transactions without
GTIDs do not exist anywhere in the topology.
</p>
</div>
<p>
<b>
Step 2: Stop both servers.
</b>
Stop each server using
<a class="link" href="mysqladmin.html" title="6.5.2 mysqladmin — A MySQL Server Administration Program">
<span class="command">
<strong>
mysqladmin
</strong>
</span>
</a>
as shown
here, where
<em class="replaceable">
<code>
username
</code>
</em>
is the user name
for a MySQL user having sufficient privileges to shut down the
server:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa63420754"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal"><span class="token prompt">$> </span><span class="token command">mysqladmin</span> <span class="token property">-u<em class="replaceable">username</em></span> <span class="token property">-p</span> shutdown</code></pre>
</div>
<p>
Then supply this user's password at the prompt.
</p>
<p>
<b>
Step 3: Start both servers with GTIDs enabled.
</b>
To enable GTID-based replication, each server must be started
with GTID mode enabled by setting the
<a class="link" href="replication-options-gtids.html#sysvar_gtid_mode">
<code class="literal">
gtid_mode
</code>
</a>
variable to
<code class="literal">
ON
</code>
, and with the
<a class="link" href="replication-options-gtids.html#sysvar_enforce_gtid_consistency">
<code class="literal">
enforce_gtid_consistency
</code>
</a>
variable enabled to ensure that only statements which are safe
for GTID-based replication are logged. For example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-ini"><div class="docs-select-all right" id="sa91255443"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-ini"><span class="token constant">gtid_mode</span><span class="token attr-value"><span class="token punctuation">=</span>ON</span>
<span class="token constant">enforce-gtid-consistency</span><span class="token attr-value"><span class="token punctuation">=</span>ON</span></code></pre>
</div>
<p>
Start each replica with
<a class="link" href="replication-options-replica.html#option_mysqld_skip-replica-start">
<code class="option">
--skip-replica-start
</code>
</a>
. For more
information on GTID related options and variables, see
<a class="xref" href="replication-options-gtids.html" title="19.1.6.5 Global Transaction ID System Variables">
Section 19.1.6.5, “Global Transaction ID System Variables”
</a>
.
</p>
<p>
It is not mandatory to have binary logging enabled in order to use
GTIDs when using the
<a class="xref" href="replication-gtids-concepts.html#replication-gtids-gtid-executed-table" title="mysql.gtid_executed Table">
mysql.gtid_executed Table
</a>
. Source
servers must always have binary logging enabled in order to be
able to replicate. However, replica servers can use GTIDs but
without binary logging. If you need to disable binary logging on a
replica server, you can do this by specifying the
<a class="link" href="replication-options-binary-log.html#option_mysqld_log-bin">
<code class="option">
--skip-log-bin
</code>
</a>
and
<a class="link" href="replication-options-binary-log.html#sysvar_log_replica_updates">
<code class="option">
--log-replica-updates=OFF
</code>
</a>
options for the replica.
</p>
<p>
<b>
Step 4: Configure the replica to use GTID-based auto-positioning.
</b>
Tell the replica to use the source with GTID based transactions
as the replication data source, and to use GTID-based
auto-positioning rather than file-based positioning. Issue a
<a class="link" href="change-replication-source-to.html" title="15.4.2.2 CHANGE REPLICATION SOURCE TO Statement">
<code class="literal">
CHANGE REPLICATION SOURCE TO
</code>
</a>
on
the replica, including the
<code class="literal">
SOURCE_AUTO_POSITION
</code>
option in the statement
to tell the replica that the source's transactions are
identified by GTIDs.
</p>
<p>
You may also need to supply appropriate values for the
source's host name and port number as well as the user name
and password for a replication user account which can be used by
the replica to connect to the source; if these have already been
set prior to Step 1 and no further changes need to be made, the
corresponding options can safely be omitted from the statement
shown here.
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa44207064"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">CHANGE</span> <span class="token keyword">REPLICATION</span> <span class="token keyword">SOURCE</span> <span class="token keyword">TO</span>
<span class="token operator">></span> <span class="token keyword">SOURCE_HOST</span> <span class="token operator">=</span> <span class="token keyword"><em class="replaceable">host</em></span><span class="token punctuation">,</span>
<span class="token operator">></span> <span class="token keyword">SOURCE_PORT</span> <span class="token operator">=</span> <span class="token keyword"><em class="replaceable">port</em></span><span class="token punctuation">,</span>
<span class="token operator">></span> <span class="token keyword">SOURCE_USER</span> <span class="token operator">=</span> <span class="token keyword"><em class="replaceable">user</em></span><span class="token punctuation">,</span>
<span class="token operator">></span> <span class="token keyword">SOURCE_PASSWORD</span> <span class="token operator">=</span> <span class="token keyword"><em class="replaceable">password</em></span><span class="token punctuation">,</span>
<span class="token operator">></span> <span class="token keyword">SOURCE_AUTO_POSITION</span> <span class="token operator">=</span> <span class="token number">1</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
<b>
Step 5: Take a new backup.
</b>
Existing backups that were made before you enabled GTIDs can no
longer be used on these servers now that you have enabled GTIDs.
Take a new backup at this point, so that you are not left
without a usable backup.
</p>
<p>
For instance, you can execute
<a class="link" href="flush.html#flush-logs">
<code class="literal">
FLUSH
LOGS
</code>
</a>
on the server where you are taking backups. Then
either explicitly take a backup or wait for the next iteration of
any periodic backup routine you may have set up.
</p>
<p>
<b>
Step 6: Start the replica and disable read-only mode.
</b>
Start the replica like this:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa58110739"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">START</span> <span class="token keyword">REPLICA</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
The following step is only necessary if you configured a server to
be read-only in Step 1. To allow the server to begin accepting
updates again, issue the following statement:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa86185816"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SET</span> <span class="token variable">@@GLOBAL.read_only</span> <span class="token operator">=</span> <span class="token keyword">OFF</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
GTID-based replication should now be running, and you can begin
(or resume) activity on the source as before.
<a class="xref" href="replication-gtids-failover.html" title="19.1.3.5 Using GTIDs for Failover and Scaleout">
Section 19.1.3.5, “Using GTIDs for Failover and Scaleout”
</a>
, discusses creation
of new replicas when using GTIDs.
</p>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/enterprise-encryption-configuring.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a name="enterprise-encryption-configuring">
</a>
8.6.2 Configuring MySQL Enterprise Encryption
</h3>
</div>
</div>
</div>
<p>
MySQL Enterprise Encryption lets you limit keys to a length that provides adequate
security for your requirements while balancing this with resource
usage. You can also configure the functions provided by the
<code class="literal">
component_enterprise_encryption
</code>
component to
support decryption and verification for content produced by the
old
<code class="literal">
openssl_udf
</code>
shared library functions.
</p>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title">
<a name="idm46045231943296">
</a>
Decryption Support By Component Functions For Legacy Functions
</h4>
</div>
</div>
</div>
<p>
By default, the functions provided by the
<code class="literal">
component_enterprise_encryption
</code>
component do
not decrypt encrypted text, or verify signatures, that were
produced by the legacy functions provided in earlier releases by
the
<code class="literal">
openssl_udf
</code>
shared library. The component
functions assume that encrypted text uses the RSAES-OAEP padding
scheme, and signatures use the RSASSA-PSS signature scheme.
However, encrypted text produced by the legacy functions uses
the RSAES-PKCS1-v1_5 padding scheme, and signatures produced by
the legacy functions use the RSASSA-PKCS1-v1_5 signature scheme.
</p>
<p>
If you want the component functions to support content produced
by the legacy functions, set the
<a class="link" href="server-system-variables.html#sysvar_enterprise_encryption.rsa_support_legacy_padding">
<code class="literal">
enterprise_encryption.rsa_support_legacy_padding
</code>
</a>
system variable to
<code class="literal">
ON
</code>
. This variable is
available when the component is installed. When you set it to
<code class="literal">
ON
</code>
, the component functions first attempt to
decrypt or verify content assuming it has their normal schemes.
If that does not work, they also attempt to decrypt or verify
the content assuming it has the schemes used by the old
functions. This behavior is not the default because it increases
the time taken to process content that cannot be decrypted or
verified at all. If you are not handling content produced by the
old functions, let the system variable default to
<code class="literal">
OFF
</code>
.
</p>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title">
<a name="idm46045231935472">
</a>
Key Length Limits
</h4>
</div>
</div>
</div>
<p>
The amount of CPU resources required by MySQL Enterprise Encryption's key
generation functions increases as the key length increases. For
some installations, this might result in unacceptable CPU usage
if applications frequently generate excessively long keys.
</p>
<p>
The functions provided by the
<code class="literal">
component_enterprise_encryption
</code>
component
have a minimum key length of 2048 bits for RSA keys, which is in
line with current best practice for minimum key lengths. The
<a class="link" href="server-system-variables.html#sysvar_enterprise_encryption.maximum_rsa_key_size">
<code class="literal">
enterprise_encryption.maximum_rsa_key_size
</code>
</a>
system variable specifies the maximum key size.
</p>
</div>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/optimizer-issues.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a name="optimizer-issues">
</a>
B.3.5 Optimizer-Related Issues
</h3>
</div>
</div>
</div>
<p>
MySQL uses a cost-based optimizer to determine the best way to
resolve a query. In many cases, MySQL can calculate the best
possible query plan, but sometimes MySQL does not have enough
information about the data at hand and has to make
<span class="quote">
“
<span class="quote">
educated
</span>
”
</span>
guesses about the data.
</p>
<p>
For the cases when MySQL does not do the "right" thing, tools
that you have available to help MySQL are:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
Use the
<a class="link" href="explain.html" title="15.8.2 EXPLAIN Statement">
<code class="literal">
EXPLAIN
</code>
</a>
statement to
get information about how MySQL processes a query. To use
it, just add the keyword
<a class="link" href="explain.html" title="15.8.2 EXPLAIN Statement">
<code class="literal">
EXPLAIN
</code>
</a>
to the front of your
<a class="link" href="select.html" title="15.2.13 SELECT Statement">
<code class="literal">
SELECT
</code>
</a>
statement:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa46744851"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">EXPLAIN</span> <span class="token keyword">SELECT</span> <span class="token operator">*</span> <span class="token keyword">FROM</span> t1<span class="token punctuation">,</span> t2 <span class="token keyword">WHERE</span> t1<span class="token punctuation">.</span>i <span class="token operator">=</span> t2<span class="token punctuation">.</span>i<span class="token punctuation">;</span></code></pre>
</div>
<p>
<a class="link" href="explain.html" title="15.8.2 EXPLAIN Statement">
<code class="literal">
EXPLAIN
</code>
</a>
is discussed in more
detail in
<a class="xref" href="explain.html" title="15.8.2 EXPLAIN Statement">
Section 15.8.2, “EXPLAIN Statement”
</a>
.
</p>
</li>
<li class="listitem">
<p>
Use
<code class="literal">
ANALYZE TABLE
<em class="replaceable">
<code>
tbl_name
</code>
</em>
</code>
to update the
key distributions for the scanned table. See
<a class="xref" href="analyze-table.html" title="15.7.3.1 ANALYZE TABLE Statement">
Section 15.7.3.1, “ANALYZE TABLE Statement”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a class="indexterm" name="idm46045053391168">
</a>
Use
<code class="literal">
FORCE INDEX
</code>
for the scanned table to
tell MySQL that table scans are very expensive compared to
using the given index:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa75674840"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SELECT</span> <span class="token operator">*</span> <span class="token keyword">FROM</span> t1<span class="token punctuation">,</span> t2 <span class="token keyword">FORCE</span> <span class="token keyword">INDEX</span> <span class="token punctuation">(</span>index_for_column<span class="token punctuation">)</span>
<span class="token keyword">WHERE</span> t1<span class="token punctuation">.</span>col_name<span class="token operator">=</span>t2<span class="token punctuation">.</span>col_name<span class="token punctuation">;</span></code></pre>
</div>
<p>
<code class="literal">
USE INDEX
</code>
and
<code class="literal">
IGNORE
INDEX
</code>
may also be useful. See
<a class="xref" href="index-hints.html" title="10.9.4 Index Hints">
Section 10.9.4, “Index Hints”
</a>
.
</p>
</li>
<li class="listitem">
<p>
Global and table-level
<code class="literal">
STRAIGHT_JOIN
</code>
. See
<a class="xref" href="select.html" title="15.2.13 SELECT Statement">
Section 15.2.13, “SELECT Statement”
</a>
.
</p>
</li>
<li class="listitem">
<p>
You can tune global or thread-specific system variables. For
example, start
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
with the
<a class="link" href="server-system-variables.html#sysvar_max_seeks_for_key">
<code class="option">
--max-seeks-for-key=1000
</code>
</a>
option or use
<code class="literal">
SET max_seeks_for_key=1000
</code>
to tell the optimizer to assume that no key scan causes more
than 1,000 key seeks. See
<a class="xref" href="server-system-variables.html" title="7.1.8 Server System Variables">
Section 7.1.8, “Server System Variables”
</a>
.
</p>
</li>
</ul>
</div>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/group-replication-user-credentials.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title">
<a name="group-replication-user-credentials">
</a>
20.2.1.3 User Credentials For Distributed Recovery
</h4>
</div>
</div>
</div>
<a class="indexterm" name="idm46045134177200">
</a>
<p>
Group Replication uses a distributed recovery process to
synchronize group members when joining them to the group.
Distributed recovery involves transferring transactions from a
donor's binary log to a joining member using a replication
channel named
<code class="literal">
group_replication_recovery
</code>
. You
must therefore set up a replication user with the correct
permissions so that Group Replication can establish direct
member-to-member replication channels. If group members have
been set up to support the use of a remote cloning operation as
part of distributed recovery, this replication user is also used
as the clone user on the donor, and requires the correct
permissions for this role too. For a complete description of
distributed recovery, see
<a class="xref" href="group-replication-distributed-recovery.html" title="20.5.4 Distributed Recovery">
Section 20.5.4, “Distributed Recovery”
</a>
.
</p>
<p>
The same replication user must be used for distributed recovery
on every group member. The process of creating the replication
user for distributed recovery can be captured in the binary log,
and then you can rely on distributed recovery to replicate the
statements used to create the user. Alternatively, you can
disable binary logging before creating the replication user, and
then create the user manually on each member, for example if you
want to avoid the changes being propagated to other server
instances. If you do this, ensure you re-enable binary logging
once you have configured the user.
</p>
<div class="important" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Important
</div>
<p>
If distributed recovery connections for your group use SSL,
the replication user must be created on each server
<span class="emphasis">
<em>
before
</em>
</span>
the joining member connects to the
donor. For instructions to set up SSL for distributed recovery
connections and create a replication user that requires SSL,
see
<a class="xref" href="group-replication-distributed-recovery-securing.html" title="20.6.3 Securing Distributed Recovery Connections">
Section 20.6.3, “Securing Distributed Recovery Connections”
</a>
</p>
</div>
<div class="important" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Important
</div>
<p>
By default, users created in MySQL 8 use
<a class="xref" href="caching-sha2-pluggable-authentication.html" title="8.4.1.2 Caching SHA-2 Pluggable Authentication">
Section 8.4.1.2, “Caching SHA-2 Pluggable Authentication”
</a>
. If
the replication user for distributed recovery uses the caching
SHA-2 authentication plugin, and you are
<span class="emphasis">
<em>
not
</em>
</span>
using SSL for distributed recovery
connections, RSA key-pairs are used for password exchange. You
can either copy the public key of the replication user to the
joining member, or configure the donors to provide the public
key when requested. For instructions to do this, see
<a class="xref" href="group-replication-secure-user.html" title="20.6.3.1 Secure User Credentials for Distributed Recovery">
Section 20.6.3.1, “Secure User Credentials for Distributed Recovery”
</a>
.
</p>
</div>
<p>
To create the replication user for distributed recovery, follow
these steps:
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1">
<li class="listitem">
<p>
Start the MySQL server instance, then connect a client to
it.
</p>
</li>
<li class="listitem">
<p>
If you want to disable binary logging in order to create the
replication user separately on each instance, do so by
issuing the following statement:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa70098233"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SET</span> SQL_LOG_BIN<span class="token operator">=</span><span class="token number">0</span><span class="token punctuation">;</span></code></pre>
</div>
</li>
<li class="listitem">
<p>
Create a MySQL user with the following privileges:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<a class="link" href="privileges-provided.html#priv_replication-slave">
<code class="literal">
REPLICATION SLAVE
</code>
</a>
, which
is required for making a distributed recovery connection
to a donor to retrieve data.
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="privileges-provided.html#priv_connection-admin">
<code class="literal">
CONNECTION_ADMIN
</code>
</a>
, which
ensures that Group Replication connections are not
terminated if one of the servers involved is placed in
offline mode.
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="privileges-provided.html#priv_backup-admin">
<code class="literal">
BACKUP_ADMIN
</code>
</a>
, if the
servers in the replication group are set up to support
cloning (see
<a class="xref" href="group-replication-cloning.html" title="20.5.4.2 Cloning for Distributed Recovery">
Section 20.5.4.2, “Cloning for Distributed Recovery”
</a>
). This
privilege is required for a member to act as the donor
in a cloning operation for distributed recovery.
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="privileges-provided.html#priv_group-replication-stream">
<code class="literal">
GROUP_REPLICATION_STREAM
</code>
</a>
,
if the MySQL communication stack is in use for the
replication group (see
<a class="xref" href="group-replication-connection-security.html" title="20.6.1 Communication Stack for Connection Security Management">
Section 20.6.1, “Communication Stack for Connection Security Management”
</a>
).
This privilege is required for the user account to be
able to establish and maintain connections for Group
Replication using the MySQL communication stack.
</p>
</li>
</ul>
</div>
<p>
In this example the user
<em class="replaceable">
<code>
rpl_user
</code>
</em>
with the password
<em class="replaceable">
<code>
password
</code>
</em>
is
shown. When configuring your servers use a suitable user
name and password:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa73889709"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">CREATE</span> <span class="token keyword">USER</span> <em class="replaceable">rpl_user</em>@<span class="token string">'%'</span> <span class="token keyword">IDENTIFIED</span> <span class="token keyword">BY</span> <span class="token string">'<em class="replaceable">password</em>'</span><span class="token punctuation">;</span>
<span class="token prompt">mysql></span> <span class="token keyword">GRANT</span> <span class="token keyword">REPLICATION</span> <span class="token keyword">SLAVE</span> <span class="token keyword">ON</span> <span class="token operator">*</span><span class="token punctuation">.</span><span class="token operator">*</span> <span class="token keyword">TO</span> <em class="replaceable">rpl_user</em>@<span class="token string">'%'</span><span class="token punctuation">;</span>
<span class="token prompt">mysql></span> <span class="token keyword">GRANT</span> CONNECTION_ADMIN <span class="token keyword">ON</span> <span class="token operator">*</span><span class="token punctuation">.</span><span class="token operator">*</span> <span class="token keyword">TO</span> <em class="replaceable">rpl_user</em>@<span class="token string">'%'</span><span class="token punctuation">;</span>
<span class="token prompt">mysql></span> <span class="token keyword">GRANT</span> BACKUP_ADMIN <span class="token keyword">ON</span> <span class="token operator">*</span><span class="token punctuation">.</span><span class="token operator">*</span> <span class="token keyword">TO</span> <em class="replaceable">rpl_user</em>@<span class="token string">'%'</span><span class="token punctuation">;</span>
<span class="token prompt">mysql></span> <span class="token keyword">GRANT</span> GROUP_REPLICATION_STREAM <span class="token keyword">ON</span> <span class="token operator">*</span><span class="token punctuation">.</span><span class="token operator">*</span> <span class="token keyword">TO</span> <em class="replaceable">rpl_user</em>@<span class="token string">'%'</span><span class="token punctuation">;</span>
<span class="token prompt">mysql></span> <span class="token keyword">FLUSH</span> <span class="token keyword">PRIVILEGES</span><span class="token punctuation">;</span></code></pre>
</div>
</li>
<li class="listitem">
<p>
If you disabled binary logging, enable it again as soon as
you have created the user, by issuing the following
statement:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa64259609"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SET</span> SQL_LOG_BIN<span class="token operator">=</span><span class="token number">1</span><span class="token punctuation">;</span></code></pre>
</div>
</li>
<li class="listitem">
<p>
When you have created the replication user, you must supply
the user credentials to the server for use with distributed
recovery. You can do this by setting the user credentials as
the credentials for the
<code class="literal">
group_replication_recovery
</code>
channel, using
a
<a class="link" href="change-replication-source-to.html" title="15.4.2.2 CHANGE REPLICATION SOURCE TO Statement">
<code class="literal">
CHANGE REPLICATION SOURCE
TO
</code>
</a>
statement. Alternatively, you can specify the
user credentials for distributed recovery in a
<a class="link" href="start-group-replication.html" title="15.4.3.1 START GROUP_REPLICATION Statement">
<code class="literal">
START GROUP_REPLICATION
</code>
</a>
statement.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
User credentials set using
<a class="link" href="change-replication-source-to.html" title="15.4.2.2 CHANGE REPLICATION SOURCE TO Statement">
<code class="literal">
CHANGE
REPLICATION SOURCE TO
</code>
</a>
are stored in plain text
in the replication metadata repositories on the server.
They are applied whenever Group Replication is started,
including automatic starts if the
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_start_on_boot">
<code class="literal">
group_replication_start_on_boot
</code>
</a>
system variable is set to
<code class="literal">
ON
</code>
.
</p>
</li>
<li class="listitem">
<p>
User credentials specified on
<a class="link" href="start-group-replication.html" title="15.4.3.1 START GROUP_REPLICATION Statement">
<code class="literal">
START
GROUP_REPLICATION
</code>
</a>
are saved in memory only,
and are removed by a
<a class="link" href="stop-group-replication.html" title="15.4.3.2 STOP GROUP_REPLICATION Statement">
<code class="literal">
STOP
GROUP_REPLICATION
</code>
</a>
statement or server
shutdown. You must issue a
<a class="link" href="start-group-replication.html" title="15.4.3.1 START GROUP_REPLICATION Statement">
<code class="literal">
START
GROUP_REPLICATION
</code>
</a>
statement to provide the
credentials again, so you cannot start Group Replication
automatically with these credentials. This method of
specifying the user credentials helps to secure the
Group Replication servers against unauthorized access.
</p>
</li>
</ul>
</div>
<p>
For more information on the security implications of each
method of providing the user credentials, see
<a class="xref" href="group-replication-secure-user.html#group-replication-secure-user-provide" title="20.6.3.1.3 Providing Replication User Credentials Securely">
Section 20.6.3.1.3, “Providing Replication User Credentials Securely”
</a>
. If
you choose to provide the user credentials using a
<a class="link" href="change-replication-source-to.html" title="15.4.2.2 CHANGE REPLICATION SOURCE TO Statement">
<code class="literal">
CHANGE REPLICATION SOURCE TO
</code>
</a>
statement, issue the following statement on the server
instance now, replacing
<em class="replaceable">
<code>
rpl_user
</code>
</em>
and
<em class="replaceable">
<code>
password
</code>
</em>
with the values used
when creating the user:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa13015261"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">CHANGE</span> <span class="token keyword">REPLICATION</span> <span class="token keyword">SOURCE</span> <span class="token keyword">TO</span> <span class="token keyword">SOURCE_USER</span><span class="token operator">=</span><span class="token string">'<em class="replaceable">rpl_user</em>'</span><span class="token punctuation">,</span>
<span class="token prompt"> -></span> <span class="token keyword">SOURCE_PASSWORD</span><span class="token operator">=</span><span class="token string">'<em class="replaceable">password</em>'</span>
<span class="token prompt"> -></span> <span class="token keyword">FOR</span> <span class="token keyword">CHANNEL</span> <span class="token string">'group_replication_recovery'</span><span class="token punctuation">;</span></code></pre>
</div>
</li>
</ol>
</div>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/mysqlslap.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a name="mysqlslap">
</a>
6.5.7 mysqlslap — A Load Emulation Client
</h3>
</div>
</div>
</div>
<a class="indexterm" name="idm46045309949696">
</a>
<a class="indexterm" name="idm46045309948784">
</a>
<p>
<a class="link" href="mysqlslap.html" title="6.5.7 mysqlslap — A Load Emulation Client">
<span class="command">
<strong>
mysqlslap
</strong>
</span>
</a>
is a diagnostic program designed to
emulate client load for a MySQL server and to report the timing
of each stage. It works as if multiple clients are accessing the
server.
</p>
<p>
Invoke
<a class="link" href="mysqlslap.html" title="6.5.7 mysqlslap — A Load Emulation Client">
<span class="command">
<strong>
mysqlslap
</strong>
</span>
</a>
like this:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa93429323"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">mysqlslap <span class="token punctuation">[</span><em class="replaceable">options</em><span class="token punctuation">]</span></code></pre>
</div>
<p>
Some options such as
<a class="link" href="mysqlslap.html#option_mysqlslap_create">
<code class="option">
--create
</code>
</a>
or
<a class="link" href="mysqlslap.html#option_mysqlslap_query">
<code class="option">
--query
</code>
</a>
enable you to
specify a string containing an SQL statement or a file
containing statements. If you specify a file, by default it must
contain one statement per line. (That is, the implicit statement
delimiter is the newline character.) Use the
<a class="link" href="mysqlslap.html#option_mysqlslap_delimiter">
<code class="option">
--delimiter
</code>
</a>
option to specify
a different delimiter, which enables you to specify statements
that span multiple lines or place multiple statements on a
single line. You cannot include comments in a file;
<a class="link" href="mysqlslap.html" title="6.5.7 mysqlslap — A Load Emulation Client">
<span class="command">
<strong>
mysqlslap
</strong>
</span>
</a>
does not understand them.
</p>
<p>
<a class="link" href="mysqlslap.html" title="6.5.7 mysqlslap — A Load Emulation Client">
<span class="command">
<strong>
mysqlslap
</strong>
</span>
</a>
runs in three stages:
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1">
<li class="listitem">
<p>
Create schema, table, and optionally any stored programs or
data to use for the test. This stage uses a single client
connection.
</p>
</li>
<li class="listitem">
<p>
Run the load test. This stage can use many client
connections.
</p>
</li>
<li class="listitem">
<p>
Clean up (disconnect, drop table if specified). This stage
uses a single client connection.
</p>
</li>
</ol>
</div>
<p>
Examples:
</p>
<p>
Supply your own create and query SQL statements, with 50 clients
querying and 200 selects for each (enter the command on a single
line):
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-terminal"><div class="docs-select-all right" id="sa9892498"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">mysqlslap <span class="token constant">--delimiter</span>=<span class="token atrule">";"</span>
<span class="token constant">--create</span>=<span class="token atrule">"CREATE TABLE a (b int);INSERT INTO a VALUES (23)"</span>
<span class="token constant">--query</span>=<span class="token atrule">"SELECT * FROM a"</span> <span class="token constant">--concurrency</span><span class="token attr-value"><span class="token punctuation">=</span>50</span> <span class="token constant">--iterations</span><span class="token attr-value"><span class="token punctuation">=</span>200</span></code></pre>
</div>
<p>
Let
<a class="link" href="mysqlslap.html" title="6.5.7 mysqlslap — A Load Emulation Client">
<span class="command">
<strong>
mysqlslap
</strong>
</span>
</a>
build the query SQL statement
with a table of two
<a class="link" href="integer-types.html" title="13.1.2 Integer Types (Exact Value) - INTEGER, INT, SMALLINT, TINYINT, MEDIUMINT, BIGINT">
<code class="literal">
INT
</code>
</a>
columns
and three
<a class="link" href="char.html" title="13.3.2 The CHAR and VARCHAR Types">
<code class="literal">
VARCHAR
</code>
</a>
columns. Use
five clients querying 20 times each. Do not create the table or
insert the data (that is, use the previous test's schema and
data):
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-terminal"><div class="docs-select-all right" id="sa26697644"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">mysqlslap <span class="token constant">--concurrency</span><span class="token attr-value"><span class="token punctuation">=</span>5</span> <span class="token constant">--iterations</span><span class="token attr-value"><span class="token punctuation">=</span>20</span>
<span class="token constant">--number-int-cols</span><span class="token attr-value"><span class="token punctuation">=</span>2</span> <span class="token constant">--number-char-cols</span><span class="token attr-value"><span class="token punctuation">=</span>3</span>
<span class="token property">--auto-generate-sql</span></code></pre>
</div>
<p>
Tell the program to load the create, insert, and query SQL
statements from the specified files, where the
<code class="filename">
create.sql
</code>
file has multiple table creation
statements delimited by
<code class="literal">
';'
</code>
and multiple
insert statements delimited by
<code class="literal">
';'
</code>
. The
<code class="option">
--query
</code>
file should contain multiple queries
delimited by
<code class="literal">
';'
</code>
. Run all the load
statements, then run all the queries in the query file with five
clients (five times each):
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-terminal"><div class="docs-select-all right" id="sa73481022"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">mysqlslap <span class="token constant">--concurrency</span><span class="token attr-value"><span class="token punctuation">=</span>5</span>
<span class="token constant">--iterations</span><span class="token attr-value"><span class="token punctuation">=</span>5</span> <span class="token constant">--query</span><span class="token attr-value"><span class="token punctuation">=</span>query.sql</span> <span class="token constant">--create</span><span class="token attr-value"><span class="token punctuation">=</span>create.sql</span>
<span class="token constant">--delimiter</span>=<span class="token atrule">";"</span></code></pre>
</div>
<p>
<a class="link" href="mysqlslap.html" title="6.5.7 mysqlslap — A Load Emulation Client">
<span class="command">
<strong>
mysqlslap
</strong>
</span>
</a>
supports the following options,
which can be specified on the command line or in the
<code class="literal">
[mysqlslap]
</code>
and
<code class="literal">
[client]
</code>
groups of an option file. For information about option files
used by MySQL programs, see
<a class="xref" href="option-files.html" title="6.2.2.2 Using Option Files">
Section 6.2.2.2, “Using Option Files”
</a>
.
</p>
<div class="table">
<a name="idm46045309915744">
</a>
<p class="title">
<b>
Table 6.16 mysqlslap Options
</b>
</p>
<div class="table-contents">
<table frame="box" rules="all" summary="Command-line options available for mysqlslap.">
<colgroup>
<col style="width: 35%"/>
<col style="width: 64%"/>
</colgroup>
<thead>
<tr>
<th>
Option Name
</th>
<th>
Description
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_auto-generate-sql">
--auto-generate-sql
</a>
</td>
<td>
Generate SQL statements automatically when they are not supplied in files or using command options
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_auto-generate-sql-add-autoincrement">
--auto-generate-sql-add-autoincrement
</a>
</td>
<td>
Add AUTO_INCREMENT column to automatically generated tables
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_auto-generate-sql-execute-number">
--auto-generate-sql-execute-number
</a>
</td>
<td>
Specify how many queries to generate automatically
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_auto-generate-sql-guid-primary">
--auto-generate-sql-guid-primary
</a>
</td>
<td>
Add a GUID-based primary key to automatically generated tables
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_auto-generate-sql-load-type">
--auto-generate-sql-load-type
</a>
</td>
<td>
Specify the test load type
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_auto-generate-sql-secondary-indexes">
--auto-generate-sql-secondary-indexes
</a>
</td>
<td>
Specify how many secondary indexes to add to automatically generated tables
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_auto-generate-sql-unique-query-number">
--auto-generate-sql-unique-query-number
</a>
</td>
<td>
How many different queries to generate for automatic tests
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_auto-generate-sql-unique-write-number">
--auto-generate-sql-unique-write-number
</a>
</td>
<td>
How many different queries to generate for --auto-generate-sql-write-number
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_auto-generate-sql-write-number">
--auto-generate-sql-write-number
</a>
</td>
<td>
How many row inserts to perform on each thread
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_commit">
--commit
</a>
</td>
<td>
How many statements to execute before committing
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_compress">
--compress
</a>
</td>
<td>
Compress all information sent between client and server
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_compression-algorithms">
--compression-algorithms
</a>
</td>
<td>
Permitted compression algorithms for connections to server
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_concurrency">
--concurrency
</a>
</td>
<td>
Number of clients to simulate when issuing the SELECT statement
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_create">
--create
</a>
</td>
<td>
File or string containing the statement to use for creating the table
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_create-schema">
--create-schema
</a>
</td>
<td>
Schema in which to run the tests
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_csv">
--csv
</a>
</td>
<td>
Generate output in comma-separated values format
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_debug">
--debug
</a>
</td>
<td>
Write debugging log
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_debug-check">
--debug-check
</a>
</td>
<td>
Print debugging information when program exits
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_debug-info">
--debug-info
</a>
</td>
<td>
Print debugging information, memory, and CPU statistics when program exits
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_default-auth">
--default-auth
</a>
</td>
<td>
Authentication plugin to use
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_defaults-extra-file">
--defaults-extra-file
</a>
</td>
<td>
Read named option file in addition to usual option files
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_defaults-file">
--defaults-file
</a>
</td>
<td>
Read only named option file
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_defaults-group-suffix">
--defaults-group-suffix
</a>
</td>
<td>
Option group suffix value
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_delimiter">
--delimiter
</a>
</td>
<td>
Delimiter to use in SQL statements
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_detach">
--detach
</a>
</td>
<td>
Detach (close and reopen) each connection after each N statements
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_enable-cleartext-plugin">
--enable-cleartext-plugin
</a>
</td>
<td>
Enable cleartext authentication plugin
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_engine">
--engine
</a>
</td>
<td>
Storage engine to use for creating the table
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_get-server-public-key">
--get-server-public-key
</a>
</td>
<td>
Request RSA public key from server
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_help">
--help
</a>
</td>
<td>
Display help message and exit
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_host">
--host
</a>
</td>
<td>
Host on which MySQL server is located
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_iterations">
--iterations
</a>
</td>
<td>
Number of times to run the tests
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_login-path">
--login-path
</a>
</td>
<td>
Read login path options from .mylogin.cnf
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_no-defaults">
--no-defaults
</a>
</td>
<td>
Read no option files
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_no-drop">
--no-drop
</a>
</td>
<td>
Do not drop any schema created during the test run
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_no-login-paths">
--no-login-paths
</a>
</td>
<td>
Do not read login paths from the login path file
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_number-char-cols">
--number-char-cols
</a>
</td>
<td>
Number of VARCHAR columns to use if --auto-generate-sql is specified
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_number-int-cols">
--number-int-cols
</a>
</td>
<td>
Number of INT columns to use if --auto-generate-sql is specified
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_number-of-queries">
--number-of-queries
</a>
</td>
<td>
Limit each client to approximately this number of queries
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_only-print">
--only-print
</a>
</td>
<td>
Do not connect to databases. mysqlslap only prints what it would have done
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_password">
--password
</a>
</td>
<td>
Password to use when connecting to server
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_password1">
--password1
</a>
</td>
<td>
First multifactor authentication password to use when connecting to server
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_password2">
--password2
</a>
</td>
<td>
Second multifactor authentication password to use when connecting to server
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_password3">
--password3
</a>
</td>
<td>
Third multifactor authentication password to use when connecting to server
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_pipe">
--pipe
</a>
</td>
<td>
Connect to server using named pipe (Windows only)
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_plugin-dir">
--plugin-dir
</a>
</td>
<td>
Directory where plugins are installed
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_port">
--port
</a>
</td>
<td>
TCP/IP port number for connection
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_post-query">
--post-query
</a>
</td>
<td>
File or string containing the statement to execute after the tests have completed
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_post-system">
--post-system
</a>
</td>
<td>
String to execute using system() after the tests have completed
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_pre-query">
--pre-query
</a>
</td>
<td>
File or string containing the statement to execute before running the tests
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_pre-system">
--pre-system
</a>
</td>
<td>
String to execute using system() before running the tests
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_print-defaults">
--print-defaults
</a>
</td>
<td>
Print default options
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_protocol">
--protocol
</a>
</td>
<td>
Transport protocol to use
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_query">
--query
</a>
</td>
<td>
File or string containing the SELECT statement to use for retrieving data
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_server-public-key-path">
--server-public-key-path
</a>
</td>
<td>
Path name to file containing RSA public key
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_shared-memory-base-name">
--shared-memory-base-name
</a>
</td>
<td>
Shared-memory name for shared-memory connections (Windows only)
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_silent">
--silent
</a>
</td>
<td>
Silent mode
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_socket">
--socket
</a>
</td>
<td>
Unix socket file or Windows named pipe to use
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_sql-mode">
--sql-mode
</a>
</td>
<td>
Set SQL mode for client session
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_ssl">
--ssl-ca
</a>
</td>
<td>
File that contains list of trusted SSL Certificate Authorities
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_ssl">
--ssl-capath
</a>
</td>
<td>
Directory that contains trusted SSL Certificate Authority certificate files
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_ssl">
--ssl-cert
</a>
</td>
<td>
File that contains X.509 certificate
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_ssl">
--ssl-cipher
</a>
</td>
<td>
Permissible ciphers for connection encryption
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_ssl">
--ssl-crl
</a>
</td>
<td>
File that contains certificate revocation lists
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_ssl">
--ssl-crlpath
</a>
</td>
<td>
Directory that contains certificate revocation-list files
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_ssl-fips-mode">
--ssl-fips-mode
</a>
</td>
<td>
Whether to enable FIPS mode on client side
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_ssl">
--ssl-key
</a>
</td>
<td>
File that contains X.509 key
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_ssl">
--ssl-mode
</a>
</td>
<td>
Desired security state of connection to server
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_ssl">
--ssl-session-data
</a>
</td>
<td>
File that contains SSL session data
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_ssl">
--ssl-session-data-continue-on-failed-reuse
</a>
</td>
<td>
Whether to establish connections if session reuse fails
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_tls-ciphersuites">
--tls-ciphersuites
</a>
</td>
<td>
Permissible TLSv1.3 ciphersuites for encrypted connections
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_tls-sni-servername">
--tls-sni-servername
</a>
</td>
<td>
Server name supplied by the client
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_tls-version">
--tls-version
</a>
</td>
<td>
Permissible TLS protocols for encrypted connections
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_user">
--user
</a>
</td>
<td>
MySQL user name to use when connecting to server
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_verbose">
--verbose
</a>
</td>
<td>
Verbose mode
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_version">
--version
</a>
</td>
<td>
Display version information and exit
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlslap.html#option_mysqlslap_zstd-compression-level">
--zstd-compression-level
</a>
</td>
<td>
Compression level for connections to server that use zstd compression
</td>
</tr>
</tbody>
</table>
</div>
<div class="table-contents">
<table cellpadding="0" cellspacing="0" style="position: fixed; top: 0px; display: none; left: 401px; width: 739px;">
<thead>
<tr>
<th style="width: 260.906px;">
Option Name
</th>
<th style="width: 477.094px;">
Description
</th>
</tr>
</thead>
</table>
</div>
</div>
<br class="table-break"/>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<a name="option_mysqlslap_help">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_help">
<code class="option">
--help
</code>
</a>
,
<code class="option">
-?
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for help">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--help
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045309693136">
</a>
<a class="indexterm" name="idm46045309691648">
</a>
<p>
Display a help message and exit.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_auto-generate-sql">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_auto-generate-sql">
<code class="option">
--auto-generate-sql
</code>
</a>
,
<code class="option">
-a
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for auto-generate-sql">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--auto-generate-sql
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
FALSE
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045309677072">
</a>
<a class="indexterm" name="idm46045309675568">
</a>
<p>
Generate SQL statements automatically when they are not
supplied in files or using command options.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_auto-generate-sql-add-autoincrement">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_auto-generate-sql-add-autoincrement">
<code class="option">
--auto-generate-sql-add-autoincrement
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for auto-generate-sql-add-autoincrement">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--auto-generate-sql-add-autoincrement
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
FALSE
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045309661216">
</a>
<a class="indexterm" name="idm46045309659696">
</a>
<p>
Add an
<code class="literal">
AUTO_INCREMENT
</code>
column to
automatically generated tables.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_auto-generate-sql-execute-number">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_auto-generate-sql-execute-number">
<code class="option">
--auto-generate-sql-execute-number=
<em class="replaceable">
<code>
N
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for auto-generate-sql-execute-number">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--auto-generate-sql-execute-number=#
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Numeric
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045309646864">
</a>
<a class="indexterm" name="idm46045309645360">
</a>
<p>
Specify how many queries to generate automatically.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_auto-generate-sql-guid-primary">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_auto-generate-sql-guid-primary">
<code class="option">
--auto-generate-sql-guid-primary
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for auto-generate-sql-guid-primary">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--auto-generate-sql-guid-primary
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
FALSE
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045309631056">
</a>
<a class="indexterm" name="idm46045309629552">
</a>
<p>
Add a GUID-based primary key to automatically generated
tables.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_auto-generate-sql-load-type">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_auto-generate-sql-load-type">
<code class="option">
--auto-generate-sql-load-type=
<em class="replaceable">
<code>
type
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for auto-generate-sql-load-type">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--auto-generate-sql-load-type=type
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Enumeration
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
mixed
</code>
</td>
</tr>
<tr>
<th>
Valid Values
</th>
<td>
<p class="valid-value">
<code class="literal">
read
</code>
</p>
<p class="valid-value">
<code class="literal">
write
</code>
</p>
<p class="valid-value">
<code class="literal">
key
</code>
</p>
<p class="valid-value">
<code class="literal">
update
</code>
</p>
<p class="valid-value">
<code class="literal">
mixed
</code>
</p>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045309608288">
</a>
<a class="indexterm" name="idm46045309606784">
</a>
<p>
Specify the test load type. The permissible values are
<code class="literal">
read
</code>
(scan tables),
<code class="literal">
write
</code>
(insert into tables),
<code class="literal">
key
</code>
(read primary keys),
<code class="literal">
update
</code>
(update primary keys), or
<code class="literal">
mixed
</code>
(half inserts, half scanning
selects). The default is
<code class="literal">
mixed
</code>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_auto-generate-sql-secondary-indexes">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_auto-generate-sql-secondary-indexes">
<code class="option">
--auto-generate-sql-secondary-indexes=
<em class="replaceable">
<code>
N
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for auto-generate-sql-secondary-indexes">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--auto-generate-sql-secondary-indexes=#
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Numeric
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045309587856">
</a>
<a class="indexterm" name="idm46045309586336">
</a>
<p>
Specify how many secondary indexes to add to automatically
generated tables. By default, none are added.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_auto-generate-sql-unique-query-number">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_auto-generate-sql-unique-query-number">
<code class="option">
--auto-generate-sql-unique-query-number=
<em class="replaceable">
<code>
N
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for auto-generate-sql-unique-query-number">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--auto-generate-sql-unique-query-number=#
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Numeric
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
10
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045309571648">
</a>
<a class="indexterm" name="idm46045309570128">
</a>
<p>
How many different queries to generate for automatic tests.
For example, if you run a
<code class="literal">
key
</code>
test that
performs 1000 selects, you can use this option with a value
of 1000 to run 1000 unique queries, or with a value of 50 to
perform 50 different selects. The default is 10.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_auto-generate-sql-unique-write-number">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_auto-generate-sql-unique-write-number">
<code class="option">
--auto-generate-sql-unique-write-number=
<em class="replaceable">
<code>
N
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for auto-generate-sql-unique-write-number">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--auto-generate-sql-unique-write-number=#
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Numeric
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
10
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045309554624">
</a>
<a class="indexterm" name="idm46045309553104">
</a>
<p>
How many different queries to generate for
<a class="link" href="mysqlslap.html#option_mysqlslap_auto-generate-sql-write-number">
<code class="option">
--auto-generate-sql-write-number
</code>
</a>
.
The default is 10.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_auto-generate-sql-write-number">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_auto-generate-sql-write-number">
<code class="option">
--auto-generate-sql-write-number=
<em class="replaceable">
<code>
N
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for auto-generate-sql-write-number">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--auto-generate-sql-write-number=#
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Numeric
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
100
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045309537456">
</a>
<a class="indexterm" name="idm46045309535952">
</a>
<p>
How many row inserts to perform. The default is 100.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_commit">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_commit">
<code class="option">
--commit=
<em class="replaceable">
<code>
N
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for commit">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--commit=#
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Numeric
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045309521616">
</a>
<a class="indexterm" name="idm46045309520128">
</a>
<p>
How many statements to execute before committing. The
default is 0 (no commits are done).
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_compress">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_compress">
<code class="option">
--compress
</code>
</a>
,
<code class="option">
-C
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for compress">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--compress[={OFF|ON}]
</code>
</td>
</tr>
<tr>
<th>
Deprecated
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
OFF
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045309503472">
</a>
<a class="indexterm" name="idm46045309501984">
</a>
<p>
Compress all information sent between the client and the
server if possible. See
<a class="xref" href="connection-compression-control.html" title="6.2.8 Connection Compression Control">
Section 6.2.8, “Connection Compression Control”
</a>
.
</p>
<p>
This option is deprecated. Expect it to be removed in a
future version of MySQL. See
<a class="xref" href="connection-compression-control.html#connection-compression-legacy-configuration" title="Configuring Legacy Connection Compression">
Configuring Legacy Connection Compression
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_compression-algorithms">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_compression-algorithms">
<code class="option">
--compression-algorithms=
<em class="replaceable">
<code>
value
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for compression-algorithms">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--compression-algorithms=value
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Set
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
uncompressed
</code>
</td>
</tr>
<tr>
<th>
Valid Values
</th>
<td>
<p class="valid-value">
<code class="literal">
zlib
</code>
</p>
<p class="valid-value">
<code class="literal">
zstd
</code>
</p>
<p class="valid-value">
<code class="literal">
uncompressed
</code>
</p>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045309480800">
</a>
<a class="indexterm" name="idm46045309479296">
</a>
<p>
The permitted compression algorithms for connections to the
server. The available algorithms are the same as for the
<a class="link" href="server-system-variables.html#sysvar_protocol_compression_algorithms">
<code class="literal">
protocol_compression_algorithms
</code>
</a>
system variable. The default value is
<code class="literal">
uncompressed
</code>
.
</p>
<p>
For more information, see
<a class="xref" href="connection-compression-control.html" title="6.2.8 Connection Compression Control">
Section 6.2.8, “Connection Compression Control”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_concurrency">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_concurrency">
<code class="option">
--concurrency=
<em class="replaceable">
<code>
N
</code>
</em>
</code>
</a>
,
<code class="option">
-c
<em class="replaceable">
<code>
N
</code>
</em>
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for concurrency">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--concurrency=#
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Numeric
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045309463344">
</a>
<a class="indexterm" name="idm46045309461856">
</a>
<p>
The number of parallel clients to simulate.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_create">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_create">
<code class="option">
--create=
<em class="replaceable">
<code>
value
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for create">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--create=value
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045309449936">
</a>
<a class="indexterm" name="idm46045309448448">
</a>
<p>
The file or string containing the statement to use for
creating the table.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_create-schema">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_create-schema">
<code class="option">
--create-schema=
<em class="replaceable">
<code>
value
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for create-schema">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--create-schema=value
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045309436400">
</a>
<a class="indexterm" name="idm46045309434912">
</a>
<p>
The schema in which to run the tests.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
If the
<a class="link" href="mysqlslap.html#option_mysqlslap_auto-generate-sql">
<code class="option">
--auto-generate-sql
</code>
</a>
option is also given,
<a class="link" href="mysqlslap.html" title="6.5.7 mysqlslap — A Load Emulation Client">
<span class="command">
<strong>
mysqlslap
</strong>
</span>
</a>
drops
the schema at the end of the test run. To avoid this, use
the
<a class="link" href="mysqlslap.html#option_mysqlslap_no-drop">
<code class="option">
--no-drop
</code>
</a>
option as
well.
</p>
</div>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_csv">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_csv">
<code class="option">
--csv[=
<em class="replaceable">
<code>
file_name
</code>
</em>
]
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for csv">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--csv=[file]
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
File name
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045309418704">
</a>
<a class="indexterm" name="idm46045309417216">
</a>
<p>
Generate output in comma-separated values format. The output
goes to the named file, or to the standard output if no file
is given.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_debug">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_debug">
<code class="option">
--debug[=
<em class="replaceable">
<code>
debug_options
</code>
</em>
]
</code>
</a>
,
<code class="option">
-#
[
<em class="replaceable">
<code>
debug_options
</code>
</em>
]
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for debug">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--debug[=debug_options]
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
d:t:o,/tmp/mysqlslap.trace
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045309401728">
</a>
<a class="indexterm" name="idm46045309400240">
</a>
<p>
Write a debugging log. A typical
<em class="replaceable">
<code>
debug_options
</code>
</em>
string is
<code class="literal">
d:t:o,
<em class="replaceable">
<code>
file_name
</code>
</em>
</code>
.
The default is
<code class="literal">
d:t:o,/tmp/mysqlslap.trace
</code>
.
</p>
<p>
This option is available only if MySQL was built using
<a class="link" href="source-configuration-options.html#option_cmake_with_debug">
<code class="option">
WITH_DEBUG
</code>
</a>
. MySQL release
binaries provided by Oracle are
<span class="emphasis">
<em>
not
</em>
</span>
built using this option.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_debug-check">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_debug-check">
<code class="option">
--debug-check
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for debug-check">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--debug-check
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
FALSE
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045309381920">
</a>
<a class="indexterm" name="idm46045309380432">
</a>
<p>
Print some debugging information when the program exits.
</p>
<p>
This option is available only if MySQL was built using
<a class="link" href="source-configuration-options.html#option_cmake_with_debug">
<code class="option">
WITH_DEBUG
</code>
</a>
. MySQL release
binaries provided by Oracle are
<span class="emphasis">
<em>
not
</em>
</span>
built using this option.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_debug-info">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_debug-info">
<code class="option">
--debug-info
</code>
</a>
,
<code class="option">
-T
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for debug-info">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--debug-info
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
FALSE
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045309363904">
</a>
<a class="indexterm" name="idm46045309362416">
</a>
<p>
Print debugging information and memory and CPU usage
statistics when the program exits.
</p>
<p>
This option is available only if MySQL was built using
<a class="link" href="source-configuration-options.html#option_cmake_with_debug">
<code class="option">
WITH_DEBUG
</code>
</a>
. MySQL release
binaries provided by Oracle are
<span class="emphasis">
<em>
not
</em>
</span>
built using this option.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_default-auth">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_default-auth">
<code class="option">
--default-auth=
<em class="replaceable">
<code>
plugin
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for default-auth">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--default-auth=plugin
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045309348416">
</a>
<a class="indexterm" name="idm46045309346928">
</a>
<p>
A hint about which client-side authentication plugin to use.
See
<a class="xref" href="pluggable-authentication.html" title="8.2.17 Pluggable Authentication">
Section 8.2.17, “Pluggable Authentication”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_defaults-extra-file">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_defaults-extra-file">
<code class="option">
--defaults-extra-file=
<em class="replaceable">
<code>
file_name
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for defaults-extra-file">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--defaults-extra-file=file_name
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
File name
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045309334176">
</a>
<a class="indexterm" name="idm46045309332672">
</a>
<p>
Read this option file after the global option file but (on
Unix) before the user option file. If the file does not
exist or is otherwise inaccessible, an error occurs. If
<em class="replaceable">
<code>
file_name
</code>
</em>
is not an absolute path
name, it is interpreted relative to the current directory.
</p>
<p>
For additional information about this and other option-file
options, see
<a class="xref" href="option-file-options.html" title="6.2.2.3 Command-Line Options that Affect Option-File Handling">
Section 6.2.2.3, “Command-Line Options that Affect Option-File Handling”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_defaults-file">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_defaults-file">
<code class="option">
--defaults-file=
<em class="replaceable">
<code>
file_name
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for defaults-file">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--defaults-file=file_name
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
File name
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045309318768">
</a>
<a class="indexterm" name="idm46045309317280">
</a>
<p>
Use only the given option file. If the file does not exist
or is otherwise inaccessible, an error occurs. If
<em class="replaceable">
<code>
file_name
</code>
</em>
is not an absolute path
name, it is interpreted relative to the current directory.
</p>
<p>
Exception: Even with
<a class="link" href="option-file-options.html#option_general_defaults-file">
<code class="option">
--defaults-file
</code>
</a>
, client
programs read
<code class="filename">
.mylogin.cnf
</code>
.
</p>
<p>
For additional information about this and other option-file
options, see
<a class="xref" href="option-file-options.html" title="6.2.2.3 Command-Line Options that Affect Option-File Handling">
Section 6.2.2.3, “Command-Line Options that Affect Option-File Handling”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_defaults-group-suffix">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_defaults-group-suffix">
<code class="option">
--defaults-group-suffix=
<em class="replaceable">
<code>
str
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for defaults-group-suffix">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--defaults-group-suffix=str
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045309301312">
</a>
<a class="indexterm" name="idm46045309299808">
</a>
<p>
Read not only the usual option groups, but also groups with
the usual names and a suffix of
<em class="replaceable">
<code>
str
</code>
</em>
. For example,
<a class="link" href="mysqlslap.html" title="6.5.7 mysqlslap — A Load Emulation Client">
<span class="command">
<strong>
mysqlslap
</strong>
</span>
</a>
normally reads the
<code class="literal">
[client]
</code>
and
<code class="literal">
[mysqlslap]
</code>
groups. If this option is
given as
<a class="link" href="mysqlslap.html#option_mysqlslap_defaults-group-suffix">
<code class="option">
--defaults-group-suffix=_other
</code>
</a>
,
<a class="link" href="mysqlslap.html" title="6.5.7 mysqlslap — A Load Emulation Client">
<span class="command">
<strong>
mysqlslap
</strong>
</span>
</a>
also reads the
<code class="literal">
[client_other]
</code>
and
<code class="literal">
[mysqlslap_other]
</code>
groups.
</p>
<p>
For additional information about this and other option-file
options, see
<a class="xref" href="option-file-options.html" title="6.2.2.3 Command-Line Options that Affect Option-File Handling">
Section 6.2.2.3, “Command-Line Options that Affect Option-File Handling”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_delimiter">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_delimiter">
<code class="option">
--delimiter=
<em class="replaceable">
<code>
str
</code>
</em>
</code>
</a>
,
<code class="option">
-F
<em class="replaceable">
<code>
str
</code>
</em>
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for delimiter">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--delimiter=str
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045309279008">
</a>
<a class="indexterm" name="idm46045309277520">
</a>
<p>
The delimiter to use in SQL statements supplied in files or
using command options.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_detach">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_detach">
<code class="option">
--detach=
<em class="replaceable">
<code>
N
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for detach">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--detach=#
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Numeric
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045309263168">
</a>
<a class="indexterm" name="idm46045309261680">
</a>
<p>
Detach (close and reopen) each connection after each
<em class="replaceable">
<code>
N
</code>
</em>
statements. The default is 0
(connections are not detached).
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_enable-cleartext-plugin">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_enable-cleartext-plugin">
<code class="option">
--enable-cleartext-plugin
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for enable-cleartext-plugin">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--enable-cleartext-plugin
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
FALSE
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045309246864">
</a>
<a class="indexterm" name="idm46045309245360">
</a>
<p>
Enable the
<code class="literal">
mysql_clear_password
</code>
cleartext
authentication plugin. (See
<a class="xref" href="cleartext-pluggable-authentication.html" title="8.4.1.4 Client-Side Cleartext Pluggable Authentication">
Section 8.4.1.4, “Client-Side Cleartext Pluggable Authentication”
</a>
.)
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_engine">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_engine">
<code class="option">
--engine=
<em class="replaceable">
<code>
engine_name
</code>
</em>
</code>
</a>
,
<code class="option">
-e
<em class="replaceable">
<code>
engine_name
</code>
</em>
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for engine">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--engine=engine_name
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045309231344">
</a>
<a class="indexterm" name="idm46045309229856">
</a>
<p>
The storage engine to use for creating tables.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_get-server-public-key">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_get-server-public-key">
<code class="option">
--get-server-public-key
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for get-server-public-key">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--get-server-public-key
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045309218144">
</a>
<a class="indexterm" name="idm46045309216640">
</a>
<p>
Request from the server the RSA public key that it uses for
key pair-based password exchange. This option applies to
clients that connect to the server using an account that
authenticates with the
<code class="literal">
caching_sha2_password
</code>
authentication
plugin. For connections by such accounts, the server does
not send the public key to the client unless requested. The
option is ignored for accounts that do not authenticate with
that plugin. It is also ignored if RSA-based password
exchange is not needed, as is the case when the client
connects to the server using a secure connection.
</p>
<p>
If
<a class="link" href="mysqlslap.html#option_mysqlslap_server-public-key-path">
<code class="option">
--server-public-key-path=
<em class="replaceable">
<code>
file_name
</code>
</em>
</code>
</a>
is given and specifies a valid public key file, it takes
precedence over
<a class="link" href="mysqlslap.html#option_mysqlslap_get-server-public-key">
<code class="option">
--get-server-public-key
</code>
</a>
.
</p>
<p>
For information about the
<code class="literal">
caching_sha2_password
</code>
plugin, see
<a class="xref" href="caching-sha2-pluggable-authentication.html" title="8.4.1.2 Caching SHA-2 Pluggable Authentication">
Section 8.4.1.2, “Caching SHA-2 Pluggable Authentication”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_host">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_host">
<code class="option">
--host=
<em class="replaceable">
<code>
host_name
</code>
</em>
</code>
</a>
,
<code class="option">
-h
<em class="replaceable">
<code>
host_name
</code>
</em>
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for host">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--host=host_name
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
localhost
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045309195520">
</a>
<a class="indexterm" name="idm46045309194032">
</a>
<p>
Connect to the MySQL server on the given host.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_iterations">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_iterations">
<code class="option">
--iterations=
<em class="replaceable">
<code>
N
</code>
</em>
</code>
</a>
,
<code class="option">
-i
<em class="replaceable">
<code>
N
</code>
</em>
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for iterations">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--iterations=#
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Numeric
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045309181392">
</a>
<a class="indexterm" name="idm46045309179904">
</a>
<p>
The number of times to run the tests.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_login-path">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_login-path">
<code class="option">
--login-path=
<em class="replaceable">
<code>
name
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for login-path">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--login-path=name
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045309167904">
</a>
<a class="indexterm" name="idm46045309166416">
</a>
<p>
Read options from the named login path in the
<code class="filename">
.mylogin.cnf
</code>
login path file. A
<span class="quote">
“
<span class="quote">
login path
</span>
”
</span>
is an option group containing
options that specify which MySQL server to connect to and
which account to authenticate as. To create or modify a
login path file, use the
<a class="link" href="mysql-config-editor.html" title="6.6.7 mysql_config_editor — MySQL Configuration Utility">
<span class="command">
<strong>
mysql_config_editor
</strong>
</span>
</a>
utility. See
<a class="xref" href="mysql-config-editor.html" title="6.6.7 mysql_config_editor — MySQL Configuration Utility">
Section 6.6.7, “mysql_config_editor — MySQL Configuration Utility”
</a>
.
</p>
<p>
For additional information about this and other option-file
options, see
<a class="xref" href="option-file-options.html" title="6.2.2.3 Command-Line Options that Affect Option-File Handling">
Section 6.2.2.3, “Command-Line Options that Affect Option-File Handling”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_no-login-paths">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_no-login-paths">
<code class="option">
--no-login-paths
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for no-login-paths">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--no-login-paths
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045309152272">
</a>
<a class="indexterm" name="idm46045309150784">
</a>
<p>
Skips reading options from the login path file.
</p>
<p>
See
<a class="link" href="mysqlslap.html#option_mysqlslap_login-path">
<code class="option">
--login-path
</code>
</a>
for
related information.
</p>
<p>
For additional information about this and other option-file
options, see
<a class="xref" href="option-file-options.html" title="6.2.2.3 Command-Line Options that Affect Option-File Handling">
Section 6.2.2.3, “Command-Line Options that Affect Option-File Handling”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_no-drop">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_no-drop">
<code class="option">
--no-drop
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for no-drop">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--no-drop
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
FALSE
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045309133984">
</a>
<a class="indexterm" name="idm46045309132496">
</a>
<p>
Prevent
<a class="link" href="mysqlslap.html" title="6.5.7 mysqlslap — A Load Emulation Client">
<span class="command">
<strong>
mysqlslap
</strong>
</span>
</a>
from dropping any
schema it creates during the test run.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_no-defaults">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_no-defaults">
<code class="option">
--no-defaults
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for no-defaults">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--no-defaults
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045309121632">
</a>
<a class="indexterm" name="idm46045309120144">
</a>
<p>
Do not read any option files. If program startup fails due
to reading unknown options from an option file,
<a class="link" href="mysqlslap.html#option_mysqlslap_no-defaults">
<code class="option">
--no-defaults
</code>
</a>
can be used
to prevent them from being read.
</p>
<p>
The exception is that the
<code class="filename">
.mylogin.cnf
</code>
file is read in all cases, if it exists. This permits
passwords to be specified in a safer way than on the command
line even when
<a class="link" href="mysqlslap.html#option_mysqlslap_no-defaults">
<code class="option">
--no-defaults
</code>
</a>
is used. To
create
<code class="filename">
.mylogin.cnf
</code>
, use the
<a class="link" href="mysql-config-editor.html" title="6.6.7 mysql_config_editor — MySQL Configuration Utility">
<span class="command">
<strong>
mysql_config_editor
</strong>
</span>
</a>
utility. See
<a class="xref" href="mysql-config-editor.html" title="6.6.7 mysql_config_editor — MySQL Configuration Utility">
Section 6.6.7, “mysql_config_editor — MySQL Configuration Utility”
</a>
.
</p>
<p>
For additional information about this and other option-file
options, see
<a class="xref" href="option-file-options.html" title="6.2.2.3 Command-Line Options that Affect Option-File Handling">
Section 6.2.2.3, “Command-Line Options that Affect Option-File Handling”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_number-char-cols">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_number-char-cols">
<code class="option">
--number-char-cols=
<em class="replaceable">
<code>
N
</code>
</em>
</code>
</a>
,
<code class="option">
-x
<em class="replaceable">
<code>
N
</code>
</em>
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for number-char-cols">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--number-char-cols=#
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Numeric
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045309100208">
</a>
<a class="indexterm" name="idm46045309098720">
</a>
<p>
The number of
<a class="link" href="char.html" title="13.3.2 The CHAR and VARCHAR Types">
<code class="literal">
VARCHAR
</code>
</a>
columns
to use if
<a class="link" href="mysqlslap.html#option_mysqlslap_auto-generate-sql">
<code class="option">
--auto-generate-sql
</code>
</a>
is
specified.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_number-int-cols">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_number-int-cols">
<code class="option">
--number-int-cols=
<em class="replaceable">
<code>
N
</code>
</em>
</code>
</a>
,
<code class="option">
-y
<em class="replaceable">
<code>
N
</code>
</em>
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for number-int-cols">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--number-int-cols=#
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Numeric
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045309083840">
</a>
<a class="indexterm" name="idm46045309082352">
</a>
<p>
The number of
<a class="link" href="integer-types.html" title="13.1.2 Integer Types (Exact Value) - INTEGER, INT, SMALLINT, TINYINT, MEDIUMINT, BIGINT">
<code class="literal">
INT
</code>
</a>
columns to
use if
<a class="link" href="mysqlslap.html#option_mysqlslap_auto-generate-sql">
<code class="option">
--auto-generate-sql
</code>
</a>
is specified.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_number-of-queries">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_number-of-queries">
<code class="option">
--number-of-queries=
<em class="replaceable">
<code>
N
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for number-of-queries">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--number-of-queries=#
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Numeric
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045309068192">
</a>
<a class="indexterm" name="idm46045309066688">
</a>
<p>
Limit each client to approximately this many queries. Query
counting takes into account the statement delimiter. For
example, if you invoke
<a class="link" href="mysqlslap.html" title="6.5.7 mysqlslap — A Load Emulation Client">
<span class="command">
<strong>
mysqlslap
</strong>
</span>
</a>
as
follows, the
<code class="literal">
;
</code>
delimiter is recognized so
that each instance of the query string counts as two
queries. As a result, 5 rows (not 10) are inserted.
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-terminal"><div class="docs-select-all right" id="sa22345099"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">mysqlslap <span class="token constant">--delimiter</span>=<span class="token atrule">";"</span> <span class="token constant">--number-of-queries</span><span class="token attr-value"><span class="token punctuation">=</span>10</span>
<span class="token constant">--query</span>=<span class="token atrule">"use test;insert into t values(null)"</span></code></pre>
</div>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_only-print">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_only-print">
<code class="option">
--only-print
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for only-print">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--only-print
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
FALSE
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045309049264">
</a>
<a class="indexterm" name="idm46045309047776">
</a>
<p>
Do not connect to databases.
<a class="link" href="mysqlslap.html" title="6.5.7 mysqlslap — A Load Emulation Client">
<span class="command">
<strong>
mysqlslap
</strong>
</span>
</a>
only prints what it would have done.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_password">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_password">
<code class="option">
--password[=
<em class="replaceable">
<code>
password
</code>
</em>
]
</code>
</a>
,
<code class="option">
-p[
<em class="replaceable">
<code>
password
</code>
</em>
]
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for password">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--password[=password]
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045340908352">
</a>
<a class="indexterm" name="idm46045340906864">
</a>
<p>
The password of the MySQL account used for connecting to the
server. The password value is optional. If not given,
<a class="link" href="mysqlslap.html" title="6.5.7 mysqlslap — A Load Emulation Client">
<span class="command">
<strong>
mysqlslap
</strong>
</span>
</a>
prompts for one. If given,
there must be
<span class="emphasis">
<em>
no space
</em>
</span>
between
<a class="link" href="mysqlslap.html#option_mysqlslap_password">
<code class="option">
--password=
</code>
</a>
or
<code class="option">
-p
</code>
and the password following it. If no
password option is specified, the default is to send no
password.
</p>
<p>
Specifying a password on the command line should be
considered insecure. To avoid giving the password on the
command line, use an option file. See
<a class="xref" href="password-security-user.html" title="8.1.2.1 End-User Guidelines for Password Security">
Section 8.1.2.1, “End-User Guidelines for Password Security”
</a>
.
</p>
<p>
To explicitly specify that there is no password and that
<a class="link" href="mysqlslap.html" title="6.5.7 mysqlslap — A Load Emulation Client">
<span class="command">
<strong>
mysqlslap
</strong>
</span>
</a>
should not prompt for one, use
the
<a class="link" href="mysqlslap.html#option_mysqlslap_password">
<code class="option">
--skip-password
</code>
</a>
option.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_password1">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_password1">
<code class="option">
--password1[=
<em class="replaceable">
<code>
pass_val
</code>
</em>
]
</code>
</a>
</p>
<a class="indexterm" name="idm46045308934256">
</a>
<p>
The password for multifactor authentication factor 1 of the
MySQL account used for connecting to the server. The
password value is optional. If not given,
<a class="link" href="mysqlslap.html" title="6.5.7 mysqlslap — A Load Emulation Client">
<span class="command">
<strong>
mysqlslap
</strong>
</span>
</a>
prompts for one. If given,
there must be
<span class="emphasis">
<em>
no space
</em>
</span>
between
<a class="link" href="mysqlslap.html#option_mysqlslap_password1">
<code class="option">
--password1=
</code>
</a>
and the
password following it. If no password option is specified,
the default is to send no password.
</p>
<p>
Specifying a password on the command line should be
considered insecure. To avoid giving the password on the
command line, use an option file. See
<a class="xref" href="password-security-user.html" title="8.1.2.1 End-User Guidelines for Password Security">
Section 8.1.2.1, “End-User Guidelines for Password Security”
</a>
.
</p>
<p>
To explicitly specify that there is no password and that
<a class="link" href="mysqlslap.html" title="6.5.7 mysqlslap — A Load Emulation Client">
<span class="command">
<strong>
mysqlslap
</strong>
</span>
</a>
should not prompt for one, use
the
<a class="link" href="mysqlslap.html#option_mysqlslap_password1">
<code class="option">
--skip-password1
</code>
</a>
option.
</p>
<p>
<a class="link" href="mysqlslap.html#option_mysqlslap_password1">
<code class="option">
--password1
</code>
</a>
and
<a class="link" href="mysqlslap.html#option_mysqlslap_password">
<code class="option">
--password
</code>
</a>
are synonymous,
as are
<a class="link" href="mysqlslap.html#option_mysqlslap_password1">
<code class="option">
--skip-password1
</code>
</a>
and
<a class="link" href="mysqlslap.html#option_mysqlslap_password">
<code class="option">
--skip-password
</code>
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_password2">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_password2">
<code class="option">
--password2[=
<em class="replaceable">
<code>
pass_val
</code>
</em>
]
</code>
</a>
</p>
<a class="indexterm" name="idm46045308918960">
</a>
<p>
The password for multifactor authentication factor 2 of the
MySQL account used for connecting to the server. The
semantics of this option are similar to the semantics for
<a class="link" href="mysqlslap.html#option_mysqlslap_password1">
<code class="option">
--password1
</code>
</a>
; see the
description of that option for details.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_password3">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_password3">
<code class="option">
--password3[=
<em class="replaceable">
<code>
pass_val
</code>
</em>
]
</code>
</a>
</p>
<a class="indexterm" name="idm46045308913728">
</a>
<p>
The password for multifactor authentication factor 3 of the
MySQL account used for connecting to the server. The
semantics of this option are similar to the semantics for
<a class="link" href="mysqlslap.html#option_mysqlslap_password1">
<code class="option">
--password1
</code>
</a>
; see the
description of that option for details.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_pipe">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_pipe">
<code class="option">
--pipe
</code>
</a>
,
<code class="option">
-W
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for pipe">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--pipe
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045308901056">
</a>
<a class="indexterm" name="idm46045308899568">
</a>
<p>
On Windows, connect to the server using a named pipe. This
option applies only if the server was started with the
<a class="link" href="server-system-variables.html#sysvar_named_pipe">
<code class="literal">
named_pipe
</code>
</a>
system variable
enabled to support named-pipe connections. In addition, the
user making the connection must be a member of the Windows
group specified by the
<a class="link" href="server-system-variables.html#sysvar_named_pipe_full_access_group">
<code class="literal">
named_pipe_full_access_group
</code>
</a>
system variable.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_plugin-dir">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_plugin-dir">
<code class="option">
--plugin-dir=
<em class="replaceable">
<code>
dir_name
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for plugin-dir">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--plugin-dir=dir_name
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Directory name
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045308884944">
</a>
<a class="indexterm" name="idm46045308883456">
</a>
<p>
The directory in which to look for plugins. Specify this
option if the
<a class="link" href="mysqlslap.html#option_mysqlslap_default-auth">
<code class="option">
--default-auth
</code>
</a>
option is
used to specify an authentication plugin but
<a class="link" href="mysqlslap.html" title="6.5.7 mysqlslap — A Load Emulation Client">
<span class="command">
<strong>
mysqlslap
</strong>
</span>
</a>
does not find it. See
<a class="xref" href="pluggable-authentication.html" title="8.2.17 Pluggable Authentication">
Section 8.2.17, “Pluggable Authentication”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_port">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_port">
<code class="option">
--port=
<em class="replaceable">
<code>
port_num
</code>
</em>
</code>
</a>
,
<code class="option">
-P
<em class="replaceable">
<code>
port_num
</code>
</em>
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for port">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--port=port_num
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Numeric
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
3306
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045308865456">
</a>
<a class="indexterm" name="idm46045308863968">
</a>
<p>
For TCP/IP connections, the port number to use.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_post-query">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_post-query">
<code class="option">
--post-query=
<em class="replaceable">
<code>
value
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for post-query">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--post-query=value
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045308852096">
</a>
<a class="indexterm" name="idm46045308850608">
</a>
<p>
The file or string containing the statement to execute after
the tests have completed. This execution is not counted for
timing purposes.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_post-system">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_post-system">
<code class="option">
--post-system=
<em class="replaceable">
<code>
str
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for post-system">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--post-system=str
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045308838640">
</a>
<a class="indexterm" name="idm46045308837152">
</a>
<p>
The string to execute using
<code class="literal">
system()
</code>
after the tests have completed. This execution is not
counted for timing purposes.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_pre-query">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_pre-query">
<code class="option">
--pre-query=
<em class="replaceable">
<code>
value
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for pre-query">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--pre-query=value
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045308824544">
</a>
<a class="indexterm" name="idm46045308823056">
</a>
<p>
The file or string containing the statement to execute
before running the tests. This execution is not counted for
timing purposes.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_pre-system">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_pre-system">
<code class="option">
--pre-system=
<em class="replaceable">
<code>
str
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for pre-system">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--pre-system=str
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045308811104">
</a>
<a class="indexterm" name="idm46045308809680">
</a>
<p>
The string to execute using
<code class="literal">
system()
</code>
before running the tests. This execution is not counted for
timing purposes.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_print-defaults">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_print-defaults">
<code class="option">
--print-defaults
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for print-defaults">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--print-defaults
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045308800080">
</a>
<a class="indexterm" name="idm46045308798688">
</a>
<p>
Print the program name and all options that it gets from
option files.
</p>
<p>
For additional information about this and other option-file
options, see
<a class="xref" href="option-file-options.html" title="6.2.2.3 Command-Line Options that Affect Option-File Handling">
Section 6.2.2.3, “Command-Line Options that Affect Option-File Handling”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_protocol">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_protocol">
<code class="option">
--protocol={TCP|SOCKET|PIPE|MEMORY}
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for protocol">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--protocol=type
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
[see text]
</code>
</td>
</tr>
<tr>
<th>
Valid Values
</th>
<td>
<p class="valid-value">
<code class="literal">
TCP
</code>
</p>
<p class="valid-value">
<code class="literal">
SOCKET
</code>
</p>
<p class="valid-value">
<code class="literal">
PIPE
</code>
</p>
<p class="valid-value">
<code class="literal">
MEMORY
</code>
</p>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045308779072">
</a>
<a class="indexterm" name="idm46045308777680">
</a>
<p>
The transport protocol to use for connecting to the server.
It is useful when the other connection parameters normally
result in use of a protocol other than the one you want. For
details on the permissible values, see
<a class="xref" href="transport-protocols.html" title="6.2.7 Connection Transport Protocols">
Section 6.2.7, “Connection Transport Protocols”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_query">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_query">
<code class="option">
--query=
<em class="replaceable">
<code>
value
</code>
</em>
</code>
</a>
,
<code class="option">
-q
<em class="replaceable">
<code>
value
</code>
</em>
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for query">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--query=value
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045308765152">
</a>
<a class="indexterm" name="idm46045308763760">
</a>
<p>
The file or string containing the
<a class="link" href="select.html" title="15.2.13 SELECT Statement">
<code class="literal">
SELECT
</code>
</a>
statement to use for
retrieving data.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_server-public-key-path">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_server-public-key-path">
<code class="option">
--server-public-key-path=
<em class="replaceable">
<code>
file_name
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for server-public-key-path">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--server-public-key-path=file_name
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
File name
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045308751520">
</a>
<a class="indexterm" name="idm46045308750128">
</a>
<p>
The path name to a file in PEM format containing a
client-side copy of the public key required by the server
for RSA key pair-based password exchange. This option
applies to clients that authenticate with the
<code class="literal">
sha256_password
</code>
(deprecated) or
<code class="literal">
caching_sha2_password
</code>
authentication
plugin. This option is ignored for accounts that do not
authenticate with one of those plugins. It is also ignored
if RSA-based password exchange is not used, as is the case
when the client connects to the server using a secure
connection.
</p>
<p>
If
<a class="link" href="mysqlslap.html#option_mysqlslap_server-public-key-path">
<code class="option">
--server-public-key-path=
<em class="replaceable">
<code>
file_name
</code>
</em>
</code>
</a>
is given and specifies a valid public key file, it takes
precedence over
<a class="link" href="mysqlslap.html#option_mysqlslap_get-server-public-key">
<code class="option">
--get-server-public-key
</code>
</a>
.
</p>
<p>
For
<code class="literal">
sha256_password
</code>
(deprecated), this
option applies only if MySQL was built using OpenSSL.
</p>
<p>
For information about the
<code class="literal">
sha256_password
</code>
and
<code class="literal">
caching_sha2_password
</code>
plugins, see
<a class="xref" href="sha256-pluggable-authentication.html" title="8.4.1.3 SHA-256 Pluggable Authentication">
Section 8.4.1.3, “SHA-256 Pluggable Authentication”
</a>
, and
<a class="xref" href="caching-sha2-pluggable-authentication.html" title="8.4.1.2 Caching SHA-2 Pluggable Authentication">
Section 8.4.1.2, “Caching SHA-2 Pluggable Authentication”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_shared-memory-base-name">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_shared-memory-base-name">
<code class="option">
--shared-memory-base-name=
<em class="replaceable">
<code>
name
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for shared-memory-base-name">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--shared-memory-base-name=name
</code>
</td>
</tr>
<tr>
<th>
Platform Specific
</th>
<td>
Windows
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045308731152">
</a>
<a class="indexterm" name="idm46045308729760">
</a>
<p>
On Windows, the shared-memory name to use for connections
made using shared memory to a local server. The default
value is
<code class="literal">
MYSQL
</code>
. The shared-memory name is
case-sensitive.
</p>
<p>
This option applies only if the server was started with the
<a class="link" href="server-system-variables.html#sysvar_shared_memory">
<code class="literal">
shared_memory
</code>
</a>
system
variable enabled to support shared-memory connections.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_silent">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_silent">
<code class="option">
--silent
</code>
</a>
,
<code class="option">
-s
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for silent">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--silent
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045308718080">
</a>
<a class="indexterm" name="idm46045308716688">
</a>
<p>
Silent mode. No output.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_socket">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_socket">
<code class="option">
--socket=
<em class="replaceable">
<code>
path
</code>
</em>
</code>
</a>
,
<code class="option">
-S
<em class="replaceable">
<code>
path
</code>
</em>
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for socket">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--socket={file_name|pipe_name}
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045308704960">
</a>
<a class="indexterm" name="idm46045308703568">
</a>
<p>
For connections to
<code class="literal">
localhost
</code>
, the Unix
socket file to use, or, on Windows, the name of the named
pipe to use.
</p>
<p>
On Windows, this option applies only if the server was
started with the
<a class="link" href="server-system-variables.html#sysvar_named_pipe">
<code class="literal">
named_pipe
</code>
</a>
system variable enabled to support named-pipe connections.
In addition, the user making the connection must be a member
of the Windows group specified by the
<a class="link" href="server-system-variables.html#sysvar_named_pipe_full_access_group">
<code class="literal">
named_pipe_full_access_group
</code>
</a>
system variable.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_sql-mode">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_sql-mode">
<code class="option">
--sql-mode=
<em class="replaceable">
<code>
mode
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for sql-mode">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--sql-mode=mode
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045308689024">
</a>
<a class="indexterm" name="idm46045308687632">
</a>
<p>
Set the SQL mode for the client session.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_ssl">
</a>
<code class="option">
--ssl*
</code>
</p>
<a class="indexterm" name="idm46045308684384">
</a>
<a class="indexterm" name="idm46045308682992">
</a>
<p>
Options that begin with
<code class="option">
--ssl
</code>
specify
whether to connect to the server using encryption and
indicate where to find SSL keys and certificates. See
<a class="xref" href="connection-options.html#encrypted-connection-options" title="Command Options for Encrypted Connections">
Command Options for Encrypted Connections
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_ssl-fips-mode">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_ssl-fips-mode">
<code class="option">
--ssl-fips-mode={OFF|ON|STRICT}
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ssl-fips-mode">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ssl-fips-mode={OFF|ON|STRICT}
</code>
</td>
</tr>
<tr>
<th>
Deprecated
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Enumeration
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
OFF
</code>
</td>
</tr>
<tr>
<th>
Valid Values
</th>
<td>
<p class="valid-value">
<code class="literal">
OFF
</code>
</p>
<p class="valid-value">
<code class="literal">
ON
</code>
</p>
<p class="valid-value">
<code class="literal">
STRICT
</code>
</p>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045308662320">
</a>
<a class="indexterm" name="idm46045308660928">
</a>
<p>
Controls whether to enable FIPS mode on the client side. The
<a class="link" href="mysqlslap.html#option_mysqlslap_ssl-fips-mode">
<code class="option">
--ssl-fips-mode
</code>
</a>
option
differs from other
<code class="option">
--ssl-
<em class="replaceable">
<code>
xxx
</code>
</em>
</code>
options in that it is not used to establish encrypted
connections, but rather to affect which cryptographic
operations to permit. See
<a class="xref" href="fips-mode.html" title="8.8 FIPS Support">
Section 8.8, “FIPS Support”
</a>
.
</p>
<p>
These
<a class="link" href="mysqlslap.html#option_mysqlslap_ssl-fips-mode">
<code class="option">
--ssl-fips-mode
</code>
</a>
values are permitted:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
<code class="literal">
OFF
</code>
: Disable FIPS mode.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
ON
</code>
: Enable FIPS mode.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
STRICT
</code>
: Enable
<span class="quote">
“
<span class="quote">
strict
</span>
”
</span>
FIPS mode.
</p>
</li>
</ul>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
If the OpenSSL FIPS Object Module is not available, the
only permitted value for
<a class="link" href="mysqlslap.html#option_mysqlslap_ssl-fips-mode">
<code class="option">
--ssl-fips-mode
</code>
</a>
is
<code class="literal">
OFF
</code>
. In this case, setting
<a class="link" href="mysqlslap.html#option_mysqlslap_ssl-fips-mode">
<code class="option">
--ssl-fips-mode
</code>
</a>
to
<code class="literal">
ON
</code>
or
<code class="literal">
STRICT
</code>
causes
the client to produce a warning at startup and to operate
in non-FIPS mode.
</p>
</div>
<p>
This option is deprecated. Expect it to be removed in a
future version of MySQL.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_tls-ciphersuites">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_tls-ciphersuites">
<code class="option">
--tls-ciphersuites=
<em class="replaceable">
<code>
ciphersuite_list
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for tls-ciphersuites">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--tls-ciphersuites=ciphersuite_list
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045308636640">
</a>
<a class="indexterm" name="idm46045308635248">
</a>
<p>
The permissible ciphersuites for encrypted connections that
use TLSv1.3. The value is a list of one or more
colon-separated ciphersuite names. The ciphersuites that can
be named for this option depend on the SSL library used to
compile MySQL. For details, see
<a class="xref" href="encrypted-connection-protocols-ciphers.html" title="8.3.2 Encrypted Connection TLS Protocols and Ciphers">
Section 8.3.2, “Encrypted Connection TLS Protocols and Ciphers”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_tls-sni-servername">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_tls-sni-servername">
<code class="option">
--tls-sni-servername=
<em class="replaceable">
<code>
server_name
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for tls-sni-servername">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--tls-sni-servername=server_name
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045308623312">
</a>
<a class="indexterm" name="idm46045308621920">
</a>
<p>
When specified, the name is passed to the
<code class="literal">
libmysqlclient
</code>
C API library using the
<code class="literal">
MYSQL_OPT_TLS_SNI_SERVERNAME
</code>
option of
<a class="ulink" href="/doc/c-api/8.4/en/mysql-options.html" target="_top">
<code class="literal">
mysql_options()
</code>
</a>
. The server
name is not case-sensitive. To show which server name the
client specified for the current session, if any, check the
<a class="link" href="server-status-variables.html#statvar_Tls_sni_server_name">
<code class="literal">
Tls_sni_server_name
</code>
</a>
status
variable.
</p>
<p>
Server Name Indication (SNI) is an extension to the TLS
protocol (OpenSSL must be compiled using TLS extensions for
this option to function). The MySQL implementation of SNI
represents the client-side only.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_tls-version">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_tls-version">
<code class="option">
--tls-version=
<em class="replaceable">
<code>
protocol_list
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for tls-version">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--tls-version=protocol_list
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<p class="valid-value">
<code class="literal">
TLSv1,TLSv1.1,TLSv1.2,TLSv1.3
</code>
(OpenSSL 1.1.1 or higher)
</p>
<p class="valid-value">
<code class="literal">
TLSv1,TLSv1.1,TLSv1.2
</code>
(otherwise)
</p>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045308602752">
</a>
<a class="indexterm" name="idm46045308601360">
</a>
<p>
The permissible TLS protocols for encrypted connections. The
value is a list of one or more comma-separated protocol
names. The protocols that can be named for this option
depend on the SSL library used to compile MySQL. For
details, see
<a class="xref" href="encrypted-connection-protocols-ciphers.html" title="8.3.2 Encrypted Connection TLS Protocols and Ciphers">
Section 8.3.2, “Encrypted Connection TLS Protocols and Ciphers”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_user">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_user">
<code class="option">
--user=
<em class="replaceable">
<code>
user_name
</code>
</em>
</code>
</a>
,
<code class="option">
-u
<em class="replaceable">
<code>
user_name
</code>
</em>
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for user">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--user=user_name,
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045308588816">
</a>
<a class="indexterm" name="idm46045308587424">
</a>
<p>
The user name of the MySQL account to use for connecting to
the server.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_verbose">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_verbose">
<code class="option">
--verbose
</code>
</a>
,
<code class="option">
-v
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for verbose">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--verbose
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045308578064">
</a>
<a class="indexterm" name="idm46045308576672">
</a>
<p>
Verbose mode. Print more information about what the program
does. This option can be used multiple times to increase the
amount of information.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_version">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_version">
<code class="option">
--version
</code>
</a>
,
<code class="option">
-V
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for version">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--version
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045308567232">
</a>
<a class="indexterm" name="idm46045308565840">
</a>
<p>
Display version information and exit.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlslap_zstd-compression-level">
</a>
<a class="link" href="mysqlslap.html#option_mysqlslap_zstd-compression-level">
<code class="option">
--zstd-compression-level=
<em class="replaceable">
<code>
level
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for zstd-compression-level">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--zstd-compression-level=#
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045308554672">
</a>
<a class="indexterm" name="idm46045308553280">
</a>
<p>
The compression level to use for connections to the server
that use the
<code class="literal">
zstd
</code>
compression algorithm.
The permitted levels are from 1 to 22, with larger values
indicating increasing levels of compression. The default
<code class="literal">
zstd
</code>
compression level is 3. The
compression level setting has no effect on connections that
do not use
<code class="literal">
zstd
</code>
compression.
</p>
<p>
For more information, see
<a class="xref" href="connection-compression-control.html" title="6.2.8 Connection Compression Control">
Section 6.2.8, “Connection Compression Control”
</a>
.
</p>
</li>
</ul>
</div>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/mysql-cluster-tde-implementation.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title">
<a name="mysql-cluster-tde-implementation">
</a>
25.6.14.2 NDB File System Encryption Implementation
</h4>
</div>
</div>
</div>
<p>
For
<code class="literal">
NDB
</code>
Transparent Data Encryption (TDE),
data nodes encrypt user data at rest, with security provided by
a password (file system password), which is used to encrypt and
decrypt a secrets file on each data node. The secrets file
contains a Node Master Key (NMK), a key used later to encrypt
the different file types used for persistence.
<code class="literal">
NDB
</code>
TDE encrypts user data files including
LCP files, redo log files, tablespace files, and undo log files.
</p>
<p>
You can use the
<a class="link" href="mysql-cluster-programs-ndbxfrm.html" title="25.5.32 ndbxfrm — Compress, Decompress, Encrypt, and Decrypt Files Created by NDB Cluster">
<span class="command">
<strong>
ndbxfrm
</strong>
</span>
</a>
utility to see
whether a file is encrypted, as shown here:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-terminal"><div class="docs-select-all right" id="sa49272191"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">> ndbxfrm <span class="token property">-i</span> ndb_5_fs/LCP/0/T2F0<span class="token punctuation">.</span>Data
File<span class="token attr-value"><span class="token punctuation">=</span>ndb_5_fs/LCP/0/T2F0.Data,</span> compression<span class="token attr-value"><span class="token punctuation">=</span>no,</span> encryption<span class="token attr-value"><span class="token punctuation">=</span>yes</span>
> ndbxfrm <span class="token property">-i</span> ndb_6_fs/LCP/0/T2F0<span class="token punctuation">.</span>Data
File<span class="token attr-value"><span class="token punctuation">=</span>ndb_6_fs/LCP/0/T2F0.Data,</span> compression<span class="token attr-value"><span class="token punctuation">=</span>no,</span> encryption<span class="token attr-value"><span class="token punctuation">=</span>no</span></code></pre>
</div>
<p>
It is possible to obtain the key from the secrets file using the
<a class="link" href="mysql-cluster-programs-ndb-secretsfile-reader.html" title="25.5.24 ndb_secretsfile_reader — Obtain Key Information from an Encrypted NDB Data File">
<span class="command">
<strong>
ndb_secretsfile_reader
</strong>
</span>
</a>
program, like this:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-terminal"><div class="docs-select-all right" id="sa34315366"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">> ndb_secretsfile_reader <span class="token constant">--filesystem-password</span><span class="token attr-value"><span class="token punctuation">=</span>54kl14</span> ndb_5_fs/D1/NDBCNTR/S0<span class="token punctuation">.</span>sysfile
ndb_secretsfile_reader<span class="token punctuation">:</span> <span class="token punctuation">[</span>Warning<span class="token punctuation">]</span> Using a password on the command line interface can be insecure<span class="token punctuation">.</span>
cac256e18b2ddf6b5ef82d99a72f18e864b78453cc7fa40bfaf0c40b91122d18</code></pre>
</div>
<p>
The per-node key hierarchy can be represented as follows:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
A user-supplied passphrase (P) is processed by a
key-derivation function using a random salt to generate a
unique passphase key (PK).
</p>
</li>
<li class="listitem">
<p>
The PK (unique to each node) encrypts the data on each node
in its own secrets file.
</p>
</li>
<li class="listitem">
<p>
The data in the secrets file includes a unique, randomly
generated Node Master Key (NMK).
</p>
</li>
<li class="listitem">
<p>
The NMK encrypts (using wrapping) one or more randomly
generated data encryption key (DEK) values in the header of
each encrypted file (including LCP and TS files, and redo
and undo logs).
</p>
</li>
<li class="listitem">
<p>
Data encryption key values (DEK
<sub>
0
</sub>
,
..., DEK
<sub>
n
</sub>
) are used for encryption of
[subsets of] data in each file.
</p>
</li>
</ul>
</div>
<p>
The passphrase indirectly encrypts the secrets file containing
the random NMK, which encrypts a portion of the header of each
encrypted file on the node. The encrypted file header contains
random data keys used for the data in that file.
</p>
<p>
Encryption is implemented transparently by the
<a class="ulink" href="/doc/ndb-internals/en/ndb-internals-kernel-blocks-ndbfs.html" target="_top">
<code class="literal">
NDBFS
</code>
</a>
layer within the data
nodes.
<code class="literal">
NDBFS
</code>
internal client blocks operate
on their files as normal;
<code class="literal">
NDBFS
</code>
wraps the
physical file with extra header and footer information
supporting encryption, and encrypts and decrypts data as it is
read from and written to the file. The wrapped file format is
referred to as
<code class="literal">
ndbxfrm1
</code>
.
</p>
<p>
The node password is processed with PBKDF2 and the random salt
to encrypt the secrets file, which contains the randomly
generated NMK which is used to encrypt the randomly generated
data encryption key in each encrypted file.
</p>
<p>
The work of encryption and decryption is performed in the NDBFS
I/O threads (rather than in signal execution threads such as
main, tc, ldm, or rep). This is similar to what happens with
compressed LCPs and compressed backups, and normally results in
increased I/O thread CPU usage; you may wish to adjust
<a class="link" href="mysql-cluster-ndbd-definition.html#ndbparam-ndbmtd-threadconfig">
<code class="literal">
ThreadConfig
</code>
</a>
(if in
use) with regard to the I/O threads.
</p>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/drop-user.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title">
<a name="drop-user">
</a>
15.7.1.5 DROP USER Statement
</h4>
</div>
</div>
</div>
<a class="indexterm" name="idm46045174045120">
</a>
<a class="indexterm" name="idm46045174044048">
</a>
<a class="indexterm" name="idm46045174042560">
</a>
<a class="indexterm" name="idm46045174041072">
</a>
<a class="indexterm" name="idm46045174039584">
</a>
<a class="indexterm" name="idm46045174038096">
</a>
<a class="indexterm" name="idm46045174036608">
</a>
<a class="indexterm" name="idm46045174035120">
</a>
<a class="indexterm" name="idm46045174033632">
</a>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa12426837"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">DROP</span> <span class="token keyword">USER</span> <span class="token punctuation">[</span><span class="token keyword">IF</span> <span class="token keyword">EXISTS</span><span class="token punctuation">]</span> <span class="token keyword"><em class="replaceable">user</em></span> <span class="token punctuation">[</span><span class="token punctuation">,</span> <span class="token keyword"><em class="replaceable">user</em></span><span class="token punctuation">]</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span></code></pre>
</div>
<p>
The
<a class="link" href="drop-user.html" title="15.7.1.5 DROP USER Statement">
<code class="literal">
DROP USER
</code>
</a>
statement removes
one or more MySQL accounts and their privileges. It removes
privilege rows for the account from all grant tables.
</p>
<p>
Roles named in the
<a class="link" href="server-system-variables.html#sysvar_mandatory_roles">
<code class="literal">
mandatory_roles
</code>
</a>
system variable
value cannot be dropped.
</p>
<p>
To use
<a class="link" href="drop-user.html" title="15.7.1.5 DROP USER Statement">
<code class="literal">
DROP USER
</code>
</a>
, you must have
the global
<a class="link" href="privileges-provided.html#priv_create-user">
<code class="literal">
CREATE USER
</code>
</a>
privilege,
or the
<a class="link" href="privileges-provided.html#priv_delete">
<code class="literal">
DELETE
</code>
</a>
privilege for the
<code class="literal">
mysql
</code>
system schema. When the
<a class="link" href="server-system-variables.html#sysvar_read_only">
<code class="literal">
read_only
</code>
</a>
system variable is
enabled,
<a class="link" href="drop-user.html" title="15.7.1.5 DROP USER Statement">
<code class="literal">
DROP USER
</code>
</a>
additionally
requires the
<a class="link" href="privileges-provided.html#priv_connection-admin">
<code class="literal">
CONNECTION_ADMIN
</code>
</a>
privilege (or the deprecated
<a class="link" href="privileges-provided.html#priv_super">
<code class="literal">
SUPER
</code>
</a>
privilege).
</p>
<p>
<a class="link" href="drop-user.html" title="15.7.1.5 DROP USER Statement">
<code class="literal">
DROP USER
</code>
</a>
fails with an error if
any account to be dropped is named as the
<code class="literal">
DEFINER
</code>
attribute for any stored object.
(That is, the statement fails if dropping an account would cause
a stored object to become orphaned.) To perform the operation
anyway, you must have the
<a class="link" href="privileges-provided.html#priv_set-any-definer">
<code class="literal">
SET_ANY_DEFINER
</code>
</a>
or
<a class="link" href="privileges-provided.html#priv_allow-nonexistent-definer">
<code class="literal">
ALLOW_NONEXISTENT_DEFINER
</code>
</a>
privilege; in this case, the statement succeeds with a warning
rather than failing with an error. For additional information,
including how to identify which objects name a given account as
the
<code class="literal">
DEFINER
</code>
attribute, see
<a class="xref" href="stored-objects-security.html#stored-objects-security-orphan-objects" title="Orphan Stored Objects">
Orphan Stored Objects
</a>
.
</p>
<p>
<a class="link" href="drop-user.html" title="15.7.1.5 DROP USER Statement">
<code class="literal">
DROP USER
</code>
</a>
either succeeds for all
named users or rolls back and has no effect if any error occurs.
By default, an error occurs if you try to drop a user that does
not exist. If the
<code class="literal">
IF EXISTS
</code>
clause is given,
the statement produces a warning for each named user that does
not exist, rather than an error.
</p>
<p>
The statement is written to the binary log if it succeeds, but
not if it fails; in that case, rollback occurs and no changes
are made. A statement written to the binary log includes all
named users. If the
<code class="literal">
IF EXISTS
</code>
clause is
given, this includes even users that do not exist and were not
dropped.
</p>
<p>
Each account name uses the format described in
<a class="xref" href="account-names.html" title="8.2.4 Specifying Account Names">
Section 8.2.4, “Specifying Account Names”
</a>
. For example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa72428483"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">DROP</span> <span class="token keyword">USER</span> <span class="token string">'jeffrey'</span>@<span class="token string">'localhost'</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
The host name part of the account name, if omitted, defaults to
<code class="literal">
'%'
</code>
.
</p>
<div class="important" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Important
</div>
<p>
<a class="link" href="drop-user.html" title="15.7.1.5 DROP USER Statement">
<code class="literal">
DROP USER
</code>
</a>
does not
automatically close any open user sessions. Rather, in the
event that a user with an open session is dropped, the
statement does not take effect until that user's session is
closed. Once the session is closed, the user is dropped, and
that user's next attempt to log in fails.
<span class="emphasis">
<em>
This
is by design
</em>
</span>
.
</p>
</div>
<p>
<a class="link" href="drop-user.html" title="15.7.1.5 DROP USER Statement">
<code class="literal">
DROP USER
</code>
</a>
does not automatically
drop or invalidate databases or objects within them that the old
user created. This includes stored programs or views for which
the
<code class="literal">
DEFINER
</code>
attribute names the dropped user.
Attempts to access such objects may produce an error if they
execute in definer security context. (For information about
security context, see
<a class="xref" href="stored-objects-security.html" title="27.6 Stored Object Access Control">
Section 27.6, “Stored Object Access Control”
</a>
.)
</p>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/mysqladmin.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a name="mysqladmin">
</a>
6.5.2 mysqladmin — A MySQL Server Administration Program
</h3>
</div>
</div>
</div>
<a class="indexterm" name="idm46045317096016">
</a>
<a class="indexterm" name="idm46045317095104">
</a>
<a class="indexterm" name="idm46045317093744">
</a>
<p>
<a class="link" href="mysqladmin.html" title="6.5.2 mysqladmin — A MySQL Server Administration Program">
<span class="command">
<strong>
mysqladmin
</strong>
</span>
</a>
is a client for performing
administrative operations. You can use it to check the server's
configuration and current status, to create and drop databases,
and more.
</p>
<p>
Invoke
<a class="link" href="mysqladmin.html" title="6.5.2 mysqladmin — A MySQL Server Administration Program">
<span class="command">
<strong>
mysqladmin
</strong>
</span>
</a>
like this:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa67669590"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">mysqladmin <span class="token punctuation">[</span><em class="replaceable">options</em><span class="token punctuation">]</span> <em class="replaceable">command</em> <span class="token punctuation">[</span><em class="replaceable">command-arg</em><span class="token punctuation">]</span> <span class="token punctuation">[</span><em class="replaceable">command</em> <span class="token punctuation">[</span><em class="replaceable">command-arg</em><span class="token punctuation">]</span><span class="token punctuation">]</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span></code></pre>
</div>
<p>
<a class="link" href="mysqladmin.html" title="6.5.2 mysqladmin — A MySQL Server Administration Program">
<span class="command">
<strong>
mysqladmin
</strong>
</span>
</a>
supports the following commands.
Some of the commands take an argument following the command
name.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<a name="command_mysqladmin_db_name">
</a>
<code class="literal">
create
<em class="replaceable">
<code>
db_name
</code>
</em>
</code>
</p>
<p>
Create a new database named
<em class="replaceable">
<code>
db_name
</code>
</em>
.
</p>
</li>
<li class="listitem">
<p>
<a name="command_mysqladmin_debug">
</a>
<code class="literal">
debug
</code>
</p>
<p>
Tells the server to write debug information to the error
log. The connected user must have the
<a class="link" href="privileges-provided.html#priv_super">
<code class="literal">
SUPER
</code>
</a>
privilege. Format and
content of this information is subject to change.
</p>
<p>
This includes information about the Event Scheduler. See
<a class="xref" href="events-status-info.html" title="27.4.5 Event Scheduler Status">
Section 27.4.5, “Event Scheduler Status”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="command_mysqladmin_drop">
</a>
<code class="literal">
drop
<em class="replaceable">
<code>
db_name
</code>
</em>
</code>
</p>
<p>
Delete the database named
<em class="replaceable">
<code>
db_name
</code>
</em>
and all its tables.
</p>
</li>
<li class="listitem">
<p>
<a name="command_mysqladmin_extended-status">
</a>
<code class="literal">
extended-status
</code>
</p>
<p>
Display the server status variables and their values.
</p>
</li>
<li class="listitem">
<p>
<a name="command_mysqladmin_flush-hosts">
</a>
<code class="literal">
flush-hosts
</code>
</p>
<p>
Flush all information in the host cache. See
<a class="xref" href="host-cache.html" title="7.1.12.3 DNS Lookups and the Host Cache">
Section 7.1.12.3, “DNS Lookups and the Host Cache”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="command_mysqladmin_flush-logs">
</a>
<code class="literal">
flush-logs [
<em class="replaceable">
<code>
log_type
</code>
</em>
...]
</code>
</p>
<p>
Flush all logs.
</p>
<p>
The
<a class="link" href="mysqladmin.html" title="6.5.2 mysqladmin — A MySQL Server Administration Program">
<span class="command">
<strong>
mysqladmin flush-logs
</strong>
</span>
</a>
command permits
optional log types to be given, to specify which logs to
flush. Following the
<code class="literal">
flush-logs
</code>
command,
you can provide a space-separated list of one or more of the
following log types:
<code class="literal">
binary
</code>
,
<code class="literal">
engine
</code>
,
<code class="literal">
error
</code>
,
<code class="literal">
general
</code>
,
<code class="literal">
relay
</code>
,
<code class="literal">
slow
</code>
. These correspond to the log types
that can be specified for the
<a class="link" href="flush.html#flush-logs">
<code class="literal">
FLUSH
LOGS
</code>
</a>
SQL statement.
</p>
</li>
<li class="listitem">
<p>
<a name="command_mysqladmin_flush-privileges">
</a>
<code class="literal">
flush-privileges
</code>
</p>
<p>
Reload the grant tables (same as
<code class="literal">
reload
</code>
).
</p>
</li>
<li class="listitem">
<p>
<a name="command_mysqladmin_flush-status">
</a>
<code class="literal">
flush-status
</code>
</p>
<p>
Clear status variables.
</p>
</li>
<li class="listitem">
<p>
<a name="command_mysqladmin_flush-tables">
</a>
<code class="literal">
flush-tables
</code>
</p>
<p>
Flush all tables.
</p>
</li>
<li class="listitem">
<p>
<a name="command_mysqladmin_kill">
</a>
<code class="literal">
kill
<em class="replaceable">
<code>
id
</code>
</em>
,
<em class="replaceable">
<code>
id
</code>
</em>
,...
</code>
</p>
<p>
Kill server threads. If multiple thread ID values are given,
there must be no spaces in the list.
</p>
<p>
To kill threads belonging to other users, the connected user
must have the
<a class="link" href="privileges-provided.html#priv_connection-admin">
<code class="literal">
CONNECTION_ADMIN
</code>
</a>
privilege
(or the deprecated
<a class="link" href="privileges-provided.html#priv_super">
<code class="literal">
SUPER
</code>
</a>
privilege).
</p>
</li>
<li class="listitem">
<p>
<a name="command_mysqladmin_password">
</a>
<code class="literal">
password
<em class="replaceable">
<code>
new_password
</code>
</em>
</code>
</p>
<p>
Set a new password. This changes the password to
<em class="replaceable">
<code>
new_password
</code>
</em>
for the account that
you use with
<a class="link" href="mysqladmin.html" title="6.5.2 mysqladmin — A MySQL Server Administration Program">
<span class="command">
<strong>
mysqladmin
</strong>
</span>
</a>
for connecting to
the server. Thus, the next time you invoke
<a class="link" href="mysqladmin.html" title="6.5.2 mysqladmin — A MySQL Server Administration Program">
<span class="command">
<strong>
mysqladmin
</strong>
</span>
</a>
(or any other client program)
using the same account, you must specify the new password.
</p>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Warning
</div>
<p>
Setting a password using
<a class="link" href="mysqladmin.html" title="6.5.2 mysqladmin — A MySQL Server Administration Program">
<span class="command">
<strong>
mysqladmin
</strong>
</span>
</a>
should be considered
<span class="emphasis">
<em>
insecure
</em>
</span>
. On
some systems, your password becomes visible to system
status programs such as
<span class="command">
<strong>
ps
</strong>
</span>
that may be
invoked by other users to display command lines. MySQL
clients typically overwrite the command-line password
argument with zeros during their initialization sequence.
However, there is still a brief interval during which the
value is visible. Also, on some systems this overwriting
strategy is ineffective and the password remains visible
to
<span class="command">
<strong>
ps
</strong>
</span>
. (SystemV Unix systems and
perhaps others are subject to this problem.)
</p>
</div>
<p>
If the
<em class="replaceable">
<code>
new_password
</code>
</em>
value
contains spaces or other characters that are special to your
command interpreter, you need to enclose it within quotation
marks. On Windows, be sure to use double quotation marks
rather than single quotation marks; single quotation marks
are not stripped from the password, but rather are
interpreted as part of the password. For example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa16468277"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">mysqladmin password <span class="token atrule">"my new password"</span></code></pre>
</div>
<p>
The new password can be omitted following the
<code class="literal">
password
</code>
command. In this case,
<a class="link" href="mysqladmin.html" title="6.5.2 mysqladmin — A MySQL Server Administration Program">
<span class="command">
<strong>
mysqladmin
</strong>
</span>
</a>
prompts for the password
value, which enables you to avoid specifying the password on
the command line. Omitting the password value should be done
only if
<code class="literal">
password
</code>
is the final command on
the
<a class="link" href="mysqladmin.html" title="6.5.2 mysqladmin — A MySQL Server Administration Program">
<span class="command">
<strong>
mysqladmin
</strong>
</span>
</a>
command line. Otherwise,
the next argument is taken as the password.
</p>
<div class="caution" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Caution
</div>
<p>
Do not use this command used if the server was started
with the
<a class="link" href="server-options.html#option_mysqld_skip-grant-tables">
<code class="option">
--skip-grant-tables
</code>
</a>
option.
No password change is applied. This is true even if you
precede the
<code class="literal">
password
</code>
command with
<code class="literal">
flush-privileges
</code>
on the same command
line to re-enable the grant tables because the flush
operation occurs after you connect. However, you can use
<a class="link" href="mysqladmin.html" title="6.5.2 mysqladmin — A MySQL Server Administration Program">
<span class="command">
<strong>
mysqladmin flush-privileges
</strong>
</span>
</a>
to
re-enable the grant table and then use a separate
<a class="link" href="mysqladmin.html" title="6.5.2 mysqladmin — A MySQL Server Administration Program">
<span class="command">
<strong>
mysqladmin password
</strong>
</span>
</a>
command to change
the password.
</p>
</div>
</li>
<li class="listitem">
<p>
<a name="command_mysqladmin_ping">
</a>
<code class="literal">
ping
</code>
</p>
<p>
Check whether the server is available. The return status
from
<a class="link" href="mysqladmin.html" title="6.5.2 mysqladmin — A MySQL Server Administration Program">
<span class="command">
<strong>
mysqladmin
</strong>
</span>
</a>
is 0 if the server is
running, 1 if it is not. This is 0 even in case of an error
such as
<code class="literal">
Access denied
</code>
, because this means
that the server is running but refused the connection, which
is different from the server not running.
</p>
</li>
<li class="listitem">
<p>
<a name="command_mysqladmin_processlist">
</a>
<code class="literal">
processlist
</code>
</p>
<p>
Show a list of active server threads. This is like the
output of the
<a class="link" href="show-processlist.html" title="15.7.7.31 SHOW PROCESSLIST Statement">
<code class="literal">
SHOW
PROCESSLIST
</code>
</a>
statement. If the
<a class="link" href="mysqladmin.html#option_mysqladmin_verbose">
<code class="option">
--verbose
</code>
</a>
option is
given, the output is like that of
<a class="link" href="show-processlist.html" title="15.7.7.31 SHOW PROCESSLIST Statement">
<code class="literal">
SHOW FULL
PROCESSLIST
</code>
</a>
. (See
<a class="xref" href="show-processlist.html" title="15.7.7.31 SHOW PROCESSLIST Statement">
Section 15.7.7.31, “SHOW PROCESSLIST Statement”
</a>
.)
</p>
</li>
<li class="listitem">
<p>
<a name="command_mysqladmin_reload">
</a>
<code class="literal">
reload
</code>
</p>
<p>
Reload the grant tables.
</p>
</li>
<li class="listitem">
<p>
<a name="command_mysqladmin_refresh">
</a>
<code class="literal">
refresh
</code>
</p>
<p>
Flush all tables and close and open log files.
</p>
</li>
<li class="listitem">
<p>
<a name="command_mysqladmin_shutdown">
</a>
<code class="literal">
shutdown
</code>
</p>
<p>
Stop the server.
</p>
</li>
<li class="listitem">
<p>
<a name="command_mysqladmin_start-replica">
</a>
<code class="literal">
start-replica
</code>
</p>
<p>
Start replication on a replica server.
</p>
</li>
<li class="listitem">
<p>
<a name="command_mysqladmin_start-slave">
</a>
<code class="literal">
start-slave
</code>
</p>
<p>
This is a deprecated alias for start-replica.
</p>
</li>
<li class="listitem">
<p>
<a name="command_mysqladmin_status">
</a>
<code class="literal">
status
</code>
</p>
<p>
Display a short server status message.
</p>
</li>
<li class="listitem">
<p>
<a name="command_mysqladmin_stop-replica">
</a>
<code class="literal">
stop-replica
</code>
</p>
<p>
Stop replication on a replica server.
</p>
</li>
<li class="listitem">
<p>
<a name="command_mysqladmin_stop-slave">
</a>
<code class="literal">
stop-slave
</code>
</p>
<p>
This is a deprecated alias for stop-replica.
</p>
</li>
<li class="listitem">
<p>
<a name="command_mysqladmin_variables">
</a>
<code class="literal">
variables
</code>
</p>
<p>
Display the server system variables and their values.
</p>
</li>
<li class="listitem">
<p>
<a name="command_mysqladmin_version">
</a>
<code class="literal">
version
</code>
</p>
<p>
Display version information from the server.
</p>
</li>
</ul>
</div>
<p>
All commands can be shortened to any unique prefix. For example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-terminal"><div class="docs-select-all right" id="sa54888702"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal"><span class="token prompt">$> </span><span class="token command">mysqladmin</span> proc stat
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Id <span class="token punctuation">|</span> User <span class="token punctuation">|</span> Host <span class="token punctuation">|</span> db <span class="token punctuation">|</span> Command <span class="token punctuation">|</span> Time <span class="token punctuation">|</span> State <span class="token punctuation">|</span> Info <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> 51 <span class="token punctuation">|</span> jones <span class="token punctuation">|</span> localhost <span class="token punctuation">|</span> <span class="token punctuation">|</span> Query <span class="token punctuation">|</span> 0 <span class="token punctuation">|</span> <span class="token punctuation">|</span> show processlist <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
Uptime<span class="token punctuation">:</span> 1473624 Threads<span class="token punctuation">:</span> 1 Questions<span class="token punctuation">:</span> 39487
Slow queries<span class="token punctuation">:</span> 0 Opens<span class="token punctuation">:</span> 541 Flush tables<span class="token punctuation">:</span> 1
Open tables<span class="token punctuation">:</span> 19 Queries per second avg<span class="token punctuation">:</span> 0<span class="token punctuation">.</span>0268</code></pre>
</div>
<a class="indexterm" name="idm46045316978928">
</a>
<p>
The
<a class="link" href="mysqladmin.html" title="6.5.2 mysqladmin — A MySQL Server Administration Program">
<span class="command">
<strong>
mysqladmin status
</strong>
</span>
</a>
command result displays
the following values:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<a class="indexterm" name="idm46045316975024">
</a>
<a class="link" href="server-status-variables.html#statvar_Uptime">
<code class="literal">
Uptime
</code>
</a>
</p>
<p>
The number of seconds the MySQL server has been running.
</p>
</li>
<li class="listitem">
<p>
<a class="indexterm" name="idm46045316971440">
</a>
<code class="literal">
Threads
</code>
</p>
<p>
The number of active threads (clients).
</p>
</li>
<li class="listitem">
<p>
<a class="indexterm" name="idm46045316968448">
</a>
<a class="link" href="server-status-variables.html#statvar_Questions">
<code class="literal">
Questions
</code>
</a>
</p>
<p>
The number of questions (queries) from clients since the
server was started.
</p>
</li>
<li class="listitem">
<p>
<a class="indexterm" name="idm46045316964720">
</a>
<code class="literal">
Slow queries
</code>
</p>
<p>
The number of queries that have taken more than
<a class="link" href="server-system-variables.html#sysvar_long_query_time">
<code class="literal">
long_query_time
</code>
</a>
seconds.
See
<a class="xref" href="slow-query-log.html" title="7.4.5 The Slow Query Log">
Section 7.4.5, “The Slow Query Log”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a class="indexterm" name="idm46045316959664">
</a>
<code class="literal">
Opens
</code>
</p>
<p>
The number of tables the server has opened.
</p>
</li>
<li class="listitem">
<p>
<a class="indexterm" name="idm46045316956672">
</a>
<a class="indexterm" name="idm46045316955600">
</a>
<code class="literal">
Flush tables
</code>
</p>
<p>
The number of
<code class="literal">
flush-*
</code>
,
<code class="literal">
refresh
</code>
, and
<code class="literal">
reload
</code>
commands the server has executed.
</p>
</li>
<li class="listitem">
<p>
<a class="indexterm" name="idm46045316950016">
</a>
<code class="literal">
Open tables
</code>
</p>
<p>
The number of tables that currently are open.
</p>
</li>
</ul>
</div>
<p>
If you execute
<a class="link" href="mysqladmin.html" title="6.5.2 mysqladmin — A MySQL Server Administration Program">
<span class="command">
<strong>
mysqladmin shutdown
</strong>
</span>
</a>
when
connecting to a local server using a Unix socket file,
<a class="link" href="mysqladmin.html" title="6.5.2 mysqladmin — A MySQL Server Administration Program">
<span class="command">
<strong>
mysqladmin
</strong>
</span>
</a>
waits until the server's process
ID file has been removed, to ensure that the server has stopped
properly.
</p>
<a class="indexterm" name="idm46045316944336">
</a>
<a class="indexterm" name="idm46045316943248">
</a>
<a class="indexterm" name="idm46045316941760">
</a>
<a class="indexterm" name="idm46045316939856">
</a>
<p>
<a class="link" href="mysqladmin.html" title="6.5.2 mysqladmin — A MySQL Server Administration Program">
<span class="command">
<strong>
mysqladmin
</strong>
</span>
</a>
supports the following options,
which can be specified on the command line or in the
<code class="literal">
[mysqladmin]
</code>
and
<code class="literal">
[client]
</code>
groups of an option file. For information about option files
used by MySQL programs, see
<a class="xref" href="option-files.html" title="6.2.2.2 Using Option Files">
Section 6.2.2.2, “Using Option Files”
</a>
.
</p>
<div class="table">
<a name="idm46045316934464">
</a>
<p class="title">
<b>
Table 6.11 mysqladmin Options
</b>
</p>
<div class="table-contents">
<table frame="box" rules="all" summary="Command-line options available for mysqladmin.">
<colgroup>
<col style="width: 35%"/>
<col style="width: 64%"/>
</colgroup>
<thead>
<tr>
<th>
Option Name
</th>
<th>
Description
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_bind-address">
--bind-address
</a>
</td>
<td>
Use specified network interface to connect to MySQL Server
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_character-sets-dir">
--character-sets-dir
</a>
</td>
<td>
Directory where character sets can be found
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_compress">
--compress
</a>
</td>
<td>
Compress all information sent between client and server
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_compression-algorithms">
--compression-algorithms
</a>
</td>
<td>
Permitted compression algorithms for connections to server
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_connect-timeout">
--connect-timeout
</a>
</td>
<td>
Number of seconds before connection timeout
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_count">
--count
</a>
</td>
<td>
Number of iterations to make for repeated command execution
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_debug">
--debug
</a>
</td>
<td>
Write debugging log
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_debug-check">
--debug-check
</a>
</td>
<td>
Print debugging information when program exits
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_debug-info">
--debug-info
</a>
</td>
<td>
Print debugging information, memory, and CPU statistics when program exits
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_default-auth">
--default-auth
</a>
</td>
<td>
Authentication plugin to use
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_default-character-set">
--default-character-set
</a>
</td>
<td>
Specify default character set
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_defaults-extra-file">
--defaults-extra-file
</a>
</td>
<td>
Read named option file in addition to usual option files
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_defaults-file">
--defaults-file
</a>
</td>
<td>
Read only named option file
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_defaults-group-suffix">
--defaults-group-suffix
</a>
</td>
<td>
Option group suffix value
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_enable-cleartext-plugin">
--enable-cleartext-plugin
</a>
</td>
<td>
Enable cleartext authentication plugin
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_force">
--force
</a>
</td>
<td>
Continue even if an SQL error occurs
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_get-server-public-key">
--get-server-public-key
</a>
</td>
<td>
Request RSA public key from server
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_help">
--help
</a>
</td>
<td>
Display help message and exit
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_host">
--host
</a>
</td>
<td>
Host on which MySQL server is located
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_login-path">
--login-path
</a>
</td>
<td>
Read login path options from .mylogin.cnf
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_no-beep">
--no-beep
</a>
</td>
<td>
Do not beep when errors occur
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_no-defaults">
--no-defaults
</a>
</td>
<td>
Read no option files
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_no-login-paths">
--no-login-paths
</a>
</td>
<td>
Do not read login paths from the login path file
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_password">
--password
</a>
</td>
<td>
Password to use when connecting to server
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_password1">
--password1
</a>
</td>
<td>
First multifactor authentication password to use when connecting to server
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_password2">
--password2
</a>
</td>
<td>
Second multifactor authentication password to use when connecting to server
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_password3">
--password3
</a>
</td>
<td>
Third multifactor authentication password to use when connecting to server
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_pipe">
--pipe
</a>
</td>
<td>
Connect to server using named pipe (Windows only)
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_plugin-dir">
--plugin-dir
</a>
</td>
<td>
Directory where plugins are installed
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_port">
--port
</a>
</td>
<td>
TCP/IP port number for connection
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_print-defaults">
--print-defaults
</a>
</td>
<td>
Print default options
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_protocol">
--protocol
</a>
</td>
<td>
Transport protocol to use
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_relative">
--relative
</a>
</td>
<td>
Show the difference between the current and previous values when used with the --sleep option
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_server-public-key-path">
--server-public-key-path
</a>
</td>
<td>
Path name to file containing RSA public key
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_shared-memory-base-name">
--shared-memory-base-name
</a>
</td>
<td>
Shared-memory name for shared-memory connections (Windows only)
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_show-warnings">
--show-warnings
</a>
</td>
<td>
Show warnings after statement execution
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_shutdown-timeout">
--shutdown-timeout
</a>
</td>
<td>
The maximum number of seconds to wait for server shutdown
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_silent">
--silent
</a>
</td>
<td>
Silent mode
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_sleep">
--sleep
</a>
</td>
<td>
Execute commands repeatedly, sleeping for delay seconds in between
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_socket">
--socket
</a>
</td>
<td>
Unix socket file or Windows named pipe to use
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_ssl">
--ssl-ca
</a>
</td>
<td>
File that contains list of trusted SSL Certificate Authorities
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_ssl">
--ssl-capath
</a>
</td>
<td>
Directory that contains trusted SSL Certificate Authority certificate files
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_ssl">
--ssl-cert
</a>
</td>
<td>
File that contains X.509 certificate
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_ssl">
--ssl-cipher
</a>
</td>
<td>
Permissible ciphers for connection encryption
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_ssl">
--ssl-crl
</a>
</td>
<td>
File that contains certificate revocation lists
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_ssl">
--ssl-crlpath
</a>
</td>
<td>
Directory that contains certificate revocation-list files
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_ssl-fips-mode">
--ssl-fips-mode
</a>
</td>
<td>
Whether to enable FIPS mode on client side
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_ssl">
--ssl-key
</a>
</td>
<td>
File that contains X.509 key
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_ssl">
--ssl-mode
</a>
</td>
<td>
Desired security state of connection to server
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_ssl">
--ssl-session-data
</a>
</td>
<td>
File that contains SSL session data
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_ssl">
--ssl-session-data-continue-on-failed-reuse
</a>
</td>
<td>
Whether to establish connections if session reuse fails
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_tls-ciphersuites">
--tls-ciphersuites
</a>
</td>
<td>
Permissible TLSv1.3 ciphersuites for encrypted connections
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_tls-sni-servername">
--tls-sni-servername
</a>
</td>
<td>
Server name supplied by the client
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_tls-version">
--tls-version
</a>
</td>
<td>
Permissible TLS protocols for encrypted connections
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_user">
--user
</a>
</td>
<td>
MySQL user name to use when connecting to server
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_verbose">
--verbose
</a>
</td>
<td>
Verbose mode
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_version">
--version
</a>
</td>
<td>
Display version information and exit
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_vertical">
--vertical
</a>
</td>
<td>
Print query output rows vertically (one line per column value)
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_wait">
--wait
</a>
</td>
<td>
If the connection cannot be established, wait and retry instead of aborting
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqladmin.html#option_mysqladmin_zstd-compression-level">
--zstd-compression-level
</a>
</td>
<td>
Compression level for connections to server that use zstd compression
</td>
</tr>
</tbody>
</table>
</div>
<div class="table-contents">
<table cellpadding="0" cellspacing="0" style="position: fixed; top: 0px; display: none; left: 401px; width: 739px;">
<thead>
<tr>
<th style="width: 260.906px;">
Option Name
</th>
<th style="width: 477.094px;">
Description
</th>
</tr>
</thead>
</table>
</div>
</div>
<br class="table-break"/>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<a name="option_mysqladmin_help">
</a>
<a class="link" href="mysqladmin.html#option_mysqladmin_help">
<code class="option">
--help
</code>
</a>
,
<code class="option">
-?
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for help">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--help
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045316756960">
</a>
<a class="indexterm" name="idm46045316755472">
</a>
<p>
Display a help message and exit.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqladmin_bind-address">
</a>
<a class="link" href="mysqladmin.html#option_mysqladmin_bind-address">
<code class="option">
--bind-address=
<em class="replaceable">
<code>
ip_address
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for bind-address">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--bind-address=ip_address
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045316745504">
</a>
<a class="indexterm" name="idm46045316744016">
</a>
<p>
On a computer having multiple network interfaces, use this
option to select which interface to use for connecting to
the MySQL server.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqladmin_character-sets-dir">
</a>
<a class="link" href="mysqladmin.html#option_mysqladmin_character-sets-dir">
<code class="option">
--character-sets-dir=
<em class="replaceable">
<code>
dir_name
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for character-sets-dir">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--character-sets-dir=path
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
[none]
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045316729440">
</a>
<a class="indexterm" name="idm46045316727936">
</a>
<p>
The directory where character sets are installed. See
<a class="xref" href="charset-configuration.html" title="12.15 Character Set Configuration">
Section 12.15, “Character Set Configuration”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqladmin_compress">
</a>
<a class="link" href="mysqladmin.html#option_mysqladmin_compress">
<code class="option">
--compress
</code>
</a>
,
<code class="option">
-C
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for compress">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--compress[={OFF|ON}]
</code>
</td>
</tr>
<tr>
<th>
Deprecated
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
OFF
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045316710640">
</a>
<a class="indexterm" name="idm46045316709152">
</a>
<p>
Compress all information sent between the client and the
server if possible. See
<a class="xref" href="connection-compression-control.html" title="6.2.8 Connection Compression Control">
Section 6.2.8, “Connection Compression Control”
</a>
.
</p>
<p>
This option is deprecated. Expect it to be removed in a
future version of MySQL. See
<a class="xref" href="connection-compression-control.html#connection-compression-legacy-configuration" title="Configuring Legacy Connection Compression">
Configuring Legacy Connection Compression
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqladmin_compression-algorithms">
</a>
<a class="link" href="mysqladmin.html#option_mysqladmin_compression-algorithms">
<code class="option">
--compression-algorithms=
<em class="replaceable">
<code>
value
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for compression-algorithms">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--compression-algorithms=value
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Set
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
uncompressed
</code>
</td>
</tr>
<tr>
<th>
Valid Values
</th>
<td>
<p class="valid-value">
<code class="literal">
zlib
</code>
</p>
<p class="valid-value">
<code class="literal">
zstd
</code>
</p>
<p class="valid-value">
<code class="literal">
uncompressed
</code>
</p>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045316687840">
</a>
<a class="indexterm" name="idm46045316686336">
</a>
<p>
The permitted compression algorithms for connections to the
server. The available algorithms are the same as for the
<a class="link" href="server-system-variables.html#sysvar_protocol_compression_algorithms">
<code class="literal">
protocol_compression_algorithms
</code>
</a>
system variable. The default value is
<code class="literal">
uncompressed
</code>
.
</p>
<p>
For more information, see
<a class="xref" href="connection-compression-control.html" title="6.2.8 Connection Compression Control">
Section 6.2.8, “Connection Compression Control”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqladmin_connect-timeout">
</a>
<a class="link" href="mysqladmin.html#option_mysqladmin_connect-timeout">
<code class="option">
--connect-timeout=
<em class="replaceable">
<code>
value
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for connect-timeout">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--connect-timeout=value
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Numeric
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
43200
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045316668640">
</a>
<a class="indexterm" name="idm46045316667152">
</a>
<p>
The maximum number of seconds before connection timeout. The
default value is 43200 (12 hours).
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqladmin_count">
</a>
<a class="link" href="mysqladmin.html#option_mysqladmin_count">
<code class="option">
--count=
<em class="replaceable">
<code>
N
</code>
</em>
</code>
</a>
,
<code class="option">
-c
<em class="replaceable">
<code>
N
</code>
</em>
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for count">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--count=#
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045316656576">
</a>
<a class="indexterm" name="idm46045316655088">
</a>
<p>
The number of iterations to make for repeated command
execution if the
<a class="link" href="mysqladmin.html#option_mysqladmin_sleep">
<code class="option">
--sleep
</code>
</a>
option is given.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqladmin_debug">
</a>
<a class="link" href="mysqladmin.html#option_mysqladmin_debug">
<code class="option">
--debug[=
<em class="replaceable">
<code>
debug_options
</code>
</em>
]
</code>
</a>
,
<code class="option">
-#
[
<em class="replaceable">
<code>
debug_options
</code>
</em>
]
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for debug">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--debug[=debug_options]
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
d:t:o,/tmp/mysqladmin.trace
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045316638688">
</a>
<a class="indexterm" name="idm46045316637200">
</a>
<p>
Write a debugging log. A typical
<em class="replaceable">
<code>
debug_options
</code>
</em>
string is
<code class="literal">
d:t:o,
<em class="replaceable">
<code>
file_name
</code>
</em>
</code>
.
The default is
<code class="literal">
d:t:o,/tmp/mysqladmin.trace
</code>
.
</p>
<p>
This option is available only if MySQL was built using
<a class="link" href="source-configuration-options.html#option_cmake_with_debug">
<code class="option">
WITH_DEBUG
</code>
</a>
. MySQL release
binaries provided by Oracle are
<span class="emphasis">
<em>
not
</em>
</span>
built using this option.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqladmin_debug-check">
</a>
<a class="link" href="mysqladmin.html#option_mysqladmin_debug-check">
<code class="option">
--debug-check
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for debug-check">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--debug-check
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
FALSE
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045316618880">
</a>
<a class="indexterm" name="idm46045316617392">
</a>
<p>
Print some debugging information when the program exits.
</p>
<p>
This option is available only if MySQL was built using
<a class="link" href="source-configuration-options.html#option_cmake_with_debug">
<code class="option">
WITH_DEBUG
</code>
</a>
. MySQL release
binaries provided by Oracle are
<span class="emphasis">
<em>
not
</em>
</span>
built using this option.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqladmin_debug-info">
</a>
<a class="link" href="mysqladmin.html#option_mysqladmin_debug-info">
<code class="option">
--debug-info
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for debug-info">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--debug-info
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
FALSE
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045316601344">
</a>
<a class="indexterm" name="idm46045316599856">
</a>
<p>
Print debugging information and memory and CPU usage
statistics when the program exits.
</p>
<p>
This option is available only if MySQL was built using
<a class="link" href="source-configuration-options.html#option_cmake_with_debug">
<code class="option">
WITH_DEBUG
</code>
</a>
. MySQL release
binaries provided by Oracle are
<span class="emphasis">
<em>
not
</em>
</span>
built using this option.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqladmin_default-auth">
</a>
<a class="link" href="mysqladmin.html#option_mysqladmin_default-auth">
<code class="option">
--default-auth=
<em class="replaceable">
<code>
plugin
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for default-auth">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--default-auth=plugin
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045316585856">
</a>
<a class="indexterm" name="idm46045316584368">
</a>
<p>
A hint about which client-side authentication plugin to use.
See
<a class="xref" href="pluggable-authentication.html" title="8.2.17 Pluggable Authentication">
Section 8.2.17, “Pluggable Authentication”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqladmin_default-character-set">
</a>
<a class="link" href="mysqladmin.html#option_mysqladmin_default-character-set">
<code class="option">
--default-character-set=
<em class="replaceable">
<code>
charset_name
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for default-character-set">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--default-character-set=charset_name
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045316571664">
</a>
<a class="indexterm" name="idm46045316570160">
</a>
<p>
Use
<em class="replaceable">
<code>
charset_name
</code>
</em>
as the default
character set. See
<a class="xref" href="charset-configuration.html" title="12.15 Character Set Configuration">
Section 12.15, “Character Set Configuration”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqladmin_defaults-extra-file">
</a>
<a class="link" href="mysqladmin.html#option_mysqladmin_defaults-extra-file">
<code class="option">
--defaults-extra-file=
<em class="replaceable">
<code>
file_name
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for defaults-extra-file">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--defaults-extra-file=file_name
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
File name
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045316557024">
</a>
<a class="indexterm" name="idm46045316555520">
</a>
<p>
Read this option file after the global option file but (on
Unix) before the user option file. If the file does not
exist or is otherwise inaccessible, an error occurs. If
<em class="replaceable">
<code>
file_name
</code>
</em>
is not an absolute path
name, it is interpreted relative to the current directory.
</p>
<p>
For additional information about this and other option-file
options, see
<a class="xref" href="option-file-options.html" title="6.2.2.3 Command-Line Options that Affect Option-File Handling">
Section 6.2.2.3, “Command-Line Options that Affect Option-File Handling”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqladmin_defaults-file">
</a>
<a class="link" href="mysqladmin.html#option_mysqladmin_defaults-file">
<code class="option">
--defaults-file=
<em class="replaceable">
<code>
file_name
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for defaults-file">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--defaults-file=file_name
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
File name
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045316541616">
</a>
<a class="indexterm" name="idm46045316540128">
</a>
<p>
Use only the given option file. If the file does not exist
or is otherwise inaccessible, an error occurs. If
<em class="replaceable">
<code>
file_name
</code>
</em>
is not an absolute path
name, it is interpreted relative to the current directory.
</p>
<p>
Exception: Even with
<a class="link" href="option-file-options.html#option_general_defaults-file">
<code class="option">
--defaults-file
</code>
</a>
, client
programs read
<code class="filename">
.mylogin.cnf
</code>
.
</p>
<p>
For additional information about this and other option-file
options, see
<a class="xref" href="option-file-options.html" title="6.2.2.3 Command-Line Options that Affect Option-File Handling">
Section 6.2.2.3, “Command-Line Options that Affect Option-File Handling”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqladmin_defaults-group-suffix">
</a>
<a class="link" href="mysqladmin.html#option_mysqladmin_defaults-group-suffix">
<code class="option">
--defaults-group-suffix=
<em class="replaceable">
<code>
str
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for defaults-group-suffix">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--defaults-group-suffix=str
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045316524160">
</a>
<a class="indexterm" name="idm46045316522656">
</a>
<p>
Read not only the usual option groups, but also groups with
the usual names and a suffix of
<em class="replaceable">
<code>
str
</code>
</em>
. For example,
<a class="link" href="mysqladmin.html" title="6.5.2 mysqladmin — A MySQL Server Administration Program">
<span class="command">
<strong>
mysqladmin
</strong>
</span>
</a>
normally reads the
<code class="literal">
[client]
</code>
and
<code class="literal">
[mysqladmin]
</code>
groups. If this option is
given as
<a class="link" href="mysqladmin.html#option_mysqladmin_defaults-group-suffix">
<code class="option">
--defaults-group-suffix=_other
</code>
</a>
,
<a class="link" href="mysqladmin.html" title="6.5.2 mysqladmin — A MySQL Server Administration Program">
<span class="command">
<strong>
mysqladmin
</strong>
</span>
</a>
also reads the
<code class="literal">
[client_other]
</code>
and
<code class="literal">
[mysqladmin_other]
</code>
groups.
</p>
<p>
For additional information about this and other option-file
options, see
<a class="xref" href="option-file-options.html" title="6.2.2.3 Command-Line Options that Affect Option-File Handling">
Section 6.2.2.3, “Command-Line Options that Affect Option-File Handling”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqladmin_enable-cleartext-plugin">
</a>
<a class="link" href="mysqladmin.html#option_mysqladmin_enable-cleartext-plugin">
<code class="option">
--enable-cleartext-plugin
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for enable-cleartext-plugin">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--enable-cleartext-plugin
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
FALSE
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045316500288">
</a>
<a class="indexterm" name="idm46045316498784">
</a>
<p>
Enable the
<code class="literal">
mysql_clear_password
</code>
cleartext
authentication plugin. (See
<a class="xref" href="cleartext-pluggable-authentication.html" title="8.4.1.4 Client-Side Cleartext Pluggable Authentication">
Section 8.4.1.4, “Client-Side Cleartext Pluggable Authentication”
</a>
.)
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqladmin_force">
</a>
<a class="link" href="mysqladmin.html#option_mysqladmin_force">
<code class="option">
--force
</code>
</a>
,
<code class="option">
-f
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for force">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--force
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045316487392">
</a>
<a class="indexterm" name="idm46045316485904">
</a>
<p>
Do not ask for confirmation for the
<code class="literal">
drop
<em class="replaceable">
<code>
db_name
</code>
</em>
</code>
command. With
multiple commands, continue even if an error occurs.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqladmin_get-server-public-key">
</a>
<a class="link" href="mysqladmin.html#option_mysqladmin_get-server-public-key">
<code class="option">
--get-server-public-key
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for get-server-public-key">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--get-server-public-key
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045316473120">
</a>
<a class="indexterm" name="idm46045316471616">
</a>
<p>
Request from the server the public key required for RSA key
pair-based password exchange. This option applies to clients
that authenticate with the
<code class="literal">
caching_sha2_password
</code>
authentication
plugin. For that plugin, the server does not send the public
key unless requested. This option is ignored for accounts
that do not authenticate with that plugin. It is also
ignored if RSA-based password exchange is not used, as is
the case when the client connects to the server using a
secure connection.
</p>
<p>
If
<a class="link" href="mysqladmin.html#option_mysqladmin_server-public-key-path">
<code class="option">
--server-public-key-path=
<em class="replaceable">
<code>
file_name
</code>
</em>
</code>
</a>
is given and specifies a valid public key file, it takes
precedence over
<a class="link" href="mysqladmin.html#option_mysqladmin_get-server-public-key">
<code class="option">
--get-server-public-key
</code>
</a>
.
</p>
<p>
For information about the
<code class="literal">
caching_sha2_password
</code>
plugin, see
<a class="xref" href="caching-sha2-pluggable-authentication.html" title="8.4.1.2 Caching SHA-2 Pluggable Authentication">
Section 8.4.1.2, “Caching SHA-2 Pluggable Authentication”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqladmin_host">
</a>
<a class="link" href="mysqladmin.html#option_mysqladmin_host">
<code class="option">
--host=
<em class="replaceable">
<code>
host_name
</code>
</em>
</code>
</a>
,
<code class="option">
-h
<em class="replaceable">
<code>
host_name
</code>
</em>
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for host">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--host=host_name
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
localhost
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045316450560">
</a>
<a class="indexterm" name="idm46045316449072">
</a>
<p>
Connect to the MySQL server on the given host.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqladmin_login-path">
</a>
<a class="link" href="mysqladmin.html#option_mysqladmin_login-path">
<code class="option">
--login-path=
<em class="replaceable">
<code>
name
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for login-path">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--login-path=name
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045316437072">
</a>
<a class="indexterm" name="idm46045316435584">
</a>
<p>
Read options from the named login path in the
<code class="filename">
.mylogin.cnf
</code>
login path file. A
<span class="quote">
“
<span class="quote">
login path
</span>
”
</span>
is an option group containing
options that specify which MySQL server to connect to and
which account to authenticate as. To create or modify a
login path file, use the
<a class="link" href="mysql-config-editor.html" title="6.6.7 mysql_config_editor — MySQL Configuration Utility">
<span class="command">
<strong>
mysql_config_editor
</strong>
</span>
</a>
utility. See
<a class="xref" href="mysql-config-editor.html" title="6.6.7 mysql_config_editor — MySQL Configuration Utility">
Section 6.6.7, “mysql_config_editor — MySQL Configuration Utility”
</a>
.
</p>
<p>
For additional information about this and other option-file
options, see
<a class="xref" href="option-file-options.html" title="6.2.2.3 Command-Line Options that Affect Option-File Handling">
Section 6.2.2.3, “Command-Line Options that Affect Option-File Handling”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqladmin_no-login-paths">
</a>
<a class="link" href="mysqladmin.html#option_mysqladmin_no-login-paths">
<code class="option">
--no-login-paths
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for no-login-paths">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--no-login-paths
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045316421440">
</a>
<a class="indexterm" name="idm46045316419952">
</a>
<p>
Skips reading options from the login path file.
</p>
<p>
See
<a class="link" href="mysqladmin.html#option_mysqladmin_login-path">
<code class="option">
--login-path
</code>
</a>
for
related information.
</p>
<p>
For additional information about this and other option-file
options, see
<a class="xref" href="option-file-options.html" title="6.2.2.3 Command-Line Options that Affect Option-File Handling">
Section 6.2.2.3, “Command-Line Options that Affect Option-File Handling”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqladmin_no-beep">
</a>
<a class="link" href="mysqladmin.html#option_mysqladmin_no-beep">
<code class="option">
--no-beep
</code>
</a>
,
<code class="option">
-b
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for no-beep">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--no-beep
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045316407232">
</a>
<a class="indexterm" name="idm46045316405744">
</a>
<p>
Suppress the warning beep that is emitted by default for
errors such as a failure to connect to the server.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqladmin_no-defaults">
</a>
<a class="link" href="mysqladmin.html#option_mysqladmin_no-defaults">
<code class="option">
--no-defaults
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for no-defaults">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--no-defaults
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045316396048">
</a>
<a class="indexterm" name="idm46045316394560">
</a>
<p>
Do not read any option files. If program startup fails due
to reading unknown options from an option file,
<a class="link" href="mysqladmin.html#option_mysqladmin_no-defaults">
<code class="option">
--no-defaults
</code>
</a>
can be used
to prevent them from being read.
</p>
<p>
The exception is that the
<code class="filename">
.mylogin.cnf
</code>
file is read in all cases, if it exists. This permits
passwords to be specified in a safer way than on the command
line even when
<a class="link" href="mysqladmin.html#option_mysqladmin_no-defaults">
<code class="option">
--no-defaults
</code>
</a>
is used. To
create
<code class="filename">
.mylogin.cnf
</code>
, use the
<a class="link" href="mysql-config-editor.html" title="6.6.7 mysql_config_editor — MySQL Configuration Utility">
<span class="command">
<strong>
mysql_config_editor
</strong>
</span>
</a>
utility. See
<a class="xref" href="mysql-config-editor.html" title="6.6.7 mysql_config_editor — MySQL Configuration Utility">
Section 6.6.7, “mysql_config_editor — MySQL Configuration Utility”
</a>
.
</p>
<p>
For additional information about this and other option-file
options, see
<a class="xref" href="option-file-options.html" title="6.2.2.3 Command-Line Options that Affect Option-File Handling">
Section 6.2.2.3, “Command-Line Options that Affect Option-File Handling”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqladmin_password">
</a>
<a class="link" href="mysqladmin.html#option_mysqladmin_password">
<code class="option">
--password[=
<em class="replaceable">
<code>
password
</code>
</em>
]
</code>
</a>
,
<code class="option">
-p[
<em class="replaceable">
<code>
password
</code>
</em>
]
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for password">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--password[=password]
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045316374320">
</a>
<a class="indexterm" name="idm46045316372832">
</a>
<p>
The password of the MySQL account used for connecting to the
server. The password value is optional. If not given,
<a class="link" href="mysqladmin.html" title="6.5.2 mysqladmin — A MySQL Server Administration Program">
<span class="command">
<strong>
mysqladmin
</strong>
</span>
</a>
prompts for one. If given,
there must be
<span class="emphasis">
<em>
no space
</em>
</span>
between
<a class="link" href="mysqladmin.html#option_mysqladmin_password">
<code class="option">
--password=
</code>
</a>
or
<code class="option">
-p
</code>
and the password following it. If no
password option is specified, the default is to send no
password.
</p>
<p>
Specifying a password on the command line should be
considered insecure. To avoid giving the password on the
command line, use an option file. See
<a class="xref" href="password-security-user.html" title="8.1.2.1 End-User Guidelines for Password Security">
Section 8.1.2.1, “End-User Guidelines for Password Security”
</a>
.
</p>
<p>
To explicitly specify that there is no password and that
<a class="link" href="mysqladmin.html" title="6.5.2 mysqladmin — A MySQL Server Administration Program">
<span class="command">
<strong>
mysqladmin
</strong>
</span>
</a>
should not prompt for one, use
the
<a class="link" href="mysqladmin.html#option_mysqladmin_password">
<code class="option">
--skip-password
</code>
</a>
option.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqladmin_password1">
</a>
<a class="link" href="mysqladmin.html#option_mysqladmin_password1">
<code class="option">
--password1[=
<em class="replaceable">
<code>
pass_val
</code>
</em>
]
</code>
</a>
</p>
<a class="indexterm" name="idm46045316360896">
</a>
<p>
The password for multifactor authentication factor 1 of the
MySQL account used for connecting to the server. The
password value is optional. If not given,
<a class="link" href="mysql.html" title="6.5.1 mysql — The MySQL Command-Line Client">
<span class="command">
<strong>
mysql
</strong>
</span>
</a>
prompts for one. If given, there
must be
<span class="emphasis">
<em>
no space
</em>
</span>
between
<a class="link" href="mysqladmin.html#option_mysqladmin_password1">
<code class="option">
--password1=
</code>
</a>
and the
password following it. If no password option is specified,
the default is to send no password.
</p>
<p>
Specifying a password on the command line should be
considered insecure. To avoid giving the password on the
command line, use an option file. See
<a class="xref" href="password-security-user.html" title="8.1.2.1 End-User Guidelines for Password Security">
Section 8.1.2.1, “End-User Guidelines for Password Security”
</a>
.
</p>
<p>
To explicitly specify that there is no password and that
<a class="link" href="mysqladmin.html" title="6.5.2 mysqladmin — A MySQL Server Administration Program">
<span class="command">
<strong>
mysqladmin
</strong>
</span>
</a>
should not prompt for one, use
the
<a class="link" href="mysqladmin.html#option_mysqladmin_password1">
<code class="option">
--skip-password1
</code>
</a>
option.
</p>
<p>
<a class="link" href="mysqladmin.html#option_mysqladmin_password1">
<code class="option">
--password1
</code>
</a>
and
<a class="link" href="mysqladmin.html#option_mysqladmin_password">
<code class="option">
--password
</code>
</a>
are
synonymous, as are
<a class="link" href="mysql-command-options.html#option_mysql_password1">
<code class="option">
--skip-password1
</code>
</a>
and
<a class="link" href="mysql-command-options.html#option_mysql_password">
<code class="option">
--skip-password
</code>
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqladmin_password2">
</a>
<a class="link" href="mysqladmin.html#option_mysqladmin_password2">
<code class="option">
--password2[=
<em class="replaceable">
<code>
pass_val
</code>
</em>
]
</code>
</a>
</p>
<a class="indexterm" name="idm46045316345408">
</a>
<p>
The password for multifactor authentication factor 2 of the
MySQL account used for connecting to the server. The
semantics of this option are similar to the semantics for
<a class="link" href="mysqladmin.html#option_mysqladmin_password1">
<code class="option">
--password1
</code>
</a>
; see the
description of that option for details.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqladmin_password3">
</a>
<a class="link" href="mysqladmin.html#option_mysqladmin_password3">
<code class="option">
--password3[=
<em class="replaceable">
<code>
pass_val
</code>
</em>
]
</code>
</a>
</p>
<a class="indexterm" name="idm46045316340048">
</a>
<p>
The password for multifactor authentication factor 3 of the
MySQL account used for connecting to the server. The
semantics of this option are similar to the semantics for
<a class="link" href="mysqladmin.html#option_mysqladmin_password1">
<code class="option">
--password1
</code>
</a>
; see the
description of that option for details.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqladmin_pipe">
</a>
<a class="link" href="mysqladmin.html#option_mysqladmin_pipe">
<code class="option">
--pipe
</code>
</a>
,
<code class="option">
-W
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for pipe">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--pipe
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045316327248">
</a>
<a class="indexterm" name="idm46045316325760">
</a>
<p>
On Windows, connect to the server using a named pipe. This
option applies only if the server was started with the
<a class="link" href="server-system-variables.html#sysvar_named_pipe">
<code class="literal">
named_pipe
</code>
</a>
system variable
enabled to support named-pipe connections. In addition, the
user making the connection must be a member of the Windows
group specified by the
<a class="link" href="server-system-variables.html#sysvar_named_pipe_full_access_group">
<code class="literal">
named_pipe_full_access_group
</code>
</a>
system variable.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqladmin_plugin-dir">
</a>
<a class="link" href="mysqladmin.html#option_mysqladmin_plugin-dir">
<code class="option">
--plugin-dir=
<em class="replaceable">
<code>
dir_name
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for plugin-dir">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--plugin-dir=dir_name
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Directory name
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045316311008">
</a>
<a class="indexterm" name="idm46045316309520">
</a>
<p>
The directory in which to look for plugins. Specify this
option if the
<a class="link" href="mysqladmin.html#option_mysqladmin_default-auth">
<code class="option">
--default-auth
</code>
</a>
option is
used to specify an authentication plugin but
<a class="link" href="mysqladmin.html" title="6.5.2 mysqladmin — A MySQL Server Administration Program">
<span class="command">
<strong>
mysqladmin
</strong>
</span>
</a>
does not find it. See
<a class="xref" href="pluggable-authentication.html" title="8.2.17 Pluggable Authentication">
Section 8.2.17, “Pluggable Authentication”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqladmin_port">
</a>
<a class="link" href="mysqladmin.html#option_mysqladmin_port">
<code class="option">
--port=
<em class="replaceable">
<code>
port_num
</code>
</em>
</code>
</a>
,
<code class="option">
-P
<em class="replaceable">
<code>
port_num
</code>
</em>
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for port">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--port=port_num
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Numeric
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
3306
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045316291392">
</a>
<a class="indexterm" name="idm46045316289904">
</a>
<p>
For TCP/IP connections, the port number to use.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqladmin_print-defaults">
</a>
<a class="link" href="mysqladmin.html#option_mysqladmin_print-defaults">
<code class="option">
--print-defaults
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for print-defaults">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--print-defaults
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045316280240">
</a>
<a class="indexterm" name="idm46045316278752">
</a>
<p>
Print the program name and all options that it gets from
option files.
</p>
<p>
For additional information about this and other option-file
options, see
<a class="xref" href="option-file-options.html" title="6.2.2.3 Command-Line Options that Affect Option-File Handling">
Section 6.2.2.3, “Command-Line Options that Affect Option-File Handling”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqladmin_protocol">
</a>
<a class="link" href="mysqladmin.html#option_mysqladmin_protocol">
<code class="option">
--protocol={TCP|SOCKET|PIPE|MEMORY}
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for protocol">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--protocol=type
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
[see text]
</code>
</td>
</tr>
<tr>
<th>
Valid Values
</th>
<td>
<p class="valid-value">
<code class="literal">
TCP
</code>
</p>
<p class="valid-value">
<code class="literal">
SOCKET
</code>
</p>
<p class="valid-value">
<code class="literal">
PIPE
</code>
</p>
<p class="valid-value">
<code class="literal">
MEMORY
</code>
</p>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045316257680">
</a>
<a class="indexterm" name="idm46045316256192">
</a>
<p>
The transport protocol to use for connecting to the server.
It is useful when the other connection parameters normally
result in use of a protocol other than the one you want. For
details on the permissible values, see
<a class="xref" href="transport-protocols.html" title="6.2.7 Connection Transport Protocols">
Section 6.2.7, “Connection Transport Protocols”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqladmin_relative">
</a>
<a class="link" href="mysqladmin.html#option_mysqladmin_relative">
<code class="option">
--relative
</code>
</a>
,
<code class="option">
-r
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for relative">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--relative
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045316245184">
</a>
<a class="indexterm" name="idm46045316243696">
</a>
<p>
Show the difference between the current and previous values
when used with the
<a class="link" href="mysqladmin.html#option_mysqladmin_sleep">
<code class="option">
--sleep
</code>
</a>
option. This
option works only with the
<code class="literal">
extended-status
</code>
command.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqladmin_server-public-key-path">
</a>
<a class="link" href="mysqladmin.html#option_mysqladmin_server-public-key-path">
<code class="option">
--server-public-key-path=
<em class="replaceable">
<code>
file_name
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for server-public-key-path">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--server-public-key-path=file_name
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
File name
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045316229808">
</a>
<a class="indexterm" name="idm46045316228304">
</a>
<p>
The path name to a file in PEM format containing a
client-side copy of the public key required by the server
for RSA key pair-based password exchange. This option
applies to clients that authenticate with the
<code class="literal">
sha256_password
</code>
(deprecated) or
<code class="literal">
caching_sha2_password
</code>
authentication
plugin. This option is ignored for accounts that do not
authenticate with one of those plugins. It is also ignored
if RSA-based password exchange is not used, as is the case
when the client connects to the server using a secure
connection.
</p>
<p>
If
<a class="link" href="mysqladmin.html#option_mysqladmin_server-public-key-path">
<code class="option">
--server-public-key-path=
<em class="replaceable">
<code>
file_name
</code>
</em>
</code>
</a>
is given and specifies a valid public key file, it takes
precedence over
<a class="link" href="mysqladmin.html#option_mysqladmin_get-server-public-key">
<code class="option">
--get-server-public-key
</code>
</a>
.
</p>
<p>
For
<code class="literal">
sha256_password
</code>
(deprecated), this
option applies only if MySQL was built using OpenSSL.
</p>
<p>
For information about the
<code class="literal">
sha256_password
</code>
and
<code class="literal">
caching_sha2_password
</code>
plugins, see
<a class="xref" href="sha256-pluggable-authentication.html" title="8.4.1.3 SHA-256 Pluggable Authentication">
Section 8.4.1.3, “SHA-256 Pluggable Authentication”
</a>
, and
<a class="xref" href="caching-sha2-pluggable-authentication.html" title="8.4.1.2 Caching SHA-2 Pluggable Authentication">
Section 8.4.1.2, “Caching SHA-2 Pluggable Authentication”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqladmin_shared-memory-base-name">
</a>
<a class="link" href="mysqladmin.html#option_mysqladmin_shared-memory-base-name">
<code class="option">
--shared-memory-base-name=
<em class="replaceable">
<code>
name
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for shared-memory-base-name">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--shared-memory-base-name=name
</code>
</td>
</tr>
<tr>
<th>
Platform Specific
</th>
<td>
Windows
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045316206864">
</a>
<a class="indexterm" name="idm46045316205360">
</a>
<p>
On Windows, the shared-memory name to use for connections
made using shared memory to a local server. The default
value is
<code class="literal">
MYSQL
</code>
. The shared-memory name is
case-sensitive.
</p>
<p>
This option applies only if the server was started with the
<a class="link" href="server-system-variables.html#sysvar_shared_memory">
<code class="literal">
shared_memory
</code>
</a>
system
variable enabled to support shared-memory connections.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqladmin_show-warnings">
</a>
<a class="link" href="mysqladmin.html#option_mysqladmin_show-warnings">
<code class="option">
--show-warnings
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for show-warnings">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--show-warnings
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045316193104">
</a>
<a class="indexterm" name="idm46045316191616">
</a>
<p>
Show warnings resulting from execution of statements sent to
the server.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqladmin_shutdown-timeout">
</a>
<a class="link" href="mysqladmin.html#option_mysqladmin_shutdown-timeout">
<code class="option">
--shutdown-timeout=
<em class="replaceable">
<code>
value
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for shutdown-timeout">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--shutdown-timeout=seconds
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Numeric
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
3600
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045316177104">
</a>
<a class="indexterm" name="idm46045316175616">
</a>
<p>
The maximum number of seconds to wait for server shutdown.
The default value is 3600 (1 hour).
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqladmin_silent">
</a>
<a class="link" href="mysqladmin.html#option_mysqladmin_silent">
<code class="option">
--silent
</code>
</a>
,
<code class="option">
-s
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for silent">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--silent
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045316165440">
</a>
<a class="indexterm" name="idm46045316163952">
</a>
<p>
Exit silently if a connection to the server cannot be
established.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqladmin_sleep">
</a>
<a class="link" href="mysqladmin.html#option_mysqladmin_sleep">
<code class="option">
--sleep=
<em class="replaceable">
<code>
delay
</code>
</em>
</code>
</a>
,
<code class="option">
-i
<em class="replaceable">
<code>
delay
</code>
</em>
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for sleep">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--sleep=delay
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045316153392">
</a>
<a class="indexterm" name="idm46045316151904">
</a>
<p>
Execute commands repeatedly, sleeping for
<em class="replaceable">
<code>
delay
</code>
</em>
seconds in between. The
<a class="link" href="mysqladmin.html#option_mysqladmin_count">
<code class="option">
--count
</code>
</a>
option determines
the number of iterations. If
<a class="link" href="mysqladmin.html#option_mysqladmin_count">
<code class="option">
--count
</code>
</a>
is not given,
<a class="link" href="mysqladmin.html" title="6.5.2 mysqladmin — A MySQL Server Administration Program">
<span class="command">
<strong>
mysqladmin
</strong>
</span>
</a>
executes commands indefinitely
until interrupted.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqladmin_socket">
</a>
<a class="link" href="mysqladmin.html#option_mysqladmin_socket">
<code class="option">
--socket=
<em class="replaceable">
<code>
path
</code>
</em>
</code>
</a>
,
<code class="option">
-S
<em class="replaceable">
<code>
path
</code>
</em>
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for socket">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--socket={file_name|pipe_name}
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045316135440">
</a>
<a class="indexterm" name="idm46045316133952">
</a>
<p>
For connections to
<code class="literal">
localhost
</code>
, the Unix
socket file to use, or, on Windows, the name of the named
pipe to use.
</p>
<p>
On Windows, this option applies only if the server was
started with the
<a class="link" href="server-system-variables.html#sysvar_named_pipe">
<code class="literal">
named_pipe
</code>
</a>
system variable enabled to support named-pipe connections.
In addition, the user making the connection must be a member
of the Windows group specified by the
<a class="link" href="server-system-variables.html#sysvar_named_pipe_full_access_group">
<code class="literal">
named_pipe_full_access_group
</code>
</a>
system variable.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqladmin_ssl">
</a>
<code class="option">
--ssl*
</code>
</p>
<a class="indexterm" name="idm46045316126368">
</a>
<a class="indexterm" name="idm46045316124880">
</a>
<p>
Options that begin with
<code class="option">
--ssl
</code>
specify
whether to connect to the server using encryption and
indicate where to find SSL keys and certificates. See
<a class="xref" href="connection-options.html#encrypted-connection-options" title="Command Options for Encrypted Connections">
Command Options for Encrypted Connections
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqladmin_ssl-fips-mode">
</a>
<a class="link" href="mysqladmin.html#option_mysqladmin_ssl-fips-mode">
<code class="option">
--ssl-fips-mode={OFF|ON|STRICT}
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ssl-fips-mode">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ssl-fips-mode={OFF|ON|STRICT}
</code>
</td>
</tr>
<tr>
<th>
Deprecated
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Enumeration
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
OFF
</code>
</td>
</tr>
<tr>
<th>
Valid Values
</th>
<td>
<p class="valid-value">
<code class="literal">
OFF
</code>
</p>
<p class="valid-value">
<code class="literal">
ON
</code>
</p>
<p class="valid-value">
<code class="literal">
STRICT
</code>
</p>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045316102736">
</a>
<a class="indexterm" name="idm46045316101248">
</a>
<p>
Controls whether to enable FIPS mode on the client side. The
<a class="link" href="mysqladmin.html#option_mysqladmin_ssl-fips-mode">
<code class="option">
--ssl-fips-mode
</code>
</a>
option
differs from other
<code class="option">
--ssl-
<em class="replaceable">
<code>
xxx
</code>
</em>
</code>
options in that it is not used to establish encrypted
connections, but rather to affect which cryptographic
operations to permit. See
<a class="xref" href="fips-mode.html" title="8.8 FIPS Support">
Section 8.8, “FIPS Support”
</a>
.
</p>
<p>
These
<a class="link" href="mysqladmin.html#option_mysqladmin_ssl-fips-mode">
<code class="option">
--ssl-fips-mode
</code>
</a>
values are permitted:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
<code class="literal">
OFF
</code>
: Disable FIPS mode.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
ON
</code>
: Enable FIPS mode.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
STRICT
</code>
: Enable
<span class="quote">
“
<span class="quote">
strict
</span>
”
</span>
FIPS mode.
</p>
</li>
</ul>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
If the OpenSSL FIPS Object Module is not available, the
only permitted value for
<a class="link" href="mysqladmin.html#option_mysqladmin_ssl-fips-mode">
<code class="option">
--ssl-fips-mode
</code>
</a>
is
<code class="literal">
OFF
</code>
. In this case, setting
<a class="link" href="mysqladmin.html#option_mysqladmin_ssl-fips-mode">
<code class="option">
--ssl-fips-mode
</code>
</a>
to
<code class="literal">
ON
</code>
or
<code class="literal">
STRICT
</code>
causes
the client to produce a warning at startup and to operate
in non-FIPS mode.
</p>
</div>
<p>
This option is deprecated. Expect it to be removed in a
future version of MySQL.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqladmin_tls-ciphersuites">
</a>
<a class="link" href="mysqladmin.html#option_mysqladmin_tls-ciphersuites">
<code class="option">
--tls-ciphersuites=
<em class="replaceable">
<code>
ciphersuite_list
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for tls-ciphersuites">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--tls-ciphersuites=ciphersuite_list
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045316074288">
</a>
<a class="indexterm" name="idm46045316072800">
</a>
<p>
The permissible ciphersuites for encrypted connections that
use TLSv1.3. The value is a list of one or more
colon-separated ciphersuite names. The ciphersuites that can
be named for this option depend on the SSL library used to
compile MySQL. For details, see
<a class="xref" href="encrypted-connection-protocols-ciphers.html" title="8.3.2 Encrypted Connection TLS Protocols and Ciphers">
Section 8.3.2, “Encrypted Connection TLS Protocols and Ciphers”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqladmin_tls-sni-servername">
</a>
<a class="link" href="mysqladmin.html#option_mysqladmin_tls-sni-servername">
<code class="option">
--tls-sni-servername=
<em class="replaceable">
<code>
server_name
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for tls-sni-servername">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--tls-sni-servername=server_name
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045316059808">
</a>
<a class="indexterm" name="idm46045316058304">
</a>
<p>
When specified, the name is passed to the
<code class="literal">
libmysqlclient
</code>
C API library using the
<code class="literal">
MYSQL_OPT_TLS_SNI_SERVERNAME
</code>
option of
<a class="ulink" href="/doc/c-api/8.4/en/mysql-options.html" target="_top">
<code class="literal">
mysql_options()
</code>
</a>
. The server
name is not case-sensitive. To show which server name the
client specified for the current session, if any, check the
<a class="link" href="server-status-variables.html#statvar_Tls_sni_server_name">
<code class="literal">
Tls_sni_server_name
</code>
</a>
status
variable.
</p>
<p>
Server Name Indication (SNI) is an extension to the TLS
protocol (OpenSSL must be compiled using TLS extensions for
this option to function). The MySQL implementation of SNI
represents the client-side only.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqladmin_tls-version">
</a>
<a class="link" href="mysqladmin.html#option_mysqladmin_tls-version">
<code class="option">
--tls-version=
<em class="replaceable">
<code>
protocol_list
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for tls-version">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--tls-version=protocol_list
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<p class="valid-value">
<code class="literal">
TLSv1,TLSv1.1,TLSv1.2,TLSv1.3
</code>
(OpenSSL 1.1.1 or higher)
</p>
<p class="valid-value">
<code class="literal">
TLSv1,TLSv1.1,TLSv1.2
</code>
(otherwise)
</p>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045316037424">
</a>
<a class="indexterm" name="idm46045316035936">
</a>
<p>
The permissible TLS protocols for encrypted connections. The
value is a list of one or more comma-separated protocol
names. The protocols that can be named for this option
depend on the SSL library used to compile MySQL. For
details, see
<a class="xref" href="encrypted-connection-protocols-ciphers.html" title="8.3.2 Encrypted Connection TLS Protocols and Ciphers">
Section 8.3.2, “Encrypted Connection TLS Protocols and Ciphers”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqladmin_user">
</a>
<a class="link" href="mysqladmin.html#option_mysqladmin_user">
<code class="option">
--user=
<em class="replaceable">
<code>
user_name
</code>
</em>
</code>
</a>
,
<code class="option">
-u
<em class="replaceable">
<code>
user_name
</code>
</em>
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for user">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--user=user_name,
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045316022432">
</a>
<a class="indexterm" name="idm46045316020944">
</a>
<p>
The user name of the MySQL account to use for connecting to
the server.
</p>
<p>
If you are using the
<code class="literal">
Rewriter
</code>
plugin,
grant this user the
<a class="link" href="privileges-provided.html#priv_skip-query-rewrite">
<code class="literal">
SKIP_QUERY_REWRITE
</code>
</a>
privilege.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqladmin_verbose">
</a>
<a class="link" href="mysqladmin.html#option_mysqladmin_verbose">
<code class="option">
--verbose
</code>
</a>
,
<code class="option">
-v
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for verbose">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--verbose
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045316008320">
</a>
<a class="indexterm" name="idm46045316006832">
</a>
<p>
Verbose mode. Print more information about what the program
does.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqladmin_version">
</a>
<a class="link" href="mysqladmin.html#option_mysqladmin_version">
<code class="option">
--version
</code>
</a>
,
<code class="option">
-V
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for version">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--version
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045315996736">
</a>
<a class="indexterm" name="idm46045315995248">
</a>
<p>
Display version information and exit.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqladmin_vertical">
</a>
<a class="link" href="mysqladmin.html#option_mysqladmin_vertical">
<code class="option">
--vertical
</code>
</a>
,
<code class="option">
-E
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for vertical">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--vertical
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045315985184">
</a>
<a class="indexterm" name="idm46045315983696">
</a>
<p>
Print output vertically. This is similar to
<a class="link" href="mysqladmin.html#option_mysqladmin_relative">
<code class="option">
--relative
</code>
</a>
, but prints
output vertically.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqladmin_wait">
</a>
<a class="link" href="mysqladmin.html#option_mysqladmin_wait">
<code class="option">
--wait[=
<em class="replaceable">
<code>
count
</code>
</em>
]
</code>
</a>
,
<code class="option">
-w[
<em class="replaceable">
<code>
count
</code>
</em>
]
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for wait">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--wait
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045315971840">
</a>
<a class="indexterm" name="idm46045315970352">
</a>
<p>
If the connection cannot be established, wait and retry
instead of aborting. If a
<em class="replaceable">
<code>
count
</code>
</em>
value is given, it indicates the number of times to retry.
The default is one time.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqladmin_zstd-compression-level">
</a>
<a class="link" href="mysqladmin.html#option_mysqladmin_zstd-compression-level">
<code class="option">
--zstd-compression-level=
<em class="replaceable">
<code>
level
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for zstd-compression-level">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--zstd-compression-level=#
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045315957600">
</a>
<a class="indexterm" name="idm46045315956096">
</a>
<p>
The compression level to use for connections to the server
that use the
<code class="literal">
zstd
</code>
compression algorithm.
The permitted levels are from 1 to 22, with larger values
indicating increasing levels of compression. The default
<code class="literal">
zstd
</code>
compression level is 3. The
compression level setting has no effect on connections that
do not use
<code class="literal">
zstd
</code>
compression.
</p>
<p>
For more information, see
<a class="xref" href="connection-compression-control.html" title="6.2.8 Connection Compression Control">
Section 6.2.8, “Connection Compression Control”
</a>
.
</p>
</li>
</ul>
</div>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/gis-class-linestring.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title">
<a name="gis-class-linestring">
</a>
13.4.2.5 LineString Class
</h4>
</div>
</div>
</div>
<p>
A
<code class="literal">
LineString
</code>
is a
<code class="literal">
Curve
</code>
with linear interpolation between points.
</p>
<p>
<span class="bold">
<strong>
<code class="literal">
LineString
</code>
Examples
</strong>
</span>
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
On a world map,
<code class="literal">
LineString
</code>
objects
could represent rivers.
</p>
</li>
<li class="listitem">
<p>
In a city map,
<code class="literal">
LineString
</code>
objects could
represent streets.
</p>
</li>
</ul>
</div>
<p>
<span class="bold">
<strong>
<code class="literal">
LineString
</code>
Properties
</strong>
</span>
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
A
<code class="literal">
LineString
</code>
has coordinates of
segments, defined by each consecutive pair of points.
</p>
</li>
<li class="listitem">
<p>
A
<code class="literal">
LineString
</code>
is a
<code class="literal">
Line
</code>
if it consists of exactly two
points.
</p>
</li>
<li class="listitem">
<p>
A
<code class="literal">
LineString
</code>
is a
<code class="literal">
LinearRing
</code>
if it is both closed and
simple.
</p>
</li>
</ul>
</div>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/windows-troubleshooting.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a name="windows-troubleshooting">
</a>
2.3.4 Troubleshooting a Microsoft Windows MySQL Server Installation
</h3>
</div>
</div>
</div>
<p>
When installing and running MySQL for the first time, you may
encounter certain errors that prevent the MySQL server from
starting. This section helps you diagnose and correct some of
these errors.
</p>
<p>
Your first resource when troubleshooting server issues is the
<a class="link" href="glossary.html#glos_error_log" title="error log">
error log
</a>
. The MySQL server
uses the error log to record information relevant to the error
that prevents the server from starting. The error log is located
in the
<a class="link" href="glossary.html#glos_data_directory" title="data directory">
data directory
</a>
specified in your
<code class="filename">
my.ini
</code>
file. The default
data directory location is
<code class="filename">
C:\Program Files\MySQL\MySQL
Server 8.4\data
</code>
, or
<code class="filename">
C:\ProgramData\Mysql
</code>
on Windows 7 and Windows
Server 2008. The
<code class="filename">
C:\ProgramData
</code>
directory is
hidden by default. You need to change your folder options to see
the directory and contents. For more information on the error log
and understanding the content, see
<a class="xref" href="error-log.html" title="7.4.2 The Error Log">
Section 7.4.2, “The Error Log”
</a>
.
</p>
<p>
For information regarding possible errors, also consult the
console messages displayed when the MySQL service is starting. Use
the
<span class="command">
<strong>
SC START
<em class="replaceable">
<code>
mysqld_service_name
</code>
</em>
</strong>
</span>
or
<span class="command">
<strong>
NET START
<em class="replaceable">
<code>
mysqld_service_name
</code>
</em>
</strong>
</span>
command
from the command line after installing
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
as a service to see any error messages regarding the starting of
the MySQL server as a service. See
<a class="xref" href="windows-start-service.html" title="2.3.3.8 Starting MySQL as a Windows Service">
Section 2.3.3.8, “Starting MySQL as a Windows Service”
</a>
.
</p>
<p>
The following examples show other common error messages you might
encounter when installing MySQL and starting the server for the
first time:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
If the MySQL server cannot find the
<code class="literal">
mysql
</code>
privileges database or other critical files, it displays these
messages:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-none"><div class="docs-select-all right" id="sa74720043"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-none">System error 1067 has occurred.
Fatal error: Can't open and lock privilege tables:
Table 'mysql.user' doesn't exist</code></pre>
</div>
<p>
These messages often occur when the MySQL base or data
directories are installed in different locations than the
default locations (
<code class="filename">
C:\Program Files\MySQL\MySQL
Server 8.4
</code>
and
<code class="filename">
C:\Program
Files\MySQL\MySQL Server 8.4\data
</code>
,
respectively).
</p>
<p>
This situation can occur when MySQL is upgraded and installed
to a new location, but the configuration file is not updated
to reflect the new location. In addition, old and new
configuration files might conflict. Be sure to delete or
rename any old configuration files when upgrading MySQL.
</p>
<p>
If you have installed MySQL to a directory other than
<code class="filename">
C:\Program Files\MySQL\MySQL Server
8.4
</code>
, ensure that the MySQL server is
aware of this through the use of a configuration
(
<code class="filename">
my.ini
</code>
) file. Put the
<code class="filename">
my.ini
</code>
file in your Windows directory,
typically
<code class="filename">
C:\WINDOWS
</code>
. To determine its
exact location from the value of the
<code class="literal">
WINDIR
</code>
environment variable, issue the following command from the
command prompt:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa53703488"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal"><span class="token prompt">C:\></span><span class="token command"> echo</span> %WINDIR%</code></pre>
</div>
<p>
You can create or modify an option file with any text editor,
such as Notepad. For example, if MySQL is installed in
<code class="filename">
E:\mysql
</code>
and the data directory is
<code class="filename">
D:\MySQLdata
</code>
, you can create the option
file and set up a
<code class="literal">
[mysqld]
</code>
section to
specify values for the
<code class="option">
basedir
</code>
and
<code class="option">
datadir
</code>
options:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-ini"><div class="docs-select-all right" id="sa26338965"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-ini"><span class="token selector">[mysqld]</span>
<span class="token comment" spellcheck="true"># set basedir to your installation path</span>
<span class="token constant">basedir</span><span class="token attr-value"><span class="token punctuation">=</span>E:/mysql</span>
<span class="token comment" spellcheck="true"># set datadir to the location of your data directory</span>
<span class="token constant">datadir</span><span class="token attr-value"><span class="token punctuation">=</span>D:/MySQLdata</span></code></pre>
</div>
<p>
Microsoft Windows path names are specified in option files
using (forward) slashes rather than backslashes. If you do use
backslashes, double them:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-ini"><div class="docs-select-all right" id="sa76423002"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-ini"><span class="token selector">[mysqld]</span>
<span class="token comment" spellcheck="true"># set basedir to your installation path</span>
<span class="token constant">basedir</span><span class="token attr-value"><span class="token punctuation">=</span>C:\\Program Files\\MySQL\\MySQL Server 8.4</span>
<span class="token comment" spellcheck="true"># set datadir to the location of your data directory</span>
<span class="token constant">datadir</span><span class="token attr-value"><span class="token punctuation">=</span>D:\\MySQLdata</span></code></pre>
</div>
<p>
The rules for use of backslash in option file values are given
in
<a class="xref" href="option-files.html" title="6.2.2.2 Using Option Files">
Section 6.2.2.2, “Using Option Files”
</a>
.
</p>
<p>
If you change the
<code class="option">
datadir
</code>
value in your MySQL
configuration file, you must move the contents of the existing
MySQL data directory before restarting the MySQL server.
</p>
<p>
See
<a class="xref" href="windows-create-option-file.html" title="2.3.3.2 Creating an Option File">
Section 2.3.3.2, “Creating an Option File”
</a>
.
</p>
</li>
<li class="listitem">
<p>
If you reinstall or upgrade MySQL without first stopping and
removing the existing MySQL service, and then configure MySQL
using MySQL Configurator, you might see this error:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-none"><div class="docs-select-all right" id="sa26823816"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-none">Error: Cannot create Windows service for MySql. Error: 0</code></pre>
</div>
<p>
This occurs when the Configuration Wizard tries to install the
service and finds an existing service with the same name.
</p>
<p>
One solution to this problem is to choose a service name other
than
<code class="literal">
mysql
</code>
when using the configuration
wizard. This enables the new service to be installed
correctly, but leaves the outdated service in place. Although
this is harmless, it is best to remove old services that are
no longer in use.
</p>
<p>
To permanently remove the old
<code class="literal">
mysql
</code>
service, execute the following command as a user with
administrative privileges, on the command line:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-terminal"><div class="docs-select-all right" id="sa33388565"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal"><span class="token prompt">C:\></span><span class="token command"> SC</span> DELETE mysql
<span class="token property"><span class="token punctuation">[</span>SC<span class="token punctuation">]</span></span> DeleteService SUCCESS</code></pre>
</div>
<p>
If the
<code class="literal">
SC
</code>
utility is not available for your
version of Windows, download the
<code class="literal">
delsrv
</code>
utility from
<a class="ulink" href="http://www.microsoft.com/windows2000/techinfo/reskit/tools/existing/delsrv-o.asp" target="_blank">
http://www.microsoft.com/windows2000/techinfo/reskit/tools/existing/delsrv-o.asp
</a>
and use the
<code class="literal">
delsrv mysql
</code>
syntax.
</p>
</li>
</ul>
</div>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/data-masking-component-functions.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title">
<a name="data-masking-component-functions">
</a>
8.5.2.4 MySQL Enterprise Data Masking and De-Identification Component Function Descriptions
</h4>
</div>
</div>
</div>
<p>
The MySQL Enterprise Data Masking and De-Identification components includes several functions, which may be
grouped into these categories:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<a class="xref" href="data-masking-component-functions.html#data-masking-masking-component-functions" title="Data Masking Component Functions">
Data Masking Component Functions
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="xref" href="data-masking-component-functions.html#data-masking-generation-component-functions" title="Random Data Generation Component Functions">
Random Data Generation Component Functions
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="xref" href="data-masking-component-functions.html#data-masking-dictionary-masking-component-functions" title="Dictionary Masking Administration Component Functions">
Dictionary Masking Administration Component Functions
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="xref" href="data-masking-component-functions.html#data-masking-dictionary-generating-component-functions" title="Dictionary Generating Component Functions">
Dictionary Generating Component Functions
</a>
</p>
</li>
</ul>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h5 class="title">
<a name="data-masking-masking-component-functions">
</a>
Data Masking Component Functions
</h5>
</div>
</div>
</div>
<p>
Each component function in this section performs a masking
operation on its string argument and returns the masked
result.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<a name="function_mask-canada-sin">
</a>
<a class="link" href="data-masking-component-functions.html#function_mask-canada-sin">
<code class="literal">
mask_canada_sin(
<em class="replaceable">
<code>
str
</code>
</em>
[,
<em class="replaceable">
<code>
mask_char
</code>
</em>
])
</code>
</a>
</p>
<a class="indexterm" name="idm46045233050816">
</a>
<a class="indexterm" name="idm46045233049680">
</a>
<p>
Masks a Canada Social Insurance Number (SIN) and returns
the number with all meaningful digits replaced by
<code class="literal">
'X'
</code>
characters. An optional masking
character can be specified.
</p>
<p>
Arguments:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
<em class="replaceable">
<code>
str
</code>
</em>
: The string to mask.
The accepted formats are:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: square; ">
<li class="listitem">
<p>
Nine non-separated digits.
</p>
</li>
<li class="listitem">
<p>
Nine digits grouped in pattern:
<code class="literal">
xxx-xxx-xxx
</code>
('
<code class="literal">
-
</code>
' is any separator
character).
</p>
</li>
</ul>
</div>
<p>
This argument is converted to the
<code class="literal">
utf8mb4
</code>
character set.
</p>
</li>
<li class="listitem">
<p>
<em class="replaceable">
<code>
mask_char
</code>
</em>
: (Optional) The
single character to use for masking. The default is
<code class="literal">
'X'
</code>
if
<em class="replaceable">
<code>
mask_char
</code>
</em>
is not given.
</p>
</li>
</ul>
</div>
<p>
Return value:
</p>
<p>
The masked Canada SIN as a string encoded in the
<code class="literal">
utf8mb4
</code>
character set, an error if the
argument is not the correct length, or
<code class="literal">
NULL
</code>
if
<em class="replaceable">
<code>
str
</code>
</em>
is in incorrect format or contains a multibyte character.
</p>
<p>
Example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa51211323"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> mask_canada_sin<span class="token punctuation">(</span><span class="token string">'046-454-286'</span><span class="token punctuation">)</span><span class="token punctuation">,</span> mask_canada_sin<span class="token punctuation">(</span><span class="token string">'abcdefijk'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> mask_canada_sin('046<span class="token punctuation">-</span>454<span class="token punctuation">-</span>286') <span class="token punctuation">|</span> mask_canada_sin('abcdefijk') <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> XXX<span class="token punctuation">-</span>XXX<span class="token punctuation">-</span>XXX <span class="token punctuation">|</span> XXXXXXXXX <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> mask_canada_sin<span class="token punctuation">(</span><span class="token string">'909'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output">ERROR 1123 (HY000)<span class="token punctuation">:</span> Can't initialize function 'mask_canada_sin'; Argument 0 is too short.</span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> mask_canada_sin<span class="token punctuation">(</span><span class="token string">'046-454-286-909'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output">ERROR 1123 (HY000)<span class="token punctuation">:</span> Can't initialize function 'mask_canada_sin'; Argument 0 is too long.</span></code></pre>
</div>
</li>
<li class="listitem">
<p>
<a name="function_mask-iban">
</a>
<a class="link" href="data-masking-component-functions.html#function_mask-iban">
<code class="literal">
mask_iban(
<em class="replaceable">
<code>
str
</code>
</em>
[,
<em class="replaceable">
<code>
mask_char
</code>
</em>
])
</code>
</a>
</p>
<a class="indexterm" name="idm46045233026960">
</a>
<a class="indexterm" name="idm46045233025824">
</a>
<p>
Masks an International Bank Account Number (IBAN) and
returns the number with all but the first two letters
(denoting the country) replaced by
<code class="literal">
'*'
</code>
characters. An optional masking character can be
specified.
</p>
<p>
Arguments:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
<em class="replaceable">
<code>
str
</code>
</em>
: The string to mask.
Each country can have a different national routing or
account numbering system, with a minimum of 13 and a
maximum of 34 alphanumeric ASCII characters. The
accepted formats are:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: square; ">
<li class="listitem">
<p>
Non-separated characters.
</p>
</li>
<li class="listitem">
<p>
Character grouped by four, except the last group,
and separated by space or any other separator
character (for example:
<code class="literal">
xxxx-xxxx-xxxx-xx
</code>
).
</p>
</li>
</ul>
</div>
<p>
This argument is converted to the
<code class="literal">
utf8mb4
</code>
character set.
</p>
</li>
<li class="listitem">
<p>
<em class="replaceable">
<code>
mask_char
</code>
</em>
: (Optional) The
single character to use for masking. The default is
<code class="literal">
'*'
</code>
if
<em class="replaceable">
<code>
mask_char
</code>
</em>
is not given.
</p>
</li>
</ul>
</div>
<p>
Return value:
</p>
<p>
The masked International Bank Account Number as a string
encoded in the
<code class="literal">
utf8mb4
</code>
character set,
an error if the argument is not the correct length, or
<code class="literal">
NULL
</code>
if
<em class="replaceable">
<code>
str
</code>
</em>
is in incorrect format or contains a multibyte character.
</p>
<p>
Example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa15706452"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> mask_iban<span class="token punctuation">(</span><span class="token string">'IE12 BOFI 9000 0112 3456 78'</span><span class="token punctuation">)</span><span class="token punctuation">,</span> mask_iban<span class="token punctuation">(</span><span class="token string">'abcdefghijk'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> mask_iban('IE12 BOFI 9000 0112 3456 78') <span class="token punctuation">|</span> mask_iban('abcdefghijk') <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> IE** **** **** **** **** ** <span class="token punctuation">|</span> ab********* <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> mask_iban<span class="token punctuation">(</span><span class="token string">'909'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output">ERROR 1123 (HY000)<span class="token punctuation">:</span> Can't initialize function 'mask_iban'; Argument 0 is too short.</span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> mask_iban<span class="token punctuation">(</span><span class="token string">'IE12 BOFI 9000 0112 3456 78 IE12 BOFI 9000 0112 3456 78'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output">ERROR 1123 (HY000)<span class="token punctuation">:</span> Can't initialize function 'mask_iban'; Argument 0 is too long.</span></code></pre>
</div>
</li>
<li class="listitem">
<p>
<a name="function_mask-inner">
</a>
<a class="link" href="data-masking-component-functions.html#function_mask-inner">
<code class="literal">
mask_inner(
<em class="replaceable">
<code>
str
</code>
</em>
,
<em class="replaceable">
<code>
margin1
</code>
</em>
,
<em class="replaceable">
<code>
margin2
</code>
</em>
[,
<em class="replaceable">
<code>
mask_char
</code>
</em>
])
</code>
</a>
</p>
<a class="indexterm" name="idm46045233002368">
</a>
<a class="indexterm" name="idm46045233001232">
</a>
<p>
Masks the interior part of a string, leaving the ends
untouched, and returns the result. An optional masking
character can be specified.
</p>
<p>
<a class="link" href="data-masking-component-functions.html#function_mask-inner">
<code class="literal">
mask_inner
</code>
</a>
supports all
character sets.
</p>
<p>
Arguments:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
<em class="replaceable">
<code>
str
</code>
</em>
: The string to mask.
This argument is converted to the
<code class="literal">
utf8mb4
</code>
character set.
</p>
</li>
<li class="listitem">
<p>
<em class="replaceable">
<code>
margin1
</code>
</em>
: A nonnegative
integer that specifies the number of characters on the
left end of the string to remain unmasked. If the
value is 0, no left end characters remain unmasked.
</p>
</li>
<li class="listitem">
<p>
<em class="replaceable">
<code>
margin2
</code>
</em>
: A nonnegative
integer that specifies the number of characters on the
right end of the string to remain unmasked. If the
value is 0, no right end characters remain unmasked.
</p>
</li>
<li class="listitem">
<p>
<em class="replaceable">
<code>
mask_char
</code>
</em>
: (Optional) The
single character to use for masking. The default is
<code class="literal">
'X'
</code>
if
<em class="replaceable">
<code>
mask_char
</code>
</em>
is not given.
</p>
</li>
</ul>
</div>
<p>
Return value:
</p>
<p>
The masked string encoded in the same character set used
for
<em class="replaceable">
<code>
str
</code>
</em>
, or an error if either
margin is negative.
</p>
<p>
If the sum of the margin values is larger than the
argument length, no masking occurs and the argument is
returned unchanged.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
The function is optimized to work faster for single byte
strings (having equal byte length and character length).
For example, the
<code class="literal">
utf8mb4
</code>
character
set uses only one byte for ASCII characters, so the
function processes strings containing only ASCII
characters as single-byte character strings.
</p>
</div>
<p>
Example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa49399470"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> mask_inner<span class="token punctuation">(</span><span class="token string">'abcdef'</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">)</span><span class="token punctuation">,</span> mask_inner<span class="token punctuation">(</span><span class="token string">'abcdef'</span><span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> mask_inner('abcdef', 1, 2) <span class="token punctuation">|</span> mask_inner('abcdef',0, 5) <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> aXXXef <span class="token punctuation">|</span> Xbcdef <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> mask_inner<span class="token punctuation">(</span><span class="token string">'abcdef'</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token string">'*'</span><span class="token punctuation">)</span><span class="token punctuation">,</span> mask_inner<span class="token punctuation">(</span><span class="token string">'abcdef'</span><span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">,</span> <span class="token string">'#'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> mask_inner('abcdef', 1, 2, '*') <span class="token punctuation">|</span> mask_inner('abcdef',0, 5, '#') <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> a***ef <span class="token punctuation">|</span> #bcdef <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
</li>
<li class="listitem">
<p>
<a name="function_mask-outer">
</a>
<a class="link" href="data-masking-component-functions.html#function_mask-outer">
<code class="literal">
mask_outer(
<em class="replaceable">
<code>
str
</code>
</em>
,
<em class="replaceable">
<code>
margin1
</code>
</em>
,
<em class="replaceable">
<code>
margin2
</code>
</em>
[,
<em class="replaceable">
<code>
mask_char
</code>
</em>
])
</code>
</a>
</p>
<a class="indexterm" name="idm46045232977456">
</a>
<a class="indexterm" name="idm46045232976320">
</a>
<p>
Masks the left and right ends of a string, leaving the
interior unmasked, and returns the result. An optional
masking character can be specified.
</p>
<p>
<a class="link" href="data-masking-component-functions.html#function_mask-outer">
<code class="literal">
mask_outer
</code>
</a>
supports all
character sets.
</p>
<p>
Arguments:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
<em class="replaceable">
<code>
str
</code>
</em>
: The string to mask.
This argument is converted to the
<code class="literal">
utf8mb4
</code>
character set.
</p>
</li>
<li class="listitem">
<p>
<em class="replaceable">
<code>
margin1
</code>
</em>
: A nonnegative
integer that specifies the number of characters on the
left end of the string to mask. If the value is 0, no
left end characters are masked.
</p>
</li>
<li class="listitem">
<p>
<em class="replaceable">
<code>
margin2
</code>
</em>
: A nonnegative
integer that specifies the number of characters on the
right end of the string to mask. If the value is 0, no
right end characters are masked.
</p>
</li>
<li class="listitem">
<p>
<em class="replaceable">
<code>
mask_char
</code>
</em>
: (Optional) The
single character to use for masking. The default is
<code class="literal">
'X'
</code>
if
<em class="replaceable">
<code>
mask_char
</code>
</em>
is not given.
</p>
</li>
</ul>
</div>
<p>
Return value:
</p>
<p>
The masked string encoded in the same character set used
for
<em class="replaceable">
<code>
str
</code>
</em>
, or an error if either
margin is negative.
</p>
<p>
If the sum of the margin values is larger than the
argument length, the entire argument is masked.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
The function is optimized to work faster for single byte
strings (having equal byte length and character length).
For example, the
<code class="literal">
utf8mb4
</code>
character
set uses only one byte for ASCII characters, so the
function processes strings containing only ASCII
characters as single-byte character strings.
</p>
</div>
<p>
Example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa28697159"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> mask_outer<span class="token punctuation">(</span><span class="token string">'abcdef'</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">)</span><span class="token punctuation">,</span> mask_outer<span class="token punctuation">(</span><span class="token string">'abcdef'</span><span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> mask_outer('abcdef', 1, 2) <span class="token punctuation">|</span> mask_outer('abcdef',0, 5) <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> XbcdXX <span class="token punctuation">|</span> aXXXXX <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> mask_outer<span class="token punctuation">(</span><span class="token string">'abcdef'</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">,</span> <span class="token string">'*'</span><span class="token punctuation">)</span><span class="token punctuation">,</span> mask_outer<span class="token punctuation">(</span><span class="token string">'abcdef'</span><span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">,</span> <span class="token string">'#'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> mask_outer('abcdef', 1, 2, '*') <span class="token punctuation">|</span> mask_outer('abcdef',0, 5, '#') <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> *bcd** <span class="token punctuation">|</span> a##### <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
</li>
<li class="listitem">
<p>
<a name="function_mask-pan">
</a>
<a class="link" href="data-masking-component-functions.html#function_mask-pan">
<code class="literal">
mask_pan(
<em class="replaceable">
<code>
str
</code>
</em>
[,
<em class="replaceable">
<code>
mask_char
</code>
</em>
])
</code>
</a>
</p>
<a class="indexterm" name="idm46045232953552">
</a>
<a class="indexterm" name="idm46045232952432">
</a>
<p>
Masks a payment card Primary Account Number (PAN) and
returns the number with all but the last four digits
replaced by
<code class="literal">
'X'
</code>
characters. An optional
masking character can be specified.
</p>
<p>
Arguments:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
<em class="replaceable">
<code>
str
</code>
</em>
: The string to mask.
The string must contain a minimum of 14 and a maximum
of 19 alphanumeric characters. This argument is
converted to the
<code class="literal">
utf8mb4
</code>
character
set.
</p>
</li>
<li class="listitem">
<p>
<em class="replaceable">
<code>
mask_char
</code>
</em>
: (Optional) The
single character to use for masking. The default is
<code class="literal">
'X'
</code>
if
<em class="replaceable">
<code>
mask_char
</code>
</em>
is not given.
</p>
</li>
</ul>
</div>
<p>
Return value:
</p>
<p>
The masked payment number as a string encoded in the
<code class="literal">
utf8mb4
</code>
character set, an error if the
argument is not the correct length, or
<code class="literal">
NULL
</code>
if
<em class="replaceable">
<code>
str
</code>
</em>
is in incorrect format or contains a multibyte character.
</p>
<p>
Example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa23673714"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> mask_pan<span class="token punctuation">(</span>gen_rnd_pan<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> mask_pan(gen_rnd_pan()) <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> XXXXXXXXXXXX9102 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> mask_pan<span class="token punctuation">(</span>gen_rnd_pan<span class="token punctuation">(</span><span class="token number">19</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> mask_pan(gen_rnd_pan(19)) <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> XXXXXXXXXXXXXXX8268 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> mask_pan<span class="token punctuation">(</span><span class="token string">'a*Z'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output">ERROR 1123 (HY000)<span class="token punctuation">:</span> Can't initialize function 'mask_pan'; Argument 0 is too short.</span></code></pre>
</div>
</li>
<li class="listitem">
<p>
<a name="function_mask-pan-relaxed">
</a>
<a class="link" href="data-masking-component-functions.html#function_mask-pan-relaxed">
<code class="literal">
mask_pan_relaxed(
<em class="replaceable">
<code>
str
</code>
</em>
)
</code>
</a>
</p>
<a class="indexterm" name="idm46045232934176">
</a>
<a class="indexterm" name="idm46045232933040">
</a>
<p>
Masks a payment card Primary Account Number and returns
the number with all but the first six and last four digits
replaced by
<code class="literal">
'X'
</code>
characters. The first
six digits indicate the payment card issuer. An optional
masking character can be specified.
</p>
<p>
Arguments:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
<em class="replaceable">
<code>
str
</code>
</em>
: The string to mask.
The string must be a suitable length for the Primary
Account Number, but is not otherwise checked. This
argument is converted to the
<code class="literal">
utf8mb4
</code>
character set.
</p>
</li>
<li class="listitem">
<p>
<em class="replaceable">
<code>
mask_char
</code>
</em>
: (Optional) The
single character to use for masking. The default is
<code class="literal">
'X'
</code>
if
<em class="replaceable">
<code>
mask_char
</code>
</em>
is not given.
</p>
</li>
</ul>
</div>
<p>
Return value:
</p>
<p>
The masked payment number as a string encoded in the
<code class="literal">
utf8mb4
</code>
character set, an error if the
argument is not the correct length, or
<code class="literal">
NULL
</code>
if
<em class="replaceable">
<code>
str
</code>
</em>
is in incorrect format or contains a multibyte character.
</p>
<p>
Example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa683588"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> mask_pan_relaxed<span class="token punctuation">(</span>gen_rnd_pan<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> mask_pan_relaxed(gen_rnd_pan()) <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> 551279XXXXXX3108 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> mask_pan_relaxed<span class="token punctuation">(</span>gen_rnd_pan<span class="token punctuation">(</span><span class="token number">19</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> mask_pan_relaxed(gen_rnd_pan(19)) <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> 462634XXXXXXXXX6739 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> mask_pan_relaxed<span class="token punctuation">(</span><span class="token string">'a*Z'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output">ERROR 1123 (HY000)<span class="token punctuation">:</span> Can't initialize function 'mask_pan_relaxed'; Argument 0 is too short.</span></code></pre>
</div>
</li>
<li class="listitem">
<p>
<a name="function_mask-ssn">
</a>
<a class="link" href="data-masking-component-functions.html#function_mask-ssn">
<code class="literal">
mask_ssn(
<em class="replaceable">
<code>
str
</code>
</em>
[,
<em class="replaceable">
<code>
mask_char
</code>
</em>
])
</code>
</a>
</p>
<a class="indexterm" name="idm46045232914176">
</a>
<a class="indexterm" name="idm46045232913056">
</a>
<p>
Masks a US Social Security Number (SSN) and returns the
number with all but the last four digits replaced by
<code class="literal">
'*'
</code>
characters. An optional masking
character can be specified.
</p>
<p>
Arguments:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
<em class="replaceable">
<code>
str
</code>
</em>
: The string to mask.
The accepted formats are:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: square; ">
<li class="listitem">
<p>
Nine non-separated digits.
</p>
</li>
<li class="listitem">
<p>
Nine digits grouped in pattern:
<code class="literal">
xxx-xx-xxxx
</code>
('
<code class="literal">
-
</code>
' is any separator
character).
</p>
</li>
</ul>
</div>
<p>
This argument is converted to the
<code class="literal">
utf8mb4
</code>
character set.
</p>
</li>
<li class="listitem">
<p>
<em class="replaceable">
<code>
mask_char
</code>
</em>
: (Optional) The
single character to use for masking. The default is
<code class="literal">
'*'
</code>
if
<em class="replaceable">
<code>
mask_char
</code>
</em>
is not given.
</p>
</li>
</ul>
</div>
<p>
Return value:
</p>
<p>
The masked Social Security Number as a string encoded in
the
<code class="literal">
utf8mb4
</code>
character set, an error if
the argument is not the correct length, or
<code class="literal">
NULL
</code>
if
<em class="replaceable">
<code>
str
</code>
</em>
is in incorrect format or contains a multibyte character.
</p>
<p>
Example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa36321228"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> mask_ssn<span class="token punctuation">(</span><span class="token string">'909-63-6922'</span><span class="token punctuation">)</span><span class="token punctuation">,</span> mask_ssn<span class="token punctuation">(</span><span class="token string">'cdefghijk'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> mask_ssn('909<span class="token punctuation">-</span>63<span class="token punctuation">-</span>6922') <span class="token punctuation">|</span> mask_ssn('cdefghijk') <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> ***<span class="token punctuation">-</span>**<span class="token punctuation">-</span>6922 <span class="token punctuation">|</span> *******hijk <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> mask_ssn<span class="token punctuation">(</span><span class="token string">'909'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output">ERROR 1123 (HY000)<span class="token punctuation">:</span> Can't initialize function 'mask_ssn'; Argument 0 is too short.</span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> mask_ssn<span class="token punctuation">(</span><span class="token string">'123456789123456789'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output">ERROR 1123 (HY000)<span class="token punctuation">:</span> Can't initialize function 'mask_ssn'; Argument 0 is too long.</span></code></pre>
</div>
</li>
<li class="listitem">
<p>
<a name="function_mask-uk-nin">
</a>
<a class="link" href="data-masking-component-functions.html#function_mask-uk-nin">
<code class="literal">
mask_uk_nin(
<em class="replaceable">
<code>
str
</code>
</em>
[,
<em class="replaceable">
<code>
mask_char
</code>
</em>
])
</code>
</a>
</p>
<a class="indexterm" name="idm46045232890384">
</a>
<a class="indexterm" name="idm46045232889248">
</a>
<p>
Masks a United Kingdom National Insurance Number (UK NIN)
and returns the number with all but the first two digits
replaced by
<code class="literal">
'*'
</code>
characters. An optional
masking character can be specified.
</p>
<p>
Arguments:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
<em class="replaceable">
<code>
str
</code>
</em>
: The string to mask.
The accepted formats are:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: square; ">
<li class="listitem">
<p>
Nine non-separated digits.
</p>
</li>
<li class="listitem">
<p>
Nine digits grouped in pattern:
<code class="literal">
xxx-xx-xxxx
</code>
('
<code class="literal">
-
</code>
' is any separator
character).
</p>
</li>
<li class="listitem">
<p>
Nine digits grouped in pattern:
<code class="literal">
xx-xxxxxx-x
</code>
('
<code class="literal">
-
</code>
' is any separator
character).
</p>
</li>
</ul>
</div>
<p>
This argument is converted to the
<code class="literal">
utf8mb4
</code>
character set.
</p>
</li>
<li class="listitem">
<p>
<em class="replaceable">
<code>
mask_char
</code>
</em>
: (Optional) The
single character to use for masking. The default is
<code class="literal">
'*'
</code>
if
<em class="replaceable">
<code>
mask_char
</code>
</em>
is not given.
</p>
</li>
</ul>
</div>
<p>
Return value:
</p>
<p>
The masked UK NIN as a string encoded in the
<code class="literal">
utf8mb4
</code>
character set, an error if the
argument is not the correct length, or
<code class="literal">
NULL
</code>
if
<em class="replaceable">
<code>
str
</code>
</em>
is in incorrect format or contains a multibyte character.
</p>
<p>
Example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa23185759"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> mask_uk_nin<span class="token punctuation">(</span><span class="token string">'QQ 12 34 56 C'</span><span class="token punctuation">)</span><span class="token punctuation">,</span> mask_uk_nin<span class="token punctuation">(</span><span class="token string">'abcdefghi'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> mask_uk_nin('QQ 12 34 56 C') <span class="token punctuation">|</span> mask_uk_nin('abcdefghi') <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> QQ ** ** ** * <span class="token punctuation">|</span> ab******* <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> mask_uk_nin<span class="token punctuation">(</span><span class="token string">'909'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output">ERROR 1123 (HY000)<span class="token punctuation">:</span> Can't initialize function 'mask_uk_nin'; Argument 0 is too short.</span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> mask_uk_nin<span class="token punctuation">(</span><span class="token string">'abcdefghijk'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output">ERROR 1123 (HY000)<span class="token punctuation">:</span> Can't initialize function 'mask_uk_nin'; Argument 0 is too long.</span></code></pre>
</div>
</li>
<li class="listitem">
<p>
<a name="function_mask-uuid">
</a>
<a class="link" href="data-masking-component-functions.html#function_mask-uuid">
<code class="literal">
mask_uuid(
<em class="replaceable">
<code>
str
</code>
</em>
[,
<em class="replaceable">
<code>
mask_char
</code>
</em>
])
</code>
</a>
</p>
<a class="indexterm" name="idm46045232864128">
</a>
<a class="indexterm" name="idm46045232862992">
</a>
<p>
Masks a Universally Unique Identifier (UUID) and returns
the number with all meaningful characters replaced by
<code class="literal">
'*'
</code>
characters. An optional masking
character can be specified.
</p>
<p>
Arguments:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
<em class="replaceable">
<code>
str
</code>
</em>
: The string to mask.
The accepted format is
<code class="literal">
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
</code>
in which '
<code class="literal">
X
</code>
' is any digit and
'
<code class="literal">
-
</code>
' is any separator character This
argument is converted to the
<code class="literal">
utf8mb4
</code>
character set.
</p>
</li>
<li class="listitem">
<p>
<em class="replaceable">
<code>
mask_char
</code>
</em>
: (Optional) The
single character to use for masking. The default is
<code class="literal">
'*'
</code>
if
<em class="replaceable">
<code>
mask_char
</code>
</em>
is not given.
</p>
</li>
</ul>
</div>
<p>
Return value:
</p>
<p>
The masked UUID as a string encoded in the
<code class="literal">
utf8mb4
</code>
character set, an error if the
argument is not the correct length, or
<code class="literal">
NULL
</code>
if
<em class="replaceable">
<code>
str
</code>
</em>
is in incorrect format or contains a multibyte character.
</p>
<p>
Example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa57784486"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> mask_uuid<span class="token punctuation">(</span>gen_rnd_uuid<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> mask_uuid(gen_rnd_uuid()) <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> ********<span class="token punctuation">-</span>****<span class="token punctuation">-</span>****<span class="token punctuation">-</span>****<span class="token punctuation">-</span>************ <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> mask_uuid<span class="token punctuation">(</span><span class="token string">'909'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output">ERROR 1123 (HY000)<span class="token punctuation">:</span> Can't initialize function 'mask_uuid'; Argument 0 is too short.</span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> mask_uuid<span class="token punctuation">(</span><span class="token string">'123e4567-e89b-12d3-a456-426614174000-123e4567-e89b-12d3'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output">ERROR 1123 (HY000)<span class="token punctuation">:</span> Can't initialize function 'mask_uuid'; Argument 0 is too long.</span></code></pre>
</div>
</li>
</ul>
</div>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h5 class="title">
<a name="data-masking-generation-component-functions">
</a>
Random Data Generation Component Functions
</h5>
</div>
</div>
</div>
<p>
The component functions in this section generate random values
for different types of data. When possible, generated values
have characteristics reserved for demonstration or test
values, to avoid having them mistaken for legitimate data. For
example,
<a class="link" href="data-masking-component-functions.html#function_gen-rnd-us-phone">
<code class="literal">
gen_rnd_us_phone()
</code>
</a>
returns a US phone number that uses the 555 area code, which
is not assigned to phone numbers in actual use. Individual
function descriptions describe any exceptions to this
principle.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<a name="function_gen-range">
</a>
<a class="link" href="data-masking-component-functions.html#function_gen-range">
<code class="literal">
gen_range(
<em class="replaceable">
<code>
lower
</code>
</em>
,
<em class="replaceable">
<code>
upper
</code>
</em>
)
</code>
</a>
</p>
<a class="indexterm" name="idm46045232838368">
</a>
<a class="indexterm" name="idm46045232837232">
</a>
<p>
Generates a random number chosen from a specified range.
</p>
<p>
Arguments:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
<em class="replaceable">
<code>
lower
</code>
</em>
: An integer that
specifies the lower boundary of the range.
</p>
</li>
<li class="listitem">
<p>
<em class="replaceable">
<code>
upper
</code>
</em>
: An integer that
specifies the upper boundary of the range, which must
not be less than the lower boundary.
</p>
</li>
</ul>
</div>
<p>
Return value:
</p>
<p>
A random integer (encoded in the
<code class="literal">
utf8mb4
</code>
character set) in the range
from
<em class="replaceable">
<code>
lower
</code>
</em>
to
<em class="replaceable">
<code>
upper
</code>
</em>
, inclusive, or
<code class="literal">
NULL
</code>
if the
<em class="replaceable">
<code>
upper
</code>
</em>
argument is less than
<em class="replaceable">
<code>
lower
</code>
</em>
.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
For better quality of random values, use
<a class="link" href="mathematical-functions.html#function_rand">
<code class="literal">
RAND()
</code>
</a>
instead of this
function.
</p>
</div>
<p>
Example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa41685591"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> gen_range<span class="token punctuation">(</span><span class="token number">100</span><span class="token punctuation">,</span> <span class="token number">200</span><span class="token punctuation">)</span><span class="token punctuation">,</span> gen_range<span class="token punctuation">(</span><span class="token operator">-</span><span class="token number">1000</span><span class="token punctuation">,</span> <span class="token operator">-</span><span class="token number">800</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> gen_range(100, 200) <span class="token punctuation">|</span> gen_range(<span class="token punctuation">-</span>1000, <span class="token punctuation">-</span>800) <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> 177 <span class="token punctuation">|</span> <span class="token punctuation">-</span>917 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> gen_range<span class="token punctuation">(</span><span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> gen_range(1, 0) <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> NULL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
</li>
<li class="listitem">
<p>
<a name="function_gen-rnd-canada-sin">
</a>
<a class="link" href="data-masking-component-functions.html#function_gen-rnd-canada-sin">
<code class="literal">
gen_rnd_canada_sin()
</code>
</a>
</p>
<a class="indexterm" name="idm46045232819472">
</a>
<a class="indexterm" name="idm46045232818336">
</a>
<p>
Generates a random Canada Social Insurance Number (SIN) in
<code class="literal">
<em class="replaceable">
<code>
AAA
</code>
</em>
-
<em class="replaceable">
<code>
BBB
</code>
</em>
-
<em class="replaceable">
<code>
CCC
</code>
</em>
</code>
format. The generated number passes the Luhn check
algorithm, which ensures the consistency of this number.
</p>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Warning
</div>
<p>
Values returned from
<a class="link" href="data-masking-component-functions.html#function_gen-rnd-canada-sin">
<code class="literal">
gen_rnd_canada_sin()
</code>
</a>
should be used only for test purposes, and are not
suitable for publication. There is no way to guarantee
that a given return value is not assigned to a
legitimate Canada SIN. Should it be necessary to publish
a
<a class="link" href="data-masking-component-functions.html#function_gen-rnd-canada-sin">
<code class="literal">
gen_rnd_canada_sin()
</code>
</a>
result, consider masking it with
<a class="link" href="data-masking-component-functions.html#function_mask-canada-sin">
<code class="literal">
mask_canada_sin()
</code>
</a>
.
</p>
</div>
<p>
Arguments:
</p>
<p>
None.
</p>
<p>
Return value:
</p>
<p>
A random Canada SIN as a string encoded in the
<code class="literal">
utf8mb4
</code>
character set.
</p>
<p>
Example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa58403533"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> gen_rnd_canada_sin<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> gen_rnd_canada_sin() <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> 046<span class="token punctuation">-</span>454<span class="token punctuation">-</span>286 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
</li>
<li class="listitem">
<p>
<a name="function_gen-rnd-email">
</a>
<a class="link" href="data-masking-component-functions.html#function_gen-rnd-email">
<code class="literal">
gen_rnd_email(
<em class="replaceable">
<code>
name_size
</code>
</em>
,
<em class="replaceable">
<code>
surname_size
</code>
</em>
,
<em class="replaceable">
<code>
domain
</code>
</em>
)
</code>
</a>
</p>
<a class="indexterm" name="idm46045232801200">
</a>
<a class="indexterm" name="idm46045232800064">
</a>
<p>
Generates a random email address in the form of
<em class="replaceable">
<code>
random_name
</code>
</em>
.
<em class="replaceable">
<code>
random_surname
</code>
</em>
@
<em class="replaceable">
<code>
domain
</code>
</em>
.
</p>
<p>
Arguments:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
<em class="replaceable">
<code>
name_size
</code>
</em>
: (Optional) An
integer that specifies the number of characters in the
name part of an address. The default is five if
<em class="replaceable">
<code>
name_size
</code>
</em>
is not given.
</p>
</li>
<li class="listitem">
<p>
<em class="replaceable">
<code>
surname_size
</code>
</em>
: (Optional) An
integer that specifies the number of characters in the
surname part of an address. The default is seven if
<em class="replaceable">
<code>
surname_size
</code>
</em>
is not given.
</p>
</li>
<li class="listitem">
<p>
<em class="replaceable">
<code>
domain
</code>
</em>
: (Optional) A string
that specifies the domain part of the address. The
default is
<code class="literal">
example.com
</code>
if
<em class="replaceable">
<code>
domain
</code>
</em>
is not given.
</p>
</li>
</ul>
</div>
<p>
Return value:
</p>
<p>
A random email address as a string encoded in the
<code class="literal">
utf8mb4
</code>
character set.
</p>
<p>
Example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa83058264"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> gen_rnd_email<span class="token punctuation">(</span>name_size <span class="token operator">=</span> <span class="token number">4</span><span class="token punctuation">,</span> surname_size <span class="token operator">=</span> <span class="token number">5</span><span class="token punctuation">,</span> domain <span class="token operator">=</span> <span class="token string">'mynet.com'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> gen_rnd_email(name_size = 4, surname_size = 5, domain = 'mynet.com') <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> [email protected] <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> gen_rnd_email<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> gen_rnd_email() <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> [email protected] <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
</li>
<li class="listitem">
<p>
<a name="function_gen-rnd-iban">
</a>
<a class="link" href="data-masking-component-functions.html#function_gen-rnd-iban">
<code class="literal">
gen_rnd_iban([
<em class="replaceable">
<code>
country
</code>
</em>
,
<em class="replaceable">
<code>
size
</code>
</em>
])
</code>
</a>
</p>
<a class="indexterm" name="idm46045232781168">
</a>
<a class="indexterm" name="idm46045232780032">
</a>
<p>
Generates a random International Bank Account Number
(IBAN) in
<code class="literal">
<em class="replaceable">
<code>
AAAA
</code>
</em>
<em class="replaceable">
<code>
BBBB
</code>
</em>
<em class="replaceable">
<code>
CCCC
</code>
</em>
<em class="replaceable">
<code>
DDDD
</code>
</em>
</code>
format. The
generated string starts with a two-character country code,
two check digits computed according to the IBAN
specification and random alphanumeric characters up to the
required size.
</p>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Warning
</div>
<p>
Values returned from
<a class="link" href="data-masking-component-functions.html#function_gen-rnd-iban">
<code class="literal">
gen_rnd_iban()
</code>
</a>
should be
used only for test purposes, and are not suitable for
publication if used with a valid country code. There is
no way to guarantee that a given return value is not
assigned to a legitimate bank account. Should it be
necessary to publish a
<a class="link" href="data-masking-component-functions.html#function_gen-rnd-iban">
<code class="literal">
gen_rnd_iban()
</code>
</a>
result,
consider masking it with
<a class="link" href="data-masking-component-functions.html#function_mask-iban">
<code class="literal">
mask_iban()
</code>
</a>
.
</p>
</div>
<p>
Arguments:
</p>
<p>
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
<em class="replaceable">
<code>
country
</code>
</em>
: (Optional)
Two-character country code; default value is
<code class="literal">
ZZ
</code>
</p>
</li>
<li class="listitem">
<p>
<em class="replaceable">
<code>
size
</code>
</em>
: (Optional) Number
of meaningful characters; default 16, minimum 15,
maximum 34
</p>
</li>
</ul>
</div>
<p>
</p>
<p>
Return value:
</p>
<p>
A random IBAN as a string encoded in the
<code class="literal">
utf8mb4
</code>
character set.
</p>
<p>
Example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa35480108"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> gen_rnd_iban<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> gen_rnd_iban() <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> ZZ79 3K2J WNH9 1V0DI <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
</li>
<li class="listitem">
<p>
<a name="function_gen-rnd-pan">
</a>
<a class="link" href="data-masking-component-functions.html#function_gen-rnd-pan">
<code class="literal">
gen_rnd_pan([
<em class="replaceable">
<code>
size
</code>
</em>
])
</code>
</a>
</p>
<a class="indexterm" name="idm46045232759520">
</a>
<a class="indexterm" name="idm46045232758384">
</a>
<p>
Generates a random payment card Primary Account Number.
The number passes the Luhn check (an algorithm that
performs a checksum verification against a check digit).
</p>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Warning
</div>
<p>
Values returned from
<a class="link" href="data-masking-component-functions.html#function_gen-rnd-pan">
<code class="literal">
gen_rnd_pan()
</code>
</a>
should be
used only for test purposes, and are not suitable for
publication. There is no way to guarantee that a given
return value is not assigned to a legitimate payment
account. Should it be necessary to publish a
<a class="link" href="data-masking-component-functions.html#function_gen-rnd-pan">
<code class="literal">
gen_rnd_pan()
</code>
</a>
result,
consider masking it with
<a class="link" href="data-masking-component-functions.html#function_mask-pan">
<code class="literal">
mask_pan()
</code>
</a>
or
<a class="link" href="data-masking-component-functions.html#function_mask-pan-relaxed">
<code class="literal">
mask_pan_relaxed()
</code>
</a>
.
</p>
</div>
<p>
Arguments:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
<em class="replaceable">
<code>
size
</code>
</em>
: (Optional) An integer
that specifies the size of the result. The default is
16 if
<em class="replaceable">
<code>
size
</code>
</em>
is not given. If
given,
<em class="replaceable">
<code>
size
</code>
</em>
must be an
integer in the range from 12 to 19.
</p>
</li>
</ul>
</div>
<p>
Return value:
</p>
<p>
A random payment number as a string, or an error if a
<em class="replaceable">
<code>
size
</code>
</em>
argument outside the
permitted range is given.
</p>
<p>
Example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa3035433"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> mask_pan<span class="token punctuation">(</span>gen_rnd_pan<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> mask_pan(gen_rnd_pan()) <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> XXXXXXXXXXXX5805 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> mask_pan<span class="token punctuation">(</span>gen_rnd_pan<span class="token punctuation">(</span><span class="token number">19</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> mask_pan(gen_rnd_pan(19)) <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> XXXXXXXXXXXXXXX5067 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> mask_pan_relaxed<span class="token punctuation">(</span>gen_rnd_pan<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> mask_pan_relaxed(gen_rnd_pan()) <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> 398403XXXXXX9547 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> mask_pan_relaxed<span class="token punctuation">(</span>gen_rnd_pan<span class="token punctuation">(</span><span class="token number">19</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> mask_pan_relaxed(gen_rnd_pan(19)) <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> 578416XXXXXXXXX6509 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> gen_rnd_pan<span class="token punctuation">(</span><span class="token number">20</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output">ERROR 1123 (HY000)<span class="token punctuation">:</span> Can't initialize function 'gen_rnd_pan'; Minimal value of argument 0 is 14.</span></code></pre>
</div>
</li>
<li class="listitem">
<p>
<a name="function_gen-rnd-ssn">
</a>
<a class="link" href="data-masking-component-functions.html#function_gen-rnd-ssn">
<code class="literal">
gen_rnd_ssn()
</code>
</a>
</p>
<a class="indexterm" name="idm46045232736688">
</a>
<a class="indexterm" name="idm46045232735552">
</a>
<p>
Generates a random US Social Security Number in
<code class="literal">
<em class="replaceable">
<code>
AAA
</code>
</em>
-
<em class="replaceable">
<code>
BB
</code>
</em>
-
<em class="replaceable">
<code>
CCCC
</code>
</em>
</code>
format. The
<em class="replaceable">
<code>
AAA
</code>
</em>
part is greater
than 900, which are characteristics not used for
legitimate social security numbers.
</p>
<p>
Arguments:
</p>
<p>
None.
</p>
<p>
Return value:
</p>
<p>
A random Social Security Number as a string encoded in the
<code class="literal">
utf8mb4
</code>
character set.
</p>
<p>
Example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa75692197"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> gen_rnd_ssn<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> gen_rnd_ssn() <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> 951<span class="token punctuation">-</span>26<span class="token punctuation">-</span>0058 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
</li>
<li class="listitem">
<p>
<a name="function_gen-rnd-uk-nin">
</a>
<a class="link" href="data-masking-component-functions.html#function_gen-rnd-uk-nin">
<code class="literal">
gen_rnd_uk_nin()
</code>
</a>
</p>
<a class="indexterm" name="idm46045232724256">
</a>
<a class="indexterm" name="idm46045232723120">
</a>
<p>
Generates a random United Kingdom National Insurance
Number (UK NIN) in nine-character format. NIN starts with
two character prefix randomly selected from the set of
valid prefixes, six random numbers, and one character
suffix randomly selected from the set of valid suffixes.
</p>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Warning
</div>
<p>
Values returned from
<a class="link" href="data-masking-component-functions.html#function_gen-rnd-uk-nin">
<code class="literal">
gen_rnd_uk_nin()
</code>
</a>
should
be used only for test purposes, and are not suitable for
publication. There is no way to guarantee that a given
return value is not assigned to a legitimate NIN. Should
it be necessary to publish a
<a class="link" href="data-masking-component-functions.html#function_gen-rnd-uk-nin">
<code class="literal">
gen_rnd_uk_nin()
</code>
</a>
result,
consider masking it with
<a class="link" href="data-masking-component-functions.html#function_mask-uk-nin">
<code class="literal">
mask_uk_nin()
</code>
</a>
.
</p>
</div>
<p>
Arguments:
</p>
<p>
None.
</p>
<p>
Return value:
</p>
<p>
A random UK NIN as a string encoded in the
<code class="literal">
utf8mb4
</code>
character set.
</p>
<p>
Example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa26077110"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> gen_rnd_uk_nin<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> gen_rnd_uk_nin() <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> QQ123456C <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
</li>
<li class="listitem">
<p>
<a name="function_gen-rnd-us-phone">
</a>
<a class="link" href="data-masking-component-functions.html#function_gen-rnd-us-phone">
<code class="literal">
gen_rnd_us_phone()
</code>
</a>
</p>
<a class="indexterm" name="idm46045232708720">
</a>
<a class="indexterm" name="idm46045232707584">
</a>
<p>
Generates a random US phone number in
<code class="literal">
1-555-
<em class="replaceable">
<code>
AAA
</code>
</em>
-
<em class="replaceable">
<code>
BBBB
</code>
</em>
</code>
format. The 555 area code is not used for legitimate phone
numbers.
</p>
<p>
Arguments:
</p>
<p>
None.
</p>
<p>
Return value:
</p>
<p>
A random US phone number as a string encoded in the
<code class="literal">
utf8mb4
</code>
character set.
</p>
<p>
Example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa7134659"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> gen_rnd_us_phone<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> gen_rnd_us_phone() <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> 1<span class="token punctuation">-</span>555<span class="token punctuation">-</span>682<span class="token punctuation">-</span>5423 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
</li>
<li class="listitem">
<p>
<a name="function_gen-rnd-uuid">
</a>
<a class="link" href="data-masking-component-functions.html#function_gen-rnd-uuid">
<code class="literal">
gen_rnd_uuid()
</code>
</a>
</p>
<a class="indexterm" name="idm46045232697088">
</a>
<a class="indexterm" name="idm46045232695952">
</a>
<p>
Generates a random Universally Unique Identifier (UUID)
segmented with dashes.
</p>
<p>
Arguments:
</p>
<p>
None.
</p>
<p>
Return value:
</p>
<p>
A random UUID as a string encoded in the
<code class="literal">
utf8mb4
</code>
character set.
</p>
<p>
Example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa68508161"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> gen_rnd_uuid<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> gen_rnd_uuid() <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> 123e4567<span class="token punctuation">-</span>e89b<span class="token punctuation">-</span>12d3<span class="token punctuation">-</span>a456<span class="token punctuation">-</span>426614174000 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
</li>
</ul>
</div>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h5 class="title">
<a name="data-masking-dictionary-masking-component-functions">
</a>
Dictionary Masking Administration Component Functions
</h5>
</div>
</div>
</div>
<p>
The component functions in this section manipulate
dictionaries of terms and perform administrative masking
operations based on them. All of these functions require the
<a class="link" href="privileges-provided.html#priv_masking-dictionaries-admin">
<code class="literal">
MASKING_DICTIONARIES_ADMIN
</code>
</a>
privilege.
</p>
<p>
When a dictionary of terms is created, it becomes part of the
dictionary registry and is assigned a name to be used by other
dictionary functions.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<a name="function_masking-dictionaries-flush">
</a>
<a class="link" href="data-masking-component-functions.html#function_masking-dictionaries-flush">
<code class="literal">
masking_dictionaries_flush()
</code>
</a>
</p>
<a class="indexterm" name="idm46045232682480">
</a>
<a class="indexterm" name="idm46045232681344">
</a>
<p>
Flush the data from the masking dictionaries table to the
memory cache. Requires the
<a class="link" href="privileges-provided.html#priv_masking-dictionaries-admin">
<code class="literal">
MASKING_DICTIONARIES_ADMIN
</code>
</a>
privilege.
</p>
</li>
<li class="listitem">
<p>
<a name="function_masking-dictionary-remove">
</a>
<a class="link" href="data-masking-component-functions.html#function_masking-dictionary-remove">
<code class="literal">
masking_dictionary_remove(
<em class="replaceable">
<code>
dictionary_name
</code>
</em>
)
</code>
</a>
</p>
<a class="indexterm" name="idm46045232675072">
</a>
<a class="indexterm" name="idm46045232673936">
</a>
<p>
Removes a dictionary and all of its terms from the
dictionary registry. This function requires the
<a class="link" href="privileges-provided.html#priv_masking-dictionaries-admin">
<code class="literal">
MASKING_DICTIONARIES_ADMIN
</code>
</a>
privilege.
</p>
<p>
Arguments:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
<em class="replaceable">
<code>
dictionary_name
</code>
</em>
: A string
that names the dictionary to remove from the
dictionary table. This argument is converted to the
<code class="literal">
utf8mb4
</code>
character set.
</p>
</li>
</ul>
</div>
<p>
Return value:
</p>
<p>
A string that indicates whether the remove operation
succeeded.
<code class="literal">
1
</code>
indicates success.
<code class="literal">
NULL
</code>
indicates the dictionary name is
not found.
</p>
<p>
Example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa91426043"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> masking_dictionary_remove<span class="token punctuation">(</span><span class="token string">'mydict'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> masking_dictionary_remove('mydict') <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> 1 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> masking_dictionary_remove<span class="token punctuation">(</span><span class="token string">'no-such-dict'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> masking_dictionary_remove('no<span class="token punctuation">-</span>such<span class="token punctuation">-</span>dict') <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> NULL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
</li>
<li class="listitem">
<p>
<a name="function_masking-dictionary-term-add">
</a>
<a class="link" href="data-masking-component-functions.html#function_masking-dictionary-term-add">
<code class="literal">
masking_dictionary_term_add(
<em class="replaceable">
<code>
dictionary_name
</code>
</em>
,
<em class="replaceable">
<code>
term_name
</code>
</em>
)
</code>
</a>
</p>
<a class="indexterm" name="idm46045232658400">
</a>
<a class="indexterm" name="idm46045232657248">
</a>
<p>
Adds one term to the named dictionary. This function
requires the
<a class="link" href="privileges-provided.html#priv_masking-dictionaries-admin">
<code class="literal">
MASKING_DICTIONARIES_ADMIN
</code>
</a>
privilege.
</p>
<div class="important" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Important
</div>
<p>
Dictionaries and their terms are persisted to a table in
the
<code class="literal">
mysql
</code>
schema. All of the terms in
a dictionary are accessible to any user account if that
user executes
<a class="link" href="data-masking-component-functions.html#function_gen-dictionary">
<code class="literal">
gen_dictionary()
</code>
</a>
repeatedly. Avoid adding sensitive information to
dictionaries.
</p>
</div>
<p>
Each term is defined by a named dictionary.
<a class="link" href="data-masking-component-functions.html#function_masking-dictionary-term-add">
<code class="literal">
masking_dictionary_term_add()
</code>
</a>
permits you to add one dictionary term at a time.
</p>
<p>
Arguments:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
<em class="replaceable">
<code>
dictionary_name
</code>
</em>
: A string
that provides a name for the dictionary. This argument
is converted to the
<code class="literal">
utf8mb4
</code>
character set.
</p>
</li>
<li class="listitem">
<p>
<em class="replaceable">
<code>
term_name
</code>
</em>
: A string that
specifies the term name in the dictionary table. This
argument is converted to the
<code class="literal">
utf8mb4
</code>
character set.
</p>
</li>
</ul>
</div>
<p>
Return value:
</p>
<p>
A string that indicates whether the add term operation
succeeded.
<code class="literal">
1
</code>
indicates success.
<code class="literal">
NULL
</code>
indicates failure. Term add
failure can occur for several reasons, including:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
A term with the given name is already added.
</p>
</li>
<li class="listitem">
<p>
The dictionary name is not found.
</p>
</li>
</ul>
</div>
<p>
Example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa23286587"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> masking_dictionary_term_add<span class="token punctuation">(</span><span class="token string">'mydict'</span><span class="token punctuation">,</span><span class="token string">'newterm'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> masking_dictionary_term_add('mydict','newterm') <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> 1 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> masking_dictionary_term_add<span class="token punctuation">(</span><span class="token string">'mydict'</span><span class="token punctuation">,</span><span class="token string">''</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> masking_dictionary_term_add('mydict','') <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> NULL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
</li>
<li class="listitem">
<p>
<a name="function_masking-dictionary-term-remove">
</a>
<a class="link" href="data-masking-component-functions.html#function_masking-dictionary-term-remove">
<code class="literal">
masking_dictionary_term_remove(
<em class="replaceable">
<code>
dictionary_name
</code>
</em>
,
<em class="replaceable">
<code>
term_name
</code>
</em>
)
</code>
</a>
</p>
<a class="indexterm" name="idm46045232632592">
</a>
<a class="indexterm" name="idm46045232631440">
</a>
<p>
Removes one term from the named dictionary. This function
requires the
<a class="link" href="privileges-provided.html#priv_masking-dictionaries-admin">
<code class="literal">
MASKING_DICTIONARIES_ADMIN
</code>
</a>
privilege.
</p>
<p>
Arguments:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
<em class="replaceable">
<code>
dictionary_name
</code>
</em>
: A string
that provides a name for the dictionary. This argument
is converted to the
<code class="literal">
utf8mb4
</code>
character set.
</p>
</li>
<li class="listitem">
<p>
<em class="replaceable">
<code>
term_name
</code>
</em>
: A string that
specifies the term name in the dictionary table. This
argument is converted to the
<code class="literal">
utf8mb4
</code>
character set.
</p>
</li>
</ul>
</div>
<p>
Return value:
</p>
<p>
A string that indicates whether the remove term operation
succeeded.
<code class="literal">
1
</code>
indicates success.
<code class="literal">
NULL
</code>
indicates failure. Term remove
failure can occur for several reasons, including:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
A term with the given name is not found.
</p>
</li>
<li class="listitem">
<p>
The dictionary name is not found.
</p>
</li>
</ul>
</div>
<p>
Example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa32622046"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> masking_dictionary_term_add<span class="token punctuation">(</span><span class="token string">'mydict'</span><span class="token punctuation">,</span><span class="token string">'newterm'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> masking_dictionary_term_add('mydict','newterm') <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> 1 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> masking_dictionary_term_remove<span class="token punctuation">(</span><span class="token string">'mydict'</span><span class="token punctuation">,</span><span class="token string">''</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> masking_dictionary_term_remove('mydict','') <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> NULL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
</li>
</ul>
</div>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h5 class="title">
<a name="data-masking-dictionary-generating-component-functions">
</a>
Dictionary Generating Component Functions
</h5>
</div>
</div>
</div>
<p>
The component functions in this section manipulate
dictionaries of terms and perform generating operations based
on them.
</p>
<p>
When a dictionary of terms is created, it becomes part of the
dictionary registry and is assigned a name to be used by other
dictionary functions.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<a name="function_gen-blocklist">
</a>
<a class="link" href="data-masking-component-functions.html#function_gen-blocklist">
<code class="literal">
gen_blocklist(
<em class="replaceable">
<code>
str
</code>
</em>
,
<em class="replaceable">
<code>
from_dictionary_name
</code>
</em>
,
<em class="replaceable">
<code>
to_dictionary_name
</code>
</em>
)
</code>
</a>
</p>
<a class="indexterm" name="idm46045232608448">
</a>
<a class="indexterm" name="idm46045232607312">
</a>
<p>
Replaces a term present in one dictionary with a term from
a second dictionary and returns the replacement term. This
masks the original term by substitution.
</p>
<p>
Arguments:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
<em class="replaceable">
<code>
term
</code>
</em>
: A string that
indicates the term to replace. This argument is
converted to the
<code class="literal">
utf8mb4
</code>
character
set.
</p>
</li>
<li class="listitem">
<p>
<em class="replaceable">
<code>
from_dictionary_name
</code>
</em>
: A
string that names the dictionary containing the term
to replace. This argument is converted to the
<code class="literal">
utf8mb4
</code>
character set.
</p>
</li>
<li class="listitem">
<p>
<em class="replaceable">
<code>
to_dictionary_name
</code>
</em>
: A
string that names the dictionary from which to choose
the replacement term. This argument is converted to
the
<code class="literal">
utf8mb4
</code>
character set.
</p>
</li>
</ul>
</div>
<p>
Return value:
</p>
<p>
A string encoded in the
<code class="literal">
utf8mb4
</code>
character set randomly chosen from
<em class="replaceable">
<code>
to_dictionary_name
</code>
</em>
as a
replacement for
<em class="replaceable">
<code>
term
</code>
</em>
, or
<em class="replaceable">
<code>
term
</code>
</em>
if it does not appear in
<em class="replaceable">
<code>
from_dictionary_name
</code>
</em>
, or an
error if either dictionary name is not in the dictionary
registry.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
If the term to replace appears in both dictionaries, it
is possible for the return value to be the same term.
</p>
</div>
<p>
Example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa74549348"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> gen_blocklist<span class="token punctuation">(</span><span class="token string">'Berlin'</span><span class="token punctuation">,</span> <span class="token string">'DE_Cities'</span><span class="token punctuation">,</span> <span class="token string">'US_Cities'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> gen_blocklist('Berlin', 'DE_Cities', 'US_Cities') <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Phoenix <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
</li>
<li class="listitem">
<p>
<a name="function_gen-dictionary">
</a>
<a class="link" href="data-masking-component-functions.html#function_gen-dictionary">
<code class="literal">
gen_dictionary(
<em class="replaceable">
<code>
dictionary_name
</code>
</em>
)
</code>
</a>
</p>
<a class="indexterm" name="idm46045232588416">
</a>
<a class="indexterm" name="idm46045232587280">
</a>
<p>
Returns a random term from a dictionary.
</p>
<p>
Arguments:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
<em class="replaceable">
<code>
dictionary_name
</code>
</em>
: A string
that names the dictionary from which to choose the
term. This argument is converted to the
<code class="literal">
utf8mb4
</code>
character set.
</p>
</li>
</ul>
</div>
<p>
Return value:
</p>
<p>
A random term from the dictionary as a string encoded in
the
<code class="literal">
utf8mb4
</code>
character set, or
<code class="literal">
NULL
</code>
if the dictionary name is not in
the dictionary registry.
</p>
<p>
Example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa23154072"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> gen_dictionary<span class="token punctuation">(</span><span class="token string">'mydict'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> gen_dictionary('mydict') <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> My term <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> gen_dictionary<span class="token punctuation">(</span><span class="token string">'no-such-dict'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output">ERROR 1123 (HY000)<span class="token punctuation">:</span> Can't initialize function 'gen_dictionary'; Cannot access
dictionary, check if dictionary name is valid.</span></code></pre>
</div>
</li>
</ul>
</div>
</div>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/charset-baltic-sets.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a name="charset-baltic-sets">
</a>
12.10.5 Baltic Character Sets
</h3>
</div>
</div>
</div>
<a class="indexterm" name="idm46045215844240">
</a>
<a class="indexterm" name="idm46045215842752">
</a>
<p>
The Baltic character sets cover Estonian, Latvian, and
Lithuanian languages.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<code class="literal">
cp1257
</code>
(Windows Baltic) collations:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
<code class="literal">
cp1257_bin
</code>
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
cp1257_general_ci
</code>
(default)
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
cp1257_lithuanian_ci
</code>
</p>
</li>
</ul>
</div>
</li>
<li class="listitem">
<p>
<code class="literal">
latin7
</code>
(ISO 8859-13 Baltic) collations:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
<code class="literal">
latin7_bin
</code>
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
latin7_estonian_cs
</code>
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
latin7_general_ci
</code>
(default)
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
latin7_general_cs
</code>
</p>
</li>
</ul>
</div>
</li>
</ul>
</div>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/se-csv-limitations.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a name="se-csv-limitations">
</a>
18.4.2 CSV Limitations
</h3>
</div>
</div>
</div>
<p>
The
<code class="literal">
CSV
</code>
storage engine does not support
indexing.
</p>
<p>
The
<code class="literal">
CSV
</code>
storage engine does not support
partitioning.
</p>
<p>
All tables that you create using the
<code class="literal">
CSV
</code>
storage engine must have the
<code class="literal">
NOT NULL
</code>
attribute
on all columns.
</p>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/communication-errors.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title">
<a name="communication-errors">
</a>
B.3.2.9 Communication Errors and Aborted Connections
</h4>
</div>
</div>
</div>
<a class="indexterm" name="idm46045054303776">
</a>
<a class="indexterm" name="idm46045054302736">
</a>
<a class="indexterm" name="idm46045054301664">
</a>
<p>
If connection problems occur such as communication errors or
aborted connections, use these sources of information to
diagnose problems:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
The error log. See
<a class="xref" href="error-log.html" title="7.4.2 The Error Log">
Section 7.4.2, “The Error Log”
</a>
.
</p>
</li>
<li class="listitem">
<p>
The general query log. See
<a class="xref" href="query-log.html" title="7.4.3 The General Query Log">
Section 7.4.3, “The General Query Log”
</a>
.
</p>
</li>
<li class="listitem">
<p>
The
<code class="literal">
Aborted_
<em class="replaceable">
<code>
xxx
</code>
</em>
</code>
and
<code class="literal">
Connection_errors_
<em class="replaceable">
<code>
xxx
</code>
</em>
</code>
status variables. See
<a class="xref" href="server-status-variables.html" title="7.1.10 Server Status Variables">
Section 7.1.10, “Server Status Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
The host cache, which is accessible using the Performance
Schema
<a class="link" href="performance-schema-host-cache-table.html" title="29.12.22.3 The host_cache Table">
<code class="literal">
host_cache
</code>
</a>
table. See
<a class="xref" href="host-cache.html" title="7.1.12.3 DNS Lookups and the Host Cache">
Section 7.1.12.3, “DNS Lookups and the Host Cache”
</a>
, and
<a class="xref" href="performance-schema-host-cache-table.html" title="29.12.22.3 The host_cache Table">
Section 29.12.22.3, “The host_cache Table”
</a>
.
</p>
</li>
</ul>
</div>
<p>
If the
<a class="link" href="server-system-variables.html#sysvar_log_error_verbosity">
<code class="literal">
log_error_verbosity
</code>
</a>
system variable is set to 3, you might find messages like this
in your error log:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-none"><div class="docs-select-all right" id="sa91273300"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-none">[Note] Aborted connection 854 to db: 'employees' user: 'josh'</code></pre>
</div>
<p>
If a client is unable even to connect, the server increments
the
<a class="link" href="server-status-variables.html#statvar_Aborted_connects">
<code class="literal">
Aborted_connects
</code>
</a>
status
variable. Unsuccessful connection attempts can occur for the
following reasons:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
A client attempts to access a database but has no
privileges for it.
</p>
</li>
<li class="listitem">
<p>
A client uses an incorrect password.
</p>
</li>
<li class="listitem">
<p>
A connection packet does not contain the right
information.
</p>
</li>
<li class="listitem">
<p>
It takes more than
<a class="link" href="server-system-variables.html#sysvar_connect_timeout">
<code class="literal">
connect_timeout
</code>
</a>
seconds
to obtain a connect packet. See
<a class="xref" href="server-system-variables.html" title="7.1.8 Server System Variables">
Section 7.1.8, “Server System Variables”
</a>
.
</p>
</li>
</ul>
</div>
<p>
If these kinds of things happen, it might indicate that
someone is trying to break into your server! If the general
query log is enabled, messages for these types of problems are
logged to it.
</p>
<p>
If a client successfully connects but later disconnects
improperly or is terminated, the server increments the
<a class="link" href="server-status-variables.html#statvar_Aborted_clients">
<code class="literal">
Aborted_clients
</code>
</a>
status
variable, and logs an
<span class="errortext">
Aborted
connection
</span>
message to the error log. The cause can
be any of the following:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
The client program did not call
<a class="ulink" href="/doc/c-api/8.4/en/mysql-close.html" target="_top">
<code class="literal">
mysql_close()
</code>
</a>
before
exiting.
</p>
</li>
<li class="listitem">
<p>
The client had been sleeping more than
<a class="link" href="server-system-variables.html#sysvar_wait_timeout">
<code class="literal">
wait_timeout
</code>
</a>
or
<a class="link" href="server-system-variables.html#sysvar_interactive_timeout">
<code class="literal">
interactive_timeout
</code>
</a>
seconds without issuing any requests to the server. See
<a class="xref" href="server-system-variables.html" title="7.1.8 Server System Variables">
Section 7.1.8, “Server System Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
The client program ended abruptly in the middle of a data
transfer.
</p>
</li>
</ul>
</div>
<p>
Other reasons for problems with aborted connections or aborted
clients:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
The
<a class="link" href="server-system-variables.html#sysvar_max_allowed_packet">
<code class="literal">
max_allowed_packet
</code>
</a>
variable value is too small or queries require more memory
than you have allocated for
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
. See
<a class="xref" href="packet-too-large.html" title="B.3.2.8 Packet Too Large">
Section B.3.2.8, “Packet Too Large”
</a>
.
</p>
</li>
<li class="listitem">
<p>
Use of Ethernet protocol with Linux, both half and full
duplex. Some Linux Ethernet drivers have this bug. You
should test for this bug by transferring a huge file using
FTP between the client and server machines. If a transfer
goes in burst-pause-burst-pause mode, you are experiencing
a Linux duplex syndrome. Switch the duplex mode for both
your network card and hub/switch to either full duplex or
to half duplex and test the results to determine the best
setting.
</p>
</li>
<li class="listitem">
<p>
A problem with the thread library that causes interrupts
on reads.
</p>
</li>
<li class="listitem">
<p>
Badly configured TCP/IP.
</p>
</li>
<li class="listitem">
<p>
Faulty Ethernets, hubs, switches, cables, and so forth.
This can be diagnosed properly only by replacing hardware.
</p>
</li>
</ul>
</div>
<p>
See also
<a class="xref" href="gone-away.html" title="B.3.2.7 MySQL server has gone away">
Section B.3.2.7, “MySQL server has gone away”
</a>
.
</p>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/information-schema-events-table.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a name="information-schema-events-table">
</a>
28.3.14 The INFORMATION_SCHEMA EVENTS Table
</h3>
</div>
</div>
</div>
<a class="indexterm" name="idm46045079981040">
</a>
<p>
The
<a class="link" href="information-schema-events-table.html" title="28.3.14 The INFORMATION_SCHEMA EVENTS Table">
<code class="literal">
EVENTS
</code>
</a>
table provides information
about Event Manager events, which are discussed in
<a class="xref" href="event-scheduler.html" title="27.4 Using the Event Scheduler">
Section 27.4, “Using the Event Scheduler”
</a>
.
</p>
<p>
The
<a class="link" href="information-schema-events-table.html" title="28.3.14 The INFORMATION_SCHEMA EVENTS Table">
<code class="literal">
EVENTS
</code>
</a>
table has these columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<code class="literal">
EVENT_CATALOG
</code>
</p>
<p>
The name of the catalog to which the event belongs. This value
is always
<code class="literal">
def
</code>
.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
EVENT_SCHEMA
</code>
</p>
<p>
The name of the schema (database) to which the event belongs.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
EVENT_NAME
</code>
</p>
<p>
The name of the event.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
DEFINER
</code>
</p>
<p>
The account named in the
<code class="literal">
DEFINER
</code>
clause
(often the user who created the event), in
<code class="literal">
'
<em class="replaceable">
<code>
user_name
</code>
</em>
'@'
<em class="replaceable">
<code>
host_name
</code>
</em>
'
</code>
format.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
TIME_ZONE
</code>
</p>
<p>
The event time zone, which is the time zone used for
scheduling the event and that is in effect within the event as
it executes. The default value is
<code class="literal">
SYSTEM
</code>
.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
EVENT_BODY
</code>
</p>
<p>
The language used for the statements in the event's
<a class="link" href="do.html" title="15.2.3 DO Statement">
<code class="literal">
DO
</code>
</a>
clause. The value is always
<code class="literal">
SQL
</code>
.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
EVENT_DEFINITION
</code>
</p>
<p>
The text of the SQL statement making up the event's
<a class="link" href="do.html" title="15.2.3 DO Statement">
<code class="literal">
DO
</code>
</a>
clause; in other words, the
statement executed by this event.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
EVENT_TYPE
</code>
</p>
<p>
The event repetition type, either
<code class="literal">
ONE TIME
</code>
(transient) or
<code class="literal">
RECURRING
</code>
(repeating).
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
EXECUTE_AT
</code>
</p>
<p>
For a one-time event, this is the
<a class="link" href="datetime.html" title="13.2.2 The DATE, DATETIME, and TIMESTAMP Types">
<code class="literal">
DATETIME
</code>
</a>
value specified in the
<code class="literal">
AT
</code>
clause of the
<a class="link" href="create-event.html" title="15.1.13 CREATE EVENT Statement">
<code class="literal">
CREATE EVENT
</code>
</a>
statement used to
create the event, or of the last
<a class="link" href="alter-event.html" title="15.1.3 ALTER EVENT Statement">
<code class="literal">
ALTER
EVENT
</code>
</a>
statement that modified the event. The value
shown in this column reflects the addition or subtraction of
any
<code class="literal">
INTERVAL
</code>
value included in the event's
<code class="literal">
AT
</code>
clause. For example, if an event is
created using
<code class="literal">
ON SCHEDULE AT CURRENT_TIMESTAMP +
'1:6' DAY_HOUR
</code>
, and the event was created at
2018-02-09 14:05:30, the value shown in this column would be
<code class="literal">
'2018-02-10 20:05:30'
</code>
. If the event's
timing is determined by an
<code class="literal">
EVERY
</code>
clause
instead of an
<code class="literal">
AT
</code>
clause (that is, if the
event is recurring), the value of this column is
<code class="literal">
NULL
</code>
.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
INTERVAL_VALUE
</code>
</p>
<p>
For a recurring event, the number of intervals to wait between
event executions. For a transient event, the value is always
<code class="literal">
NULL
</code>
.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
INTERVAL_FIELD
</code>
</p>
<p>
The time units used for the interval which a recurring event
waits before repeating. For a transient event, the value is
always
<code class="literal">
NULL
</code>
.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
SQL_MODE
</code>
</p>
<p>
The SQL mode in effect when the event was created or altered,
and under which the event executes. For the permitted values,
see
<a class="xref" href="sql-mode.html" title="7.1.11 Server SQL Modes">
Section 7.1.11, “Server SQL Modes”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
STARTS
</code>
</p>
<p>
The start date and time for a recurring event. This is
displayed as a
<a class="link" href="datetime.html" title="13.2.2 The DATE, DATETIME, and TIMESTAMP Types">
<code class="literal">
DATETIME
</code>
</a>
value,
and is
<code class="literal">
NULL
</code>
if no start date and time are
defined for the event. For a transient event, this column is
always
<code class="literal">
NULL
</code>
. For a recurring event whose
definition includes a
<code class="literal">
STARTS
</code>
clause, this
column contains the corresponding
<a class="link" href="datetime.html" title="13.2.2 The DATE, DATETIME, and TIMESTAMP Types">
<code class="literal">
DATETIME
</code>
</a>
value. As with the
<code class="literal">
EXECUTE_AT
</code>
column, this value resolves any
expressions used. If there is no
<code class="literal">
STARTS
</code>
clause affecting the timing of the event, this column is
<code class="literal">
NULL
</code>
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
ENDS
</code>
</p>
<p>
For a recurring event whose definition includes a
<code class="literal">
ENDS
</code>
clause, this column contains the
corresponding
<a class="link" href="datetime.html" title="13.2.2 The DATE, DATETIME, and TIMESTAMP Types">
<code class="literal">
DATETIME
</code>
</a>
value.
As with the
<code class="literal">
EXECUTE_AT
</code>
column, this value
resolves any expressions used. If there is no
<code class="literal">
ENDS
</code>
clause affecting the timing of the
event, this column is
<code class="literal">
NULL
</code>
.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
STATUS
</code>
</p>
<p>
The event status. One of
<code class="literal">
ENABLED
</code>
,
<code class="literal">
DISABLED
</code>
, or
<code class="literal">
REPLICA_SIDE_DISABLED
</code>
(prior to MySQL
8.2.0, this was
<code class="literal">
SLAVESIDE_DISABLED
</code>
, now
deprecated).
<code class="literal">
REPLICA_SIDE_DISABLED
</code>
indicates that the creation of the event occurred on another
MySQL server acting as a replication source and replicated to
the current MySQL server which is acting as a replica, but the
event is not presently being executed on the replica. For more
information, see
<a class="xref" href="replication-features-invoked.html" title="19.5.1.16 Replication of Invoked Features">
Section 19.5.1.16, “Replication of Invoked Features”
</a>
. information.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
ON_COMPLETION
</code>
</p>
<p>
One of the two values
<code class="literal">
PRESERVE
</code>
or
<code class="literal">
NOT PRESERVE
</code>
.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
CREATED
</code>
</p>
<p>
The date and time when the event was created. This is a
<a class="link" href="datetime.html" title="13.2.2 The DATE, DATETIME, and TIMESTAMP Types">
<code class="literal">
TIMESTAMP
</code>
</a>
value.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
LAST_ALTERED
</code>
</p>
<p>
The date and time when the event was last modified. This is a
<a class="link" href="datetime.html" title="13.2.2 The DATE, DATETIME, and TIMESTAMP Types">
<code class="literal">
TIMESTAMP
</code>
</a>
value. If the event
has not been modified since its creation, this value is the
same as the
<code class="literal">
CREATED
</code>
value.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
LAST_EXECUTED
</code>
</p>
<p>
The date and time when the event last executed. This is a
<a class="link" href="datetime.html" title="13.2.2 The DATE, DATETIME, and TIMESTAMP Types">
<code class="literal">
DATETIME
</code>
</a>
value. If the event
has never executed, this column is
<code class="literal">
NULL
</code>
.
</p>
<p>
<code class="literal">
LAST_EXECUTED
</code>
indicates when the event
started. As a result, the
<code class="literal">
ENDS
</code>
column is
never less than
<code class="literal">
LAST_EXECUTED
</code>
.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
EVENT_COMMENT
</code>
</p>
<p>
The text of the comment, if the event has one. If not, this
value is empty.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
ORIGINATOR
</code>
</p>
<p>
The server ID of the MySQL server on which the event was
created; used in replication. This value may be updated by
<a class="link" href="alter-event.html" title="15.1.3 ALTER EVENT Statement">
<code class="literal">
ALTER EVENT
</code>
</a>
to the server ID of
the server on which that statement occurs, if executed on a
replication source. The default value is 0.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
CHARACTER_SET_CLIENT
</code>
</p>
<p>
The session value of the
<a class="link" href="server-system-variables.html#sysvar_character_set_client">
<code class="literal">
character_set_client
</code>
</a>
system
variable when the event was created.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
COLLATION_CONNECTION
</code>
</p>
<p>
The session value of the
<a class="link" href="server-system-variables.html#sysvar_collation_connection">
<code class="literal">
collation_connection
</code>
</a>
system
variable when the event was created.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
DATABASE_COLLATION
</code>
</p>
<p>
The collation of the database with which the event is
associated.
</p>
</li>
</ul>
</div>
<h4>
<a name="idm46045079878688">
</a>
Notes
</h4>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<a class="link" href="information-schema-events-table.html" title="28.3.14 The INFORMATION_SCHEMA EVENTS Table">
<code class="literal">
EVENTS
</code>
</a>
is a nonstandard
<code class="literal">
INFORMATION_SCHEMA
</code>
table.
</p>
</li>
<li class="listitem">
<p>
Times in the
<a class="link" href="information-schema-events-table.html" title="28.3.14 The INFORMATION_SCHEMA EVENTS Table">
<code class="literal">
EVENTS
</code>
</a>
table are
displayed using the event time zone, the current session time
zone, or UTC, as described in
<a class="xref" href="events-metadata.html" title="27.4.4 Event Metadata">
Section 27.4.4, “Event Metadata”
</a>
.
</p>
</li>
<li class="listitem">
<p>
For more information about
<code class="literal">
REPLICA_SIDE_DISABLED
</code>
and the
<code class="literal">
ORIGINATOR
</code>
column, see
<a class="xref" href="replication-features-invoked.html" title="19.5.1.16 Replication of Invoked Features">
Section 19.5.1.16, “Replication of Invoked Features”
</a>
.
</p>
</li>
</ul>
</div>
<h4>
<a name="idm46045079869008">
</a>
Example
</h4>
<p>
Suppose that the user
<code class="literal">
'jon'@'ghidora'
</code>
creates
an event named
<code class="literal">
e_daily
</code>
, and then modifies it a
few minutes later using an
<a class="link" href="alter-event.html" title="15.1.3 ALTER EVENT Statement">
<code class="literal">
ALTER
EVENT
</code>
</a>
statement, as shown here:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa20922252"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">DELIMITER</span> <span class="token operator">|</span>
<span class="token keyword">CREATE</span> <span class="token keyword">EVENT</span> e_daily
<span class="token keyword">ON</span> <span class="token keyword">SCHEDULE</span>
<span class="token keyword">EVERY</span> <span class="token number">1</span> <span class="token keyword">DAY</span>
<span class="token keyword">COMMENT</span> <span class="token string">'Saves total number of sessions then clears the table each day'</span>
<span class="token keyword">DO</span>
<span class="token keyword">BEGIN</span>
<span class="token keyword">INSERT</span> <span class="token keyword">INTO</span> site_activity<span class="token punctuation">.</span>totals <span class="token punctuation">(</span><span class="token datatype">time</span><span class="token punctuation">,</span> total<span class="token punctuation">)</span>
<span class="token keyword">SELECT</span> <span class="token keyword">CURRENT_TIMESTAMP</span><span class="token punctuation">,</span> <span class="token function">COUNT</span><span class="token punctuation">(</span><span class="token operator">*</span><span class="token punctuation">)</span>
<span class="token keyword">FROM</span> site_activity<span class="token punctuation">.</span>sessions<span class="token punctuation">;</span>
<span class="token keyword">DELETE</span> <span class="token keyword">FROM</span> site_activity<span class="token punctuation">.</span>sessions<span class="token punctuation">;</span>
<span class="token keyword">END</span> <span class="token operator">|</span>
<span class="token keyword">DELIMITER</span> <span class="token punctuation">;</span>
<span class="token keyword">ALTER</span> <span class="token keyword">EVENT</span> e_daily
<span class="token keyword">ENABLE</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
(Note that comments can span multiple lines.)
</p>
<p>
This user can then run the following
<a class="link" href="select.html" title="15.2.13 SELECT Statement">
<code class="literal">
SELECT
</code>
</a>
statement, and obtain the
output shown:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa14438583"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> <span class="token operator">*</span> <span class="token keyword">FROM</span> INFORMATION_SCHEMA<span class="token punctuation">.</span><span class="token keyword">EVENTS</span>
<span class="token keyword">WHERE</span> EVENT_NAME <span class="token operator">=</span> <span class="token string">'e_daily'</span>
<span class="token operator">AND</span> EVENT_SCHEMA <span class="token operator">=</span> <span class="token string">'myschema'</span>\G
<span class="token output"><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 1. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
EVENT_CATALOG<span class="token punctuation">:</span> def
EVENT_SCHEMA<span class="token punctuation">:</span> myschema
EVENT_NAME<span class="token punctuation">:</span> e_daily
DEFINER<span class="token punctuation">:</span> jon@ghidora
TIME_ZONE<span class="token punctuation">:</span> SYSTEM
EVENT_BODY<span class="token punctuation">:</span> SQL
EVENT_DEFINITION<span class="token punctuation">:</span> BEGIN
INSERT INTO site_activity.totals (time, total)
SELECT CURRENT_TIMESTAMP, COUNT(<span class="token punctuation">*</span>)
FROM site_activity.sessions;
DELETE FROM site_activity.sessions;
END
EVENT_TYPE<span class="token punctuation">:</span> RECURRING
EXECUTE_AT<span class="token punctuation">:</span> NULL
INTERVAL_VALUE<span class="token punctuation">:</span> 1
INTERVAL_FIELD<span class="token punctuation">:</span> DAY
SQL_MODE<span class="token punctuation">:</span> ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,
NO_ZERO_IN_DATE,NO_ZERO_DATE,
ERROR_FOR_DIVISION_BY_ZERO,
NO_ENGINE_SUBSTITUTION
STARTS<span class="token punctuation">:</span> 2018-08-08 11<span class="token punctuation">:</span>06<span class="token punctuation">:</span>34
ENDS<span class="token punctuation">:</span> NULL
STATUS<span class="token punctuation">:</span> ENABLED
ON_COMPLETION<span class="token punctuation">:</span> NOT PRESERVE
CREATED<span class="token punctuation">:</span> 2018-08-08 11<span class="token punctuation">:</span>06<span class="token punctuation">:</span>34
LAST_ALTERED<span class="token punctuation">:</span> 2018-08-08 11<span class="token punctuation">:</span>06<span class="token punctuation">:</span>34
LAST_EXECUTED<span class="token punctuation">:</span> 2018-08-08 16<span class="token punctuation">:</span>06<span class="token punctuation">:</span>34
EVENT_COMMENT<span class="token punctuation">:</span> Saves total number of sessions then clears the
table each day
ORIGINATOR<span class="token punctuation">:</span> 1
CHARACTER_SET_CLIENT<span class="token punctuation">:</span> utf8mb4
COLLATION_CONNECTION<span class="token punctuation">:</span> utf8mb4_0900_ai_ci
DATABASE_COLLATION<span class="token punctuation">:</span> utf8mb4_0900_ai_ci</span></code></pre>
</div>
<p>
Event information is also available from the
<a class="link" href="show-events.html" title="15.7.7.19 SHOW EVENTS Statement">
<code class="literal">
SHOW EVENTS
</code>
</a>
statement. See
<a class="xref" href="show-events.html" title="15.7.7.19 SHOW EVENTS Statement">
Section 15.7.7.19, “SHOW EVENTS Statement”
</a>
. The following statements are
equivalent:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa81378684"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SELECT</span>
EVENT_SCHEMA<span class="token punctuation">,</span> EVENT_NAME<span class="token punctuation">,</span> <span class="token keyword">DEFINER</span><span class="token punctuation">,</span> TIME_ZONE<span class="token punctuation">,</span> EVENT_TYPE<span class="token punctuation">,</span> EXECUTE_AT<span class="token punctuation">,</span>
INTERVAL_VALUE<span class="token punctuation">,</span> INTERVAL_FIELD<span class="token punctuation">,</span> <span class="token keyword">STARTS</span><span class="token punctuation">,</span> <span class="token keyword">ENDS</span><span class="token punctuation">,</span> <span class="token keyword">STATUS</span><span class="token punctuation">,</span> ORIGINATOR<span class="token punctuation">,</span>
CHARACTER_SET_CLIENT<span class="token punctuation">,</span> COLLATION_CONNECTION<span class="token punctuation">,</span> DATABASE_COLLATION
<span class="token keyword">FROM</span> INFORMATION_SCHEMA<span class="token punctuation">.</span><span class="token keyword">EVENTS</span>
<span class="token keyword">WHERE</span> table_schema <span class="token operator">=</span> <span class="token string">'<em class="replaceable">db_name</em>'</span>
<span class="token punctuation">[</span><span class="token operator">AND</span> <span class="token keyword">column_name</span> <span class="token operator">LIKE</span> <span class="token string">'<em class="replaceable">wild</em>'</span><span class="token punctuation">]</span>
<span class="token keyword">SHOW</span> <span class="token keyword">EVENTS</span>
<span class="token punctuation">[</span><span class="token keyword">FROM</span> <em class="replaceable">db_name</em><span class="token punctuation">]</span>
<span class="token punctuation">[</span><span class="token operator">LIKE</span> <span class="token string">'<em class="replaceable">wild</em>'</span><span class="token punctuation">]</span></code></pre>
</div>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/mysql-cluster-ndbinfo-server-operations.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title">
<a name="mysql-cluster-ndbinfo-server-operations">
</a>
25.6.17.55 The ndbinfo server_operations Table
</h4>
</div>
</div>
</div>
<a class="indexterm" name="idm46045087944208">
</a>
<p>
The
<code class="literal">
server_operations
</code>
table contains entries
for all ongoing
<a class="link" href="mysql-cluster.html" title="Chapter 25 MySQL NDB Cluster 8.4">
<code class="literal">
NDB
</code>
</a>
operations that
the current SQL node (MySQL Server) is currently involved in. It
effectively is a subset of the
<a class="link" href="mysql-cluster-ndbinfo-cluster-operations.html" title="25.6.17.8 The ndbinfo cluster_operations Table">
<code class="literal">
cluster_operations
</code>
</a>
table, in
which operations for other SQL and API nodes are not shown.
</p>
<p>
The
<code class="literal">
server_operations
</code>
table contains the
following columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<code class="literal">
mysql_connection_id
</code>
</p>
<p>
MySQL Server connection ID
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
node_id
</code>
</p>
<p>
Node ID
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
block_instance
</code>
</p>
<p>
Block instance
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
transid
</code>
</p>
<p>
Transaction ID
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
operation_type
</code>
</p>
<p>
Operation type (see text for possible values)
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
state
</code>
</p>
<p>
Operation state (see text for possible values)
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
tableid
</code>
</p>
<p>
Table ID
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
fragmentid
</code>
</p>
<p>
Fragment ID
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
client_node_id
</code>
</p>
<p>
Client node ID
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
client_block_ref
</code>
</p>
<p>
Client block reference
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
tc_node_id
</code>
</p>
<p>
Transaction coordinator node ID
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
tc_block_no
</code>
</p>
<p>
Transaction coordinator block number
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
tc_block_instance
</code>
</p>
<p>
Transaction coordinator block instance
</p>
</li>
</ul>
</div>
<h5>
<a name="idm46045087912592">
</a>
Notes
</h5>
<p>
The
<code class="literal">
mysql_connection_id
</code>
is the same as the
connection or session ID shown in the output of
<a class="link" href="show-processlist.html" title="15.7.7.31 SHOW PROCESSLIST Statement">
<code class="literal">
SHOW PROCESSLIST
</code>
</a>
. It is obtained
from the
<code class="literal">
INFORMATION_SCHEMA
</code>
table
<a class="link" href="information-schema-ndb-transid-mysql-connection-map-table.html" title="28.3.18 The INFORMATION_SCHEMA ndb_transid_mysql_connection_map Table">
<code class="literal">
NDB_TRANSID_MYSQL_CONNECTION_MAP
</code>
</a>
.
</p>
<p>
<code class="literal">
block_instance
</code>
refers to an instance of a
kernel block. Together with the block name, this number can be
used to look up a given instance in the
<a class="link" href="mysql-cluster-ndbinfo-threadblocks.html" title="25.6.17.62 The ndbinfo threadblocks Table">
<code class="literal">
threadblocks
</code>
</a>
table.
</p>
<p>
The transaction ID (
<code class="literal">
transid
</code>
) is a unique
64-bit number which can be obtained using the NDB API's
<a class="ulink" href="/doc/ndbapi/en/ndb-ndbtransaction.html#ndb-ndbtransaction-gettransactionid" target="_top">
<code class="literal">
getTransactionId()
</code>
</a>
method. (Currently, the MySQL Server does not expose the NDB API
transaction ID of an ongoing transaction.)
</p>
<p>
The
<code class="literal">
operation_type
</code>
column can take any one of
the values
<code class="literal">
READ
</code>
,
<code class="literal">
READ-SH
</code>
,
<code class="literal">
READ-EX
</code>
,
<code class="literal">
INSERT
</code>
,
<code class="literal">
UPDATE
</code>
,
<code class="literal">
DELETE
</code>
,
<code class="literal">
WRITE
</code>
,
<code class="literal">
UNLOCK
</code>
,
<code class="literal">
REFRESH
</code>
,
<code class="literal">
SCAN
</code>
,
<code class="literal">
SCAN-SH
</code>
,
<code class="literal">
SCAN-EX
</code>
, or
<code class="literal">
<unknown>
</code>
.
</p>
<p>
The
<code class="literal">
state
</code>
column can have any one of the
values
<code class="literal">
ABORT_QUEUED
</code>
,
<code class="literal">
ABORT_STOPPED
</code>
,
<code class="literal">
COMMITTED
</code>
,
<code class="literal">
COMMIT_QUEUED
</code>
,
<code class="literal">
COMMIT_STOPPED
</code>
,
<code class="literal">
COPY_CLOSE_STOPPED
</code>
,
<code class="literal">
COPY_FIRST_STOPPED
</code>
,
<code class="literal">
COPY_STOPPED
</code>
,
<code class="literal">
COPY_TUPKEY
</code>
,
<code class="literal">
IDLE
</code>
,
<code class="literal">
LOG_ABORT_QUEUED
</code>
,
<code class="literal">
LOG_COMMIT_QUEUED
</code>
,
<code class="literal">
LOG_COMMIT_QUEUED_WAIT_SIGNAL
</code>
,
<code class="literal">
LOG_COMMIT_WRITTEN
</code>
,
<code class="literal">
LOG_COMMIT_WRITTEN_WAIT_SIGNAL
</code>
,
<code class="literal">
LOG_QUEUED
</code>
,
<code class="literal">
PREPARED
</code>
,
<code class="literal">
PREPARED_RECEIVED_COMMIT
</code>
,
<code class="literal">
SCAN_CHECK_STOPPED
</code>
,
<code class="literal">
SCAN_CLOSE_STOPPED
</code>
,
<code class="literal">
SCAN_FIRST_STOPPED
</code>
,
<code class="literal">
SCAN_RELEASE_STOPPED
</code>
,
<code class="literal">
SCAN_STATE_USED
</code>
,
<code class="literal">
SCAN_STOPPED
</code>
,
<code class="literal">
SCAN_TUPKEY
</code>
,
<code class="literal">
STOPPED
</code>
,
<code class="literal">
TC_NOT_CONNECTED
</code>
,
<code class="literal">
WAIT_ACC
</code>
,
<code class="literal">
WAIT_ACC_ABORT
</code>
,
<code class="literal">
WAIT_AI_AFTER_ABORT
</code>
,
<code class="literal">
WAIT_ATTR
</code>
,
<code class="literal">
WAIT_SCAN_AI
</code>
,
<code class="literal">
WAIT_TUP
</code>
,
<code class="literal">
WAIT_TUPKEYINFO
</code>
,
<code class="literal">
WAIT_TUP_COMMIT
</code>
, or
<code class="literal">
WAIT_TUP_TO_ABORT
</code>
. (If the MySQL Server is
running with
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndbinfo_show_hidden">
<code class="literal">
ndbinfo_show_hidden
</code>
</a>
enabled,
you can view this list of states by selecting from the
<code class="literal">
ndb$dblqh_tcconnect_state
</code>
table, which is
normally hidden.)
</p>
<p>
You can obtain the name of an
<code class="literal">
NDB
</code>
table from
its table ID by checking the output of
<a class="link" href="mysql-cluster-programs-ndb-show-tables.html" title="25.5.27 ndb_show_tables — Display List of NDB Tables">
<span class="command">
<strong>
ndb_show_tables
</strong>
</span>
</a>
.
</p>
<p>
The
<code class="literal">
fragid
</code>
is the same as the partition
number seen in the output of
<a class="link" href="mysql-cluster-programs-ndb-desc.html" title="25.5.9 ndb_desc — Describe NDB Tables">
<span class="command">
<strong>
ndb_desc
</strong>
</span>
</a>
<a class="link" href="mysql-cluster-programs-ndb-desc.html#option_ndb_desc_extra-partition-info">
<code class="option">
--extra-partition-info
</code>
</a>
(short
form
<code class="option">
-p
</code>
).
</p>
<p>
In
<code class="literal">
client_node_id
</code>
and
<code class="literal">
client_block_ref
</code>
,
<code class="literal">
client
</code>
refers to an NDB Cluster API or SQL node (that is, an NDB API
client or a MySQL Server attached to the cluster).
</p>
<p>
The
<code class="literal">
block_instance
</code>
and
<code class="literal">
tc_block_instance
</code>
column provide NDB kernel
block instance numbers. You can use these to obtain information
about specific threads from the
<a class="link" href="mysql-cluster-ndbinfo-threadblocks.html" title="25.6.17.62 The ndbinfo threadblocks Table">
<code class="literal">
threadblocks
</code>
</a>
table.
</p>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/events-configuration.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a name="events-configuration">
</a>
27.4.2 Event Scheduler Configuration
</h3>
</div>
</div>
</div>
<p>
Events are executed by a special
<span class="firstterm">
event
scheduler thread
</span>
; when we refer to the Event Scheduler,
we actually refer to this thread. When running, the event
scheduler thread and its current state can be seen by users having
the
<a class="link" href="privileges-provided.html#priv_process">
<code class="literal">
PROCESS
</code>
</a>
privilege in the output
of
<a class="link" href="show-processlist.html" title="15.7.7.31 SHOW PROCESSLIST Statement">
<code class="literal">
SHOW PROCESSLIST
</code>
</a>
, as shown in
the discussion that follows.
</p>
<a class="indexterm" name="idm46045082213680">
</a>
<a class="indexterm" name="idm46045082212192">
</a>
<p>
The global
<a class="link" href="server-system-variables.html#sysvar_event_scheduler">
<code class="literal">
event_scheduler
</code>
</a>
system
variable determines whether the Event Scheduler is enabled and
running on the server. It has one of the following values, which
affect event scheduling as described:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<code class="literal">
ON
</code>
: The Event Scheduler is started; the
event scheduler thread runs and executes all scheduled events.
<code class="literal">
ON
</code>
is the default
<a class="link" href="server-system-variables.html#sysvar_event_scheduler">
<code class="literal">
event_scheduler
</code>
</a>
value.
</p>
<a class="indexterm" name="idm46045082205248">
</a>
<p>
When the Event Scheduler is
<code class="literal">
ON
</code>
, the event
scheduler thread is listed in the output of
<a class="link" href="show-processlist.html" title="15.7.7.31 SHOW PROCESSLIST Statement">
<code class="literal">
SHOW PROCESSLIST
</code>
</a>
as a daemon
process, and its state is represented as shown here:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa86229700"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SHOW</span> <span class="token keyword">PROCESSLIST</span>\G
<span class="token output"><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 1. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
Id<span class="token punctuation">:</span> 1
User<span class="token punctuation">:</span> root
Host<span class="token punctuation">:</span> localhost
db<span class="token punctuation">:</span> NULL
Command<span class="token punctuation">:</span> Query
Time<span class="token punctuation">:</span> 0
State<span class="token punctuation">:</span> NULL
Info<span class="token punctuation">:</span> show processlist
<span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 2. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
Id<span class="token punctuation">:</span> 2
User<span class="token punctuation">:</span> event_scheduler
Host<span class="token punctuation">:</span> localhost
db<span class="token punctuation">:</span> NULL
Command<span class="token punctuation">:</span> Daemon
Time<span class="token punctuation">:</span> 3
State<span class="token punctuation">:</span> Waiting for next activation
Info<span class="token punctuation">:</span> NULL
</span><span class="token output">2 rows in set (0.00 sec)</span></code></pre>
</div>
<p>
Event scheduling can be stopped by setting the value of
<a class="link" href="server-system-variables.html#sysvar_event_scheduler">
<code class="literal">
event_scheduler
</code>
</a>
to
<code class="literal">
OFF
</code>
.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
OFF
</code>
: The Event Scheduler is stopped. The
event scheduler thread does not run, is not shown in the
output of
<a class="link" href="show-processlist.html" title="15.7.7.31 SHOW PROCESSLIST Statement">
<code class="literal">
SHOW PROCESSLIST
</code>
</a>
, and
no scheduled events execute.
</p>
<p>
When the Event Scheduler is stopped
(
<a class="link" href="server-system-variables.html#sysvar_event_scheduler">
<code class="literal">
event_scheduler
</code>
</a>
is
<code class="literal">
OFF
</code>
), it can be started by setting the
value of
<a class="link" href="server-system-variables.html#sysvar_event_scheduler">
<code class="literal">
event_scheduler
</code>
</a>
to
<code class="literal">
ON
</code>
. (See next item.)
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
DISABLED
</code>
: This value renders the Event
Scheduler nonoperational. When the Event Scheduler is
<code class="literal">
DISABLED
</code>
, the event scheduler thread does
not run (and so does not appear in the output of
<a class="link" href="show-processlist.html" title="15.7.7.31 SHOW PROCESSLIST Statement">
<code class="literal">
SHOW PROCESSLIST
</code>
</a>
). In addition,
the Event Scheduler state cannot be changed at runtime.
</p>
</li>
</ul>
</div>
<p>
If the Event Scheduler status has not been set to
<code class="literal">
DISABLED
</code>
,
<a class="link" href="server-system-variables.html#sysvar_event_scheduler">
<code class="literal">
event_scheduler
</code>
</a>
can be toggled
between
<code class="literal">
ON
</code>
and
<code class="literal">
OFF
</code>
(using
<a class="link" href="set-variable.html" title="15.7.6.1 SET Syntax for Variable Assignment">
<code class="literal">
SET
</code>
</a>
). It
is also possible to use
<code class="literal">
0
</code>
for
<code class="literal">
OFF
</code>
, and
<code class="literal">
1
</code>
for
<code class="literal">
ON
</code>
when setting this variable. Thus, any of the
following 4 statements can be used in the
<a class="link" href="mysql.html" title="6.5.1 mysql — The MySQL Command-Line Client">
<span class="command">
<strong>
mysql
</strong>
</span>
</a>
client to turn on the Event Scheduler:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa52249910"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SET</span> <span class="token keyword">GLOBAL</span> event_scheduler <span class="token operator">=</span> <span class="token keyword">ON</span><span class="token punctuation">;</span>
<span class="token keyword">SET</span> <span class="token variable">@@GLOBAL.event_scheduler</span> <span class="token operator">=</span> <span class="token keyword">ON</span><span class="token punctuation">;</span>
<span class="token keyword">SET</span> <span class="token keyword">GLOBAL</span> event_scheduler <span class="token operator">=</span> <span class="token number">1</span><span class="token punctuation">;</span>
<span class="token keyword">SET</span> <span class="token variable">@@GLOBAL.event_scheduler</span> <span class="token operator">=</span> <span class="token number">1</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
Similarly, any of these 4 statements can be used to turn off the
Event Scheduler:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa79893811"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SET</span> <span class="token keyword">GLOBAL</span> event_scheduler <span class="token operator">=</span> <span class="token keyword">OFF</span><span class="token punctuation">;</span>
<span class="token keyword">SET</span> <span class="token variable">@@GLOBAL.event_scheduler</span> <span class="token operator">=</span> <span class="token keyword">OFF</span><span class="token punctuation">;</span>
<span class="token keyword">SET</span> <span class="token keyword">GLOBAL</span> event_scheduler <span class="token operator">=</span> <span class="token number">0</span><span class="token punctuation">;</span>
<span class="token keyword">SET</span> <span class="token variable">@@GLOBAL.event_scheduler</span> <span class="token operator">=</span> <span class="token number">0</span><span class="token punctuation">;</span></code></pre>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
If the Event Scheduler is enabled, enabling the
<a class="link" href="server-system-variables.html#sysvar_super_read_only">
<code class="literal">
super_read_only
</code>
</a>
system variable
prevents it from updating event
<span class="quote">
“
<span class="quote">
last executed
</span>
”
</span>
timestamps in the
<code class="literal">
events
</code>
data dictionary
table. This causes the Event Scheduler to stop the next time it
tries to execute a scheduled event, after writing a message to
the server error log. (In this situation the
<a class="link" href="server-system-variables.html#sysvar_event_scheduler">
<code class="literal">
event_scheduler
</code>
</a>
system variable
does not change from
<code class="literal">
ON
</code>
to
<code class="literal">
OFF
</code>
. An implication is that this variable
rejects the DBA
<span class="emphasis">
<em>
intent
</em>
</span>
that the Event
Scheduler be enabled or disabled, where its actual status of
started or stopped may be distinct.). If
<a class="link" href="server-system-variables.html#sysvar_super_read_only">
<code class="literal">
super_read_only
</code>
</a>
is subsequently
disabled after being enabled, the server automatically restarts
the Event Scheduler as needed.
</p>
</div>
<p>
Although
<code class="literal">
ON
</code>
and
<code class="literal">
OFF
</code>
have
numeric equivalents, the value displayed for
<a class="link" href="server-system-variables.html#sysvar_event_scheduler">
<code class="literal">
event_scheduler
</code>
</a>
by
<a class="link" href="select.html" title="15.2.13 SELECT Statement">
<code class="literal">
SELECT
</code>
</a>
or
<a class="link" href="show-variables.html" title="15.7.7.41 SHOW VARIABLES Statement">
<code class="literal">
SHOW
VARIABLES
</code>
</a>
is always one of
<code class="literal">
OFF
</code>
,
<code class="literal">
ON
</code>
, or
<code class="literal">
DISABLED
</code>
.
<span class="emphasis">
<em>
<code class="literal">
DISABLED
</code>
has no numeric
equivalent
</em>
</span>
. For this reason,
<code class="literal">
ON
</code>
and
<code class="literal">
OFF
</code>
are usually preferred over
<code class="literal">
1
</code>
and
<code class="literal">
0
</code>
when setting this
variable.
</p>
<p>
Note that attempting to set
<a class="link" href="server-system-variables.html#sysvar_event_scheduler">
<code class="literal">
event_scheduler
</code>
</a>
without
specifying it as a global variable causes an error:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa53353295"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql">mysql<span class="token operator"><</span> <span class="token keyword">SET</span> <span class="token variable">@@event_scheduler</span> <span class="token operator">=</span> <span class="token keyword">OFF</span><span class="token punctuation">;</span>
<span class="token output">ERROR 1229 (HY000)<span class="token punctuation">:</span> Variable 'event_scheduler' is a GLOBAL
variable and should be set with SET GLOBAL</span></code></pre>
</div>
<div class="important" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Important
</div>
<p>
It is possible to set the Event Scheduler to
<code class="literal">
DISABLED
</code>
only at server startup. If
<a class="link" href="server-system-variables.html#sysvar_event_scheduler">
<code class="literal">
event_scheduler
</code>
</a>
is
<code class="literal">
ON
</code>
or
<code class="literal">
OFF
</code>
, you cannot set
it to
<code class="literal">
DISABLED
</code>
at runtime. Also, if the Event
Scheduler is set to
<code class="literal">
DISABLED
</code>
at startup, you
cannot change the value of
<a class="link" href="server-system-variables.html#sysvar_event_scheduler">
<code class="literal">
event_scheduler
</code>
</a>
at runtime.
</p>
</div>
<p>
To disable the event scheduler, use one of the following two
methods:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
As a command-line option when starting the server:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa3777615"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal"><span class="token constant">--event-scheduler</span><span class="token attr-value"><span class="token punctuation">=</span>DISABLED</span></code></pre>
</div>
</li>
<li class="listitem">
<p>
In the server configuration file (
<code class="filename">
my.cnf
</code>
,
or
<code class="filename">
my.ini
</code>
on Windows systems), include
the line where it can be read by the server (for example, in a
<code class="literal">
[mysqld]
</code>
section):
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-ini"><div class="docs-select-all right" id="sa85687332"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-ini"><span class="token constant">event_scheduler</span><span class="token attr-value"><span class="token punctuation">=</span>DISABLED</span></code></pre>
</div>
</li>
</ul>
</div>
<p>
To enable the Event Scheduler, restart the server without the
<a class="link" href="server-system-variables.html#sysvar_event_scheduler">
<code class="option">
--event-scheduler=DISABLED
</code>
</a>
command-line option, or after removing or commenting out the line
containing
<a class="link" href="server-system-variables.html#sysvar_event_scheduler">
<code class="option">
event-scheduler=DISABLED
</code>
</a>
in the server configuration file, as appropriate. Alternatively,
you can use
<code class="literal">
ON
</code>
(or
<code class="literal">
1
</code>
) or
<code class="literal">
OFF
</code>
(or
<code class="literal">
0
</code>
) in place of the
<code class="literal">
DISABLED
</code>
value when starting the server.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
You can issue event-manipulation statements when
<a class="link" href="server-system-variables.html#sysvar_event_scheduler">
<code class="literal">
event_scheduler
</code>
</a>
is set to
<code class="literal">
DISABLED
</code>
. No warnings or errors are generated
in such cases (provided that the statements are themselves
valid). However, scheduled events cannot execute until this
variable is set to
<code class="literal">
ON
</code>
(or
<code class="literal">
1
</code>
). Once this has been done, the event
scheduler thread executes all events whose scheduling conditions
are satisfied.
</p>
</div>
<p>
Starting the MySQL server with the
<a class="link" href="server-options.html#option_mysqld_skip-grant-tables">
<code class="option">
--skip-grant-tables
</code>
</a>
option causes
<a class="link" href="server-system-variables.html#sysvar_event_scheduler">
<code class="literal">
event_scheduler
</code>
</a>
to be set to
<code class="literal">
DISABLED
</code>
, overriding any other value set either
on the command line or in the
<code class="filename">
my.cnf
</code>
or
<code class="filename">
my.ini
</code>
file (Bug #26807).
</p>
<p>
For SQL statements used to create, alter, and drop events, see
<a class="xref" href="events-syntax.html" title="27.4.3 Event Syntax">
Section 27.4.3, “Event Syntax”
</a>
.
</p>
<p>
MySQL provides an
<a class="link" href="information-schema-events-table.html" title="28.3.14 The INFORMATION_SCHEMA EVENTS Table">
<code class="literal">
EVENTS
</code>
</a>
table in the
<code class="literal">
INFORMATION_SCHEMA
</code>
database. This table can be
queried to obtain information about scheduled events which have
been defined on the server. See
<a class="xref" href="events-metadata.html" title="27.4.4 Event Metadata">
Section 27.4.4, “Event Metadata”
</a>
,
and
<a class="xref" href="information-schema-events-table.html" title="28.3.14 The INFORMATION_SCHEMA EVENTS Table">
Section 28.3.14, “The INFORMATION_SCHEMA EVENTS Table”
</a>
, for more
information.
</p>
<p>
For information regarding event scheduling and the MySQL privilege
system, see
<a class="xref" href="events-privileges.html" title="27.4.6 The Event Scheduler and MySQL Privileges">
Section 27.4.6, “The Event Scheduler and MySQL Privileges”
</a>
.
</p>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/call.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a name="call">
</a>
15.2.1 CALL Statement
</h3>
</div>
</div>
</div>
<a class="indexterm" name="idm46045183065056">
</a>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa96773000"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">CALL</span> <em class="replaceable">sp_name</em><span class="token punctuation">(</span><span class="token punctuation">[</span><em class="replaceable">parameter</em><span class="token punctuation">[</span><span class="token punctuation">,</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">]</span><span class="token punctuation">]</span><span class="token punctuation">)</span>
<span class="token keyword">CALL</span> <em class="replaceable">sp_name</em><span class="token punctuation">[</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">]</span></code></pre>
</div>
<p>
The
<a class="link" href="call.html" title="15.2.1 CALL Statement">
<code class="literal">
CALL
</code>
</a>
statement invokes a stored
procedure that was defined previously with
<a class="link" href="create-procedure.html" title="15.1.17 CREATE PROCEDURE and CREATE FUNCTION Statements">
<code class="literal">
CREATE PROCEDURE
</code>
</a>
.
</p>
<p>
Stored procedures that take no arguments can be invoked without
parentheses. That is,
<code class="literal">
CALL p()
</code>
and
<code class="literal">
CALL p
</code>
are equivalent.
</p>
<p>
<a class="link" href="call.html" title="15.2.1 CALL Statement">
<code class="literal">
CALL
</code>
</a>
can pass back values to its
caller using parameters that are declared as
<code class="literal">
OUT
</code>
or
<code class="literal">
INOUT
</code>
parameters.
When the procedure returns, a client program can also obtain the
number of rows affected for the final statement executed within
the routine: At the SQL level, call the
<a class="link" href="information-functions.html#function_row-count">
<code class="literal">
ROW_COUNT()
</code>
</a>
function; from the C
API, call the
<a class="ulink" href="/doc/c-api/8.4/en/mysql-affected-rows.html" target="_top">
<code class="literal">
mysql_affected_rows()
</code>
</a>
function.
</p>
<p>
For information about the effect of unhandled conditions on
procedure parameters, see
<a class="xref" href="conditions-and-parameters.html" title="15.6.7.8 Condition Handling and OUT or INOUT Parameters">
Section 15.6.7.8, “Condition Handling and OUT or INOUT Parameters”
</a>
.
</p>
<p>
To get back a value from a procedure using an
<code class="literal">
OUT
</code>
or
<code class="literal">
INOUT
</code>
parameter, pass
the parameter by means of a user variable, and then check the
value of the variable after the procedure returns. (If you are
calling the procedure from within another stored procedure or
function, you can also pass a routine parameter or local routine
variable as an
<code class="literal">
IN
</code>
or
<code class="literal">
INOUT
</code>
parameter.) For an
<code class="literal">
INOUT
</code>
parameter, initialize
its value before passing it to the procedure. The following
procedure has an
<code class="literal">
OUT
</code>
parameter that the
procedure sets to the current server version, and an
<code class="literal">
INOUT
</code>
value that the procedure increments by
one from its current value:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa24794474"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">DELIMITER</span> <span class="token comment" spellcheck="true">//</span>
<span class="token keyword">CREATE</span> <span class="token keyword">PROCEDURE</span> p <span class="token punctuation">(</span><span class="token keyword">OUT</span> ver_param <span class="token datatype">VARCHAR</span><span class="token punctuation">(</span><span class="token number">25</span><span class="token punctuation">)</span><span class="token punctuation">,</span> <span class="token keyword">INOUT</span> incr_param <span class="token datatype">INT</span><span class="token punctuation">)</span>
<span class="token keyword">BEGIN</span>
<span class="token comment" spellcheck="true"># Set value of OUT parameter</span>
<span class="token keyword">SELECT</span> <span class="token function">VERSION</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token keyword">INTO</span> ver_param<span class="token punctuation">;</span>
<span class="token comment" spellcheck="true"># Increment value of INOUT parameter</span>
<span class="token keyword">SET</span> incr_param <span class="token operator">=</span> incr_param <span class="token operator">+</span> <span class="token number">1</span><span class="token punctuation">;</span>
<span class="token keyword">END</span> <span class="token comment" spellcheck="true">//</span>
<span class="token keyword">DELIMITER</span> <span class="token punctuation">;</span></code></pre>
</div>
<p>
Before calling the procedure, initialize the variable to be passed
as the
<code class="literal">
INOUT
</code>
parameter. After calling the
procedure, you can see that the values of the two variables are
set or modified:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa10057317"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SET</span> <span class="token variable">@increment</span> <span class="token operator">=</span> <span class="token number">10</span><span class="token punctuation">;</span>
<span class="token prompt">mysql></span> <span class="token keyword">CALL</span> p<span class="token punctuation">(</span><span class="token variable">@version</span><span class="token punctuation">,</span> <span class="token variable">@increment</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> <span class="token variable">@version</span><span class="token punctuation">,</span> <span class="token variable">@increment</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> @version <span class="token punctuation">|</span> @increment <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> 8.4.3 <span class="token punctuation">|</span> 11 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
<p>
In prepared
<a class="link" href="call.html" title="15.2.1 CALL Statement">
<code class="literal">
CALL
</code>
</a>
statements used
with
<a class="link" href="prepare.html" title="15.5.1 PREPARE Statement">
<code class="literal">
PREPARE
</code>
</a>
and
<a class="link" href="execute.html" title="15.5.2 EXECUTE Statement">
<code class="literal">
EXECUTE
</code>
</a>
, placeholders can be used
for
<code class="literal">
IN
</code>
parameters,
<code class="literal">
OUT
</code>
, and
<code class="literal">
INOUT
</code>
parameters. These types of parameters can
be used as follows:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa31879145"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SET</span> <span class="token variable">@increment</span> <span class="token operator">=</span> <span class="token number">10</span><span class="token punctuation">;</span>
<span class="token prompt">mysql></span> <span class="token keyword">PREPARE</span> s <span class="token keyword">FROM</span> <span class="token string">'CALL p(?, ?)'</span><span class="token punctuation">;</span>
<span class="token prompt">mysql></span> <span class="token keyword">EXECUTE</span> s <span class="token keyword">USING</span> <span class="token variable">@version</span><span class="token punctuation">,</span> <span class="token variable">@increment</span><span class="token punctuation">;</span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> <span class="token variable">@version</span><span class="token punctuation">,</span> <span class="token variable">@increment</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> @version <span class="token punctuation">|</span> @increment <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> 8.4.3 <span class="token punctuation">|</span> 11 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
<p>
To write C programs that use the
<a class="link" href="call.html" title="15.2.1 CALL Statement">
<code class="literal">
CALL
</code>
</a>
SQL statement to execute
stored procedures that produce result sets, the
<code class="literal">
CLIENT_MULTI_RESULTS
</code>
flag must be enabled. This
is because each
<a class="link" href="call.html" title="15.2.1 CALL Statement">
<code class="literal">
CALL
</code>
</a>
returns a
result to indicate the call status, in addition to any result sets
that might be returned by statements executed within the
procedure.
<code class="literal">
CLIENT_MULTI_RESULTS
</code>
must also be
enabled if
<a class="link" href="call.html" title="15.2.1 CALL Statement">
<code class="literal">
CALL
</code>
</a>
is used to execute
any stored procedure that contains prepared statements. It cannot
be determined when such a procedure is loaded whether those
statements produce result sets, so it is necessary to assume that
they do so.
</p>
<p>
<code class="literal">
CLIENT_MULTI_RESULTS
</code>
can be enabled when you
call
<a class="ulink" href="/doc/c-api/8.4/en/mysql-real-connect.html" target="_top">
<code class="literal">
mysql_real_connect()
</code>
</a>
, either
explicitly by passing the
<code class="literal">
CLIENT_MULTI_RESULTS
</code>
flag itself, or implicitly by passing
<code class="literal">
CLIENT_MULTI_STATEMENTS
</code>
(which also enables
<code class="literal">
CLIENT_MULTI_RESULTS
</code>
).
<code class="literal">
CLIENT_MULTI_RESULTS
</code>
is enabled by default.
</p>
<p>
To process the result of a
<a class="link" href="call.html" title="15.2.1 CALL Statement">
<code class="literal">
CALL
</code>
</a>
statement executed using
<a class="ulink" href="/doc/c-api/8.4/en/mysql-query.html" target="_top">
<code class="literal">
mysql_query()
</code>
</a>
or
<a class="ulink" href="/doc/c-api/8.4/en/mysql-real-query.html" target="_top">
<code class="literal">
mysql_real_query()
</code>
</a>
, use a loop
that calls
<a class="ulink" href="/doc/c-api/8.4/en/mysql-next-result.html" target="_top">
<code class="literal">
mysql_next_result()
</code>
</a>
to
determine whether there are more results. For an example, see
<a class="ulink" href="/doc/c-api/8.4/en/c-api-multiple-queries.html" target="_top">
Multiple Statement Execution Support
</a>
.
</p>
<p>
C programs can use the prepared-statement interface to execute
<a class="link" href="call.html" title="15.2.1 CALL Statement">
<code class="literal">
CALL
</code>
</a>
statements and access
<code class="literal">
OUT
</code>
and
<code class="literal">
INOUT
</code>
parameters.
This is done by processing the result of a
<a class="link" href="call.html" title="15.2.1 CALL Statement">
<code class="literal">
CALL
</code>
</a>
statement using a loop that
calls
<a class="ulink" href="/doc/c-api/8.4/en/mysql-stmt-next-result.html" target="_top">
<code class="literal">
mysql_stmt_next_result()
</code>
</a>
to
determine whether there are more results. For an example, see
<a class="ulink" href="/doc/c-api/8.4/en/c-api-prepared-call-statements.html" target="_top">
Prepared CALL Statement Support
</a>
. Languages that
provide a MySQL interface can use prepared
<a class="link" href="call.html" title="15.2.1 CALL Statement">
<code class="literal">
CALL
</code>
</a>
statements to directly
retrieve
<code class="literal">
OUT
</code>
and
<code class="literal">
INOUT
</code>
procedure parameters.
</p>
<p>
Metadata changes to objects referred to by stored programs are
detected and cause automatic reparsing of the affected statements
when the program is next executed. For more information, see
<a class="xref" href="statement-caching.html" title="10.10.3 Caching of Prepared Statements and Stored Programs">
Section 10.10.3, “Caching of Prepared Statements and Stored Programs”
</a>
.
</p>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/fulltext-search.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title">
<a name="fulltext-search">
</a>
14.9 Full-Text Search Functions
</h2>
</div>
</div>
</div>
<div class="toc">
<dl class="toc">
<dt>
<span class="section">
<a href="fulltext-natural-language.html">
14.9.1 Natural Language Full-Text Searches
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="fulltext-boolean.html">
14.9.2 Boolean Full-Text Searches
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="fulltext-query-expansion.html">
14.9.3 Full-Text Searches with Query Expansion
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="fulltext-stopwords.html">
14.9.4 Full-Text Stopwords
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="fulltext-restrictions.html">
14.9.5 Full-Text Restrictions
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="fulltext-fine-tuning.html">
14.9.6 Fine-Tuning MySQL Full-Text Search
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="full-text-adding-collation.html">
14.9.7 Adding a User-Defined Collation for Full-Text Indexing
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="fulltext-search-ngram.html">
14.9.8 ngram Full-Text Parser
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="fulltext-search-mecab.html">
14.9.9 MeCab Full-Text Parser Plugin
</a>
</span>
</dt>
</dl>
</div>
<a class="indexterm" name="idm46045202030656">
</a>
<a class="indexterm" name="idm46045202029168">
</a>
<a class="indexterm" name="idm46045202028096">
</a>
<a class="indexterm" name="idm46045202027024">
</a>
<p>
<a name="function_match">
</a>
<a class="link" href="fulltext-search.html#function_match">
<code class="literal">
MATCH
(
<em class="replaceable">
<code>
col1
</code>
</em>
,
<em class="replaceable">
<code>
col2
</code>
</em>
,...)
AGAINST (
<em class="replaceable">
<code>
expr
</code>
</em>
[
<em class="replaceable">
<code>
search_modifier
</code>
</em>
])
</code>
</a>
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa21360294"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><em class="replaceable">search_modifier:</em>
{
<span class="token keyword">IN</span> <span class="token keyword">NATURAL</span> <span class="token keyword">LANGUAGE</span> <span class="token keyword">MODE</span>
<span class="token operator">|</span> <span class="token keyword">IN</span> <span class="token keyword">NATURAL</span> <span class="token keyword">LANGUAGE</span> <span class="token keyword">MODE</span> <span class="token keyword">WITH</span> <span class="token keyword">QUERY</span> <span class="token keyword">EXPANSION</span>
<span class="token operator">|</span> <span class="token keyword">IN</span> <span class="token datatype">BOOLEAN</span> <span class="token keyword">MODE</span>
<span class="token operator">|</span> <span class="token keyword">WITH</span> <span class="token keyword">QUERY</span> <span class="token keyword">EXPANSION</span>
}</code></pre>
</div>
<p>
MySQL has support for full-text indexing and searching:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
A full-text index in MySQL is an index of type
<code class="literal">
FULLTEXT
</code>
.
</p>
</li>
<li class="listitem">
<p>
Full-text indexes can be used only with
<a class="link" href="innodb-storage-engine.html" title="Chapter 17 The InnoDB Storage Engine">
<code class="literal">
InnoDB
</code>
</a>
or
<a class="link" href="myisam-storage-engine.html" title="18.2 The MyISAM Storage Engine">
<code class="literal">
MyISAM
</code>
</a>
tables, and can be created
only for
<a class="link" href="char.html" title="13.3.2 The CHAR and VARCHAR Types">
<code class="literal">
CHAR
</code>
</a>
,
<a class="link" href="char.html" title="13.3.2 The CHAR and VARCHAR Types">
<code class="literal">
VARCHAR
</code>
</a>
, or
<a class="link" href="blob.html" title="13.3.4 The BLOB and TEXT Types">
<code class="literal">
TEXT
</code>
</a>
columns.
</p>
</li>
<li class="listitem">
<p>
MySQL provides a built-in full-text ngram parser that supports
Chinese, Japanese, and Korean (CJK), and an installable MeCab
full-text parser plugin for Japanese. Parsing differences are
outlined in
<a class="xref" href="fulltext-search-ngram.html" title="14.9.8 ngram Full-Text Parser">
Section 14.9.8, “ngram Full-Text Parser”
</a>
, and
<a class="xref" href="fulltext-search-mecab.html" title="14.9.9 MeCab Full-Text Parser Plugin">
Section 14.9.9, “MeCab Full-Text Parser Plugin”
</a>
.
</p>
</li>
<li class="listitem">
<p>
A
<code class="literal">
FULLTEXT
</code>
index definition can be given in
the
<a class="link" href="create-table.html" title="15.1.20 CREATE TABLE Statement">
<code class="literal">
CREATE TABLE
</code>
</a>
statement when
a table is created, or added later using
<a class="link" href="alter-table.html" title="15.1.9 ALTER TABLE Statement">
<code class="literal">
ALTER TABLE
</code>
</a>
or
<a class="link" href="create-index.html" title="15.1.15 CREATE INDEX Statement">
<code class="literal">
CREATE INDEX
</code>
</a>
.
</p>
</li>
<li class="listitem">
<p>
For large data sets, it is much faster to load your data into
a table that has no
<code class="literal">
FULLTEXT
</code>
index and then
create the index after that, than to load data into a table
that has an existing
<code class="literal">
FULLTEXT
</code>
index.
</p>
</li>
</ul>
</div>
<p>
Full-text searching is performed using
<a class="link" href="fulltext-search.html#function_match">
<code class="literal">
MATCH() AGAINST()
</code>
</a>
syntax.
<a class="link" href="fulltext-search.html#function_match">
<code class="literal">
MATCH()
</code>
</a>
takes a comma-separated
list that names the columns to be searched.
<code class="literal">
AGAINST
</code>
takes a string to search for, and an
optional modifier that indicates what type of search to perform.
The search string must be a string value that is constant during
query evaluation. This rules out, for example, a table column
because that can differ for each row.
</p>
<p>
MySQL does not permit the use of a rollup column with
<code class="literal">
MATCH()
</code>
; more specifically, any query matching
all of the criteria listed here is rejected with
<a class="ulink" href="/doc/mysql-errors/8.4/en/server-error-reference.html#error_er_fulltext_with_rollup" target="_top">
<code class="literal">
ER_FULLTEXT_WITH_ROLLUP
</code>
</a>
:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<code class="literal">
MATCH()
</code>
appears in the
<code class="literal">
SELECT
</code>
list,
<code class="literal">
GROUP BY
</code>
clause,
<code class="literal">
HAVING
</code>
clause, or
<code class="literal">
ORDER
BY
</code>
clause of a query block.
</p>
</li>
<li class="listitem">
<p>
The query block contains a
<code class="literal">
GROUP BY ... WITH
ROLLUP
</code>
clause.
</p>
</li>
<li class="listitem">
<p>
The argument of the call to the
<code class="literal">
MATCH()
</code>
function is one of the grouping columns.
</p>
</li>
</ul>
</div>
<p>
Some examples of such queries are shown here:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa73611191"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token comment" spellcheck="true"># MATCH() in SELECT list...</span>
<span class="token keyword">SELECT</span> <span class="token operator">MATCH</span> <span class="token punctuation">(</span>a<span class="token punctuation">)</span> <span class="token keyword">AGAINST</span> <span class="token punctuation">(</span><span class="token string">'abc'</span><span class="token punctuation">)</span> <span class="token keyword">FROM</span> t <span class="token keyword">GROUP</span> <span class="token keyword">BY</span> a <span class="token keyword">WITH</span> <span class="token keyword">ROLLUP</span><span class="token punctuation">;</span>
<span class="token keyword">SELECT</span> <span class="token number">1</span> <span class="token keyword">FROM</span> t <span class="token keyword">GROUP</span> <span class="token keyword">BY</span> a<span class="token punctuation">,</span> <span class="token operator">MATCH</span> <span class="token punctuation">(</span>a<span class="token punctuation">)</span> <span class="token keyword">AGAINST</span> <span class="token punctuation">(</span><span class="token string">'abc'</span><span class="token punctuation">)</span> <span class="token keyword">WITH</span> <span class="token keyword">ROLLUP</span><span class="token punctuation">;</span>
<span class="token comment" spellcheck="true"># ...in HAVING clause...</span>
<span class="token keyword">SELECT</span> <span class="token number">1</span> <span class="token keyword">FROM</span> t <span class="token keyword">GROUP</span> <span class="token keyword">BY</span> a <span class="token keyword">WITH</span> <span class="token keyword">ROLLUP</span> <span class="token keyword">HAVING</span> <span class="token operator">MATCH</span> <span class="token punctuation">(</span>a<span class="token punctuation">)</span> <span class="token keyword">AGAINST</span> <span class="token punctuation">(</span><span class="token string">'abc'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token comment" spellcheck="true"># ...and in ORDER BY clause</span>
<span class="token keyword">SELECT</span> <span class="token number">1</span> <span class="token keyword">FROM</span> t <span class="token keyword">GROUP</span> <span class="token keyword">BY</span> a <span class="token keyword">WITH</span> <span class="token keyword">ROLLUP</span> <span class="token keyword">ORDER</span> <span class="token keyword">BY</span> <span class="token operator">MATCH</span> <span class="token punctuation">(</span>a<span class="token punctuation">)</span> <span class="token keyword">AGAINST</span> <span class="token punctuation">(</span><span class="token string">'abc'</span><span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
The use of
<code class="literal">
MATCH()
</code>
with a rollup column in the
<code class="literal">
WHERE
</code>
clause is permitted.
</p>
<p>
There are three types of full-text searches:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
A natural language search interprets the search string as a
phrase in natural human language (a phrase in free text).
There are no special operators, with the exception of double
quote (") characters. The stopword list applies. For more
information about stopword lists, see
<a class="xref" href="fulltext-stopwords.html" title="14.9.4 Full-Text Stopwords">
Section 14.9.4, “Full-Text Stopwords”
</a>
.
</p>
<p>
Full-text searches are natural language searches if the
<code class="literal">
IN NATURAL LANGUAGE MODE
</code>
modifier is given
or if no modifier is given. For more information, see
<a class="xref" href="fulltext-natural-language.html" title="14.9.1 Natural Language Full-Text Searches">
Section 14.9.1, “Natural Language Full-Text Searches”
</a>
.
</p>
</li>
<li class="listitem">
<p>
A boolean search interprets the search string using the rules
of a special query language. The string contains the words to
search for. It can also contain operators that specify
requirements such that a word must be present or absent in
matching rows, or that it should be weighted higher or lower
than usual. Certain common words (stopwords) are omitted from
the search index and do not match if present in the search
string. The
<code class="literal">
IN BOOLEAN MODE
</code>
modifier
specifies a boolean search. For more information, see
<a class="xref" href="fulltext-boolean.html" title="14.9.2 Boolean Full-Text Searches">
Section 14.9.2, “Boolean Full-Text Searches”
</a>
.
</p>
</li>
<li class="listitem">
<p>
A query expansion search is a modification of a natural
language search. The search string is used to perform a
natural language search. Then words from the most relevant
rows returned by the search are added to the search string and
the search is done again. The query returns the rows from the
second search. The
<code class="literal">
IN NATURAL LANGUAGE MODE WITH
QUERY EXPANSION
</code>
or
<code class="literal">
WITH QUERY
EXPANSION
</code>
modifier specifies a query expansion
search. For more information, see
<a class="xref" href="fulltext-query-expansion.html" title="14.9.3 Full-Text Searches with Query Expansion">
Section 14.9.3, “Full-Text Searches with Query Expansion”
</a>
.
</p>
</li>
</ul>
</div>
<p>
For information about
<code class="literal">
FULLTEXT
</code>
query
performance, see
<a class="xref" href="column-indexes.html" title="10.3.5 Column Indexes">
Section 10.3.5, “Column Indexes”
</a>
.
</p>
<p>
For more information about
<code class="literal">
InnoDB
</code>
<code class="literal">
FULLTEXT
</code>
indexes, see
<a class="xref" href="innodb-fulltext-index.html" title="17.6.2.4 InnoDB Full-Text Indexes">
Section 17.6.2.4, “InnoDB Full-Text Indexes”
</a>
.
</p>
<p>
Constraints on full-text searching are listed in
<a class="xref" href="fulltext-restrictions.html" title="14.9.5 Full-Text Restrictions">
Section 14.9.5, “Full-Text Restrictions”
</a>
.
</p>
<p>
The
<a class="link" href="myisam-ftdump.html" title="6.6.3 myisam_ftdump — Display Full-Text Index information">
<span class="command">
<strong>
myisam_ftdump
</strong>
</span>
</a>
utility dumps the contents of
a
<code class="literal">
MyISAM
</code>
full-text index. This may be helpful
for debugging full-text queries. See
<a class="xref" href="myisam-ftdump.html" title="6.6.3 myisam_ftdump — Display Full-Text Index information">
Section 6.6.3, “myisam_ftdump — Display Full-Text Index information”
</a>
.
</p>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/group-replication-compatibility-communication.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title">
<a name="group-replication-compatibility-communication">
</a>
20.8.1.2 Group Replication Communication Protocol Version
</h4>
</div>
</div>
</div>
<p>
A replication group uses a Group Replication communication
protocol version that differs from the MySQL Server version of
the members. To check the group's communication protocol
version, issue the following statement on any member:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa32112597"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SELECT</span> <span class="token variable">@@version</span><span class="token punctuation">,</span> group_replication_get_communication_protocol<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> @@version <span class="token punctuation">|</span> group_replication_get_communication_protocol() <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> 8.4.0 <span class="token punctuation">|</span> 8.0.27 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
<p>
As demonstrated, the MySQL 8.4 LTS series uses the
<code class="literal">
8.0.27
</code>
communication protocol.
</p>
<p>
For more information, see
<a class="xref" href="group-replication-communication-protocol.html" title="20.5.1.4 Setting a Group's Communication Protocol Version">
Section 20.5.1.4, “Setting a Group's Communication Protocol Version”
</a>
.
</p>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/programs-installation.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title">
<a name="programs-installation">
</a>
6.4 Installation-Related Programs
</h2>
</div>
</div>
</div>
<div class="toc">
<dl class="toc">
<dt>
<span class="section">
<a href="comp-err.html">
6.4.1 comp_err — Compile MySQL Error Message File
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-secure-installation.html">
6.4.2 mysql_secure_installation — Improve MySQL Installation Security
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysql-tzinfo-to-sql.html">
6.4.3 mysql_tzinfo_to_sql — Load the Time Zone Tables
</a>
</span>
</dt>
</dl>
</div>
<p>
The programs in this section are used when installing or upgrading
MySQL.
</p>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/data-masking-plugin-usage.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title">
<a name="data-masking-plugin-usage">
</a>
8.5.3.2 Using the MySQL Enterprise Data Masking and De-Identification Plugin
</h4>
</div>
</div>
</div>
<p>
Before using MySQL Enterprise Data Masking and De-Identification, install it according to the instructions
provided at
<a class="xref" href="data-masking-plugin-installation.html" title="8.5.3.1 MySQL Enterprise Data Masking and De-Identification Plugin Installation">
Section 8.5.3.1, “MySQL Enterprise Data Masking and De-Identification Plugin Installation”
</a>
.
</p>
<p>
To use MySQL Enterprise Data Masking and De-Identification in applications, invoke the functions that are
appropriate for the operations you wish to perform. For detailed
function descriptions, see
<a class="xref" href="data-masking-plugin-functions.html" title="8.5.3.4 MySQL Enterprise Data Masking and De-Identification Plugin Function Descriptions">
Section 8.5.3.4, “MySQL Enterprise Data Masking and De-Identification Plugin Function Descriptions”
</a>
. This section
demonstrates how to use the functions to carry out some
representative tasks. It first presents an overview of the
available functions, followed by some examples of how the
functions might be used in real-world context:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<a class="xref" href="data-masking-plugin-usage.html#data-masking-plugin-usage-masking-functions" title="Masking Data to Remove Identifying Characteristics">
Masking Data to Remove Identifying Characteristics
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="xref" href="data-masking-plugin-usage.html#data-masking-plugin-usage-generation-functions" title="Generating Random Data with Specific Characteristics">
Generating Random Data with Specific Characteristics
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="xref" href="data-masking-plugin-usage.html#data-masking-plugin-usage-dictionary-functions" title="Generating Random Data Using Dictionaries">
Generating Random Data Using Dictionaries
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="xref" href="data-masking-plugin-usage.html#data-masking-plugin-usage-customer-identification" title="Using Masked Data for Customer Identification">
Using Masked Data for Customer Identification
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="xref" href="data-masking-plugin-usage.html#data-masking-plugin-usage-views" title="Creating Views that Display Masked Data">
Creating Views that Display Masked Data
</a>
</p>
</li>
</ul>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h5 class="title">
<a name="data-masking-plugin-usage-masking-functions">
</a>
Masking Data to Remove Identifying Characteristics
</h5>
</div>
</div>
</div>
<p>
MySQL provides general-purpose masking functions that mask
arbitrary strings, and special-purpose masking functions that
mask specific types of values.
</p>
<h6>
<a name="idm46045232461312">
</a>
General-Purpose Masking Functions
</h6>
<p>
<a class="link" href="data-masking-plugin-functions.html#function_mask-inner-plugin">
<code class="literal">
mask_inner()
</code>
</a>
and
<a class="link" href="data-masking-plugin-functions.html#function_mask-outer-plugin">
<code class="literal">
mask_outer()
</code>
</a>
are general-purpose functions that mask parts of arbitrary
strings based on position within the string:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<a class="link" href="data-masking-plugin-functions.html#function_mask-inner-plugin">
<code class="literal">
mask_inner()
</code>
</a>
masks the interior of its string argument, leaving the
ends unmasked. Other arguments specify the sizes of the
unmasked ends.
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa58830966"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> mask_inner<span class="token punctuation">(</span><span class="token string">'This is a string'</span><span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> mask_inner('This is a string', 5, 1) <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> This XXXXXXXXXXg <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> mask_inner<span class="token punctuation">(</span><span class="token string">'This is a string'</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> mask_inner('This is a string', 1, 5) <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> TXXXXXXXXXXtring <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
</li>
<li class="listitem">
<p>
<a class="link" href="data-masking-plugin-functions.html#function_mask-outer-plugin">
<code class="literal">
mask_outer()
</code>
</a>
does the reverse, masking the ends of its string argument,
leaving the interior unmasked. Other arguments specify the
sizes of the masked ends.
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa16486945"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> mask_outer<span class="token punctuation">(</span><span class="token string">'This is a string'</span><span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> mask_outer('This is a string', 5, 1) <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> XXXXXis a strinX <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> mask_outer<span class="token punctuation">(</span><span class="token string">'This is a string'</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> mask_outer('This is a string', 1, 5) <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Xhis is a sXXXXX <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
</li>
</ul>
</div>
<p>
By default,
<a class="link" href="data-masking-plugin-functions.html#function_mask-inner-plugin">
<code class="literal">
mask_inner()
</code>
</a>
and
<a class="link" href="data-masking-plugin-functions.html#function_mask-outer-plugin">
<code class="literal">
mask_outer()
</code>
</a>
use
<code class="literal">
'X'
</code>
as the masking character, but
permit an optional masking-character argument:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa22286362"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> mask_inner<span class="token punctuation">(</span><span class="token string">'This is a string'</span><span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token string">'*'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> mask_inner('This is a string', 5, 1, '*') <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> This **********g <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> mask_outer<span class="token punctuation">(</span><span class="token string">'This is a string'</span><span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">,</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token string">'#'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> mask_outer('This is a string', 5, 1, '#') <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> #####is a strin# <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
<h6>
<a name="idm46045232439840">
</a>
Special-Purpose Masking Functions
</h6>
<p>
Other masking functions expect a string argument representing
a specific type of value and mask it to remove identifying
characteristics.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
The examples here supply function arguments using the random
value generation functions that return the appropriate type
of value. For more information about generation functions,
see
<a class="xref" href="data-masking-plugin-usage.html#data-masking-plugin-usage-generation-functions" title="Generating Random Data with Specific Characteristics">
Generating Random Data with Specific Characteristics
</a>
.
</p>
</div>
<p>
<b>
Payment card Primary Account Number masking.
</b>
Masking functions provide strict and relaxed masking of
Primary Account Numbers.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<a class="link" href="data-masking-plugin-functions.html#function_mask-pan-plugin">
<code class="literal">
mask_pan()
</code>
</a>
masks all but the last four digits of the number:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa85524652"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> mask_pan<span class="token punctuation">(</span>gen_rnd_pan<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> mask_pan(gen_rnd_pan()) <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> XXXXXXXXXXXX2461 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
</li>
<li class="listitem">
<p>
<a class="link" href="data-masking-plugin-functions.html#function_mask-pan-relaxed-plugin">
<code class="literal">
mask_pan_relaxed()
</code>
</a>
is similar but does not mask the first six digits that
indicate the payment card issuer unmasked:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa54312509"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> mask_pan_relaxed<span class="token punctuation">(</span>gen_rnd_pan<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> mask_pan_relaxed(gen_rnd_pan()) <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> 770630XXXXXX0807 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
</li>
</ul>
</div>
<p>
<b>
US Social Security number masking.
</b>
<a class="link" href="data-masking-plugin-functions.html#function_mask-ssn-plugin">
<code class="literal">
mask_ssn()
</code>
</a>
masks all but the last four digits of the number:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa73991763"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> mask_ssn<span class="token punctuation">(</span>gen_rnd_ssn<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> mask_ssn(gen_rnd_ssn()) <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> XXX<span class="token punctuation">-</span>XX<span class="token punctuation">-</span>1723 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h5 class="title">
<a name="data-masking-plugin-usage-generation-functions">
</a>
Generating Random Data with Specific Characteristics
</h5>
</div>
</div>
</div>
<p>
Several functions generate random values. These values can be
used for testing, simulation, and so forth.
</p>
<p>
<a class="link" href="data-masking-plugin-functions.html#function_gen-range-plugin">
<code class="literal">
gen_range()
</code>
</a>
returns a random integer selected from a given range:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa88250028"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> gen_range<span class="token punctuation">(</span><span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">10</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> gen_range(1, 10) <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> 6 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
<p>
<a class="link" href="data-masking-plugin-functions.html#function_gen-rnd-email-plugin">
<code class="literal">
gen_rnd_email()
</code>
</a>
returns a random email address in the
<code class="literal">
example.com
</code>
domain:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa99682601"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> gen_rnd_email<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> gen_rnd_email() <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> [email protected] <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
<p>
<a class="link" href="data-masking-plugin-functions.html#function_gen-rnd-pan-plugin">
<code class="literal">
gen_rnd_pan()
</code>
</a>
returns a random payment card Primary Account Number:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa87303350"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> gen_rnd_pan<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
(The
<a class="link" href="data-masking-plugin-functions.html#function_gen-rnd-pan-plugin">
<code class="literal">
gen_rnd_pan()
</code>
</a>
function result is not shown because its return values should
be used only for testing purposes, and not for publication. It
cannot be guaranteed the number is not assigned to a
legitimate payment account.)
</p>
<p>
<a class="link" href="data-masking-plugin-functions.html#function_gen-rnd-ssn-plugin">
<code class="literal">
gen_rnd_ssn()
</code>
</a>
returns a random US Social Security number with the first and
second parts each chosen from a range not used for legitimate
numbers:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa48337774"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> gen_rnd_ssn<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> gen_rnd_ssn() <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> 912<span class="token punctuation">-</span>45<span class="token punctuation">-</span>1615 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
<p>
<a class="link" href="data-masking-plugin-functions.html#function_gen-rnd-us-phone-plugin">
<code class="literal">
gen_rnd_us_phone()
</code>
</a>
returns a random US phone number in the 555 area code not used
for legitimate numbers:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa19343741"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> gen_rnd_us_phone<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> gen_rnd_us_phone() <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> 1<span class="token punctuation">-</span>555<span class="token punctuation">-</span>747<span class="token punctuation">-</span>5627 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h5 class="title">
<a name="data-masking-plugin-usage-dictionary-functions">
</a>
Generating Random Data Using Dictionaries
</h5>
</div>
</div>
</div>
<p>
MySQL Enterprise Data Masking and De-Identification enables dictionaries to be used as sources of random
values. To use a dictionary, it must first be loaded from a
file and given a name. Each loaded dictionary becomes part of
the dictionary registry. Items then can be selected from
registered dictionaries and used as random values or as
replacements for other values.
</p>
<p>
A valid dictionary file has these characteristics:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
The file contents are plain text, one term per line.
</p>
</li>
<li class="listitem">
<p>
Empty lines are ignored.
</p>
</li>
<li class="listitem">
<p>
The file must contain at least one term.
</p>
</li>
</ul>
</div>
<p>
Suppose that a file named
<code class="filename">
de_cities.txt
</code>
contains these city names in Germany:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-none"><div class="docs-select-all right" id="sa27960194"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-none">Berlin
Munich
Bremen</code></pre>
</div>
<p>
Also suppose that a file named
<code class="filename">
us_cities.txt
</code>
contains these city names
in the United States:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-none"><div class="docs-select-all right" id="sa57804846"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-none">Chicago
Houston
Phoenix
El Paso
Detroit</code></pre>
</div>
<p>
Assume that the
<a class="link" href="server-system-variables.html#sysvar_secure_file_priv">
<code class="literal">
secure_file_priv
</code>
</a>
system
variable is set to
<code class="filename">
/usr/local/mysql/mysql-files
</code>
. In that
case, copy the dictionary files to that directory so that the
MySQL server can access them. Then use
<a class="link" href="data-masking-plugin-functions.html#function_gen-dictionary-load-plugin">
<code class="literal">
gen_dictionary_load()
</code>
</a>
to load the dictionaries into the dictionary registry and
assign them names:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa16842664"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> gen_dictionary_load<span class="token punctuation">(</span><span class="token string">'/usr/local/mysql/mysql-files/de_cities.txt'</span><span class="token punctuation">,</span> <span class="token string">'DE_Cities'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> gen_dictionary_load('/usr/local/mysql/mysql<span class="token punctuation">-</span>files/de_cities.txt', 'DE_Cities') <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Dictionary load success <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> gen_dictionary_load<span class="token punctuation">(</span><span class="token string">'/usr/local/mysql/mysql-files/us_cities.txt'</span><span class="token punctuation">,</span> <span class="token string">'US_Cities'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> gen_dictionary_load('/usr/local/mysql/mysql<span class="token punctuation">-</span>files/us_cities.txt', 'US_Cities') <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Dictionary load success <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
<p>
To select a random term from a dictionary, use
<a class="link" href="data-masking-plugin-functions.html#function_gen-dictionary-plugin">
<code class="literal">
gen_dictionary()
</code>
</a>
:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa85473209"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> gen_dictionary<span class="token punctuation">(</span><span class="token string">'DE_Cities'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> gen_dictionary('DE_Cities') <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Berlin <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> gen_dictionary<span class="token punctuation">(</span><span class="token string">'US_Cities'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> gen_dictionary('US_Cities') <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Phoenix <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
<p>
To select a random term from multiple dictionaries, randomly
select one of the dictionaries, then select a term from it:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa28691861"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> gen_dictionary<span class="token punctuation">(</span><span class="token function">ELT</span><span class="token punctuation">(</span>gen_range<span class="token punctuation">(</span><span class="token number">1</span><span class="token punctuation">,</span><span class="token number">2</span><span class="token punctuation">)</span><span class="token punctuation">,</span> <span class="token string">'DE_Cities'</span><span class="token punctuation">,</span> <span class="token string">'US_Cities'</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> gen_dictionary(ELT(gen_range(1,2), 'DE_Cities', 'US_Cities')) <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Detroit <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> gen_dictionary<span class="token punctuation">(</span><span class="token function">ELT</span><span class="token punctuation">(</span>gen_range<span class="token punctuation">(</span><span class="token number">1</span><span class="token punctuation">,</span><span class="token number">2</span><span class="token punctuation">)</span><span class="token punctuation">,</span> <span class="token string">'DE_Cities'</span><span class="token punctuation">,</span> <span class="token string">'US_Cities'</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> gen_dictionary(ELT(gen_range(1,2), 'DE_Cities', 'US_Cities')) <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Bremen <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
<p>
The
<a class="link" href="data-masking-plugin-functions.html#function_gen-blocklist-plugin">
<code class="literal">
gen_blocklist()
</code>
</a>
function enables a term from one dictionary to be replaced by
a term from another dictionary, which effects masking by
substitution. Its arguments are the term to replace, the
dictionary in which the term appears, and the dictionary from
which to choose a replacement. For example, to substitute a US
city for a German city, or vice versa, use
<a class="link" href="data-masking-plugin-functions.html#function_gen-blocklist-plugin">
<code class="literal">
gen_blocklist()
</code>
</a>
like this:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa46517371"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> gen_blocklist<span class="token punctuation">(</span><span class="token string">'Munich'</span><span class="token punctuation">,</span> <span class="token string">'DE_Cities'</span><span class="token punctuation">,</span> <span class="token string">'US_Cities'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> gen_blocklist('Munich', 'DE_Cities', 'US_Cities') <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Houston <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> gen_blocklist<span class="token punctuation">(</span><span class="token string">'El Paso'</span><span class="token punctuation">,</span> <span class="token string">'US_Cities'</span><span class="token punctuation">,</span> <span class="token string">'DE_Cities'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> gen_blocklist('El Paso', 'US_Cities', 'DE_Cities') <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Bremen <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
<p>
If the term to replace is not in the first dictionary,
<a class="link" href="data-masking-plugin-functions.html#function_gen-blocklist-plugin">
<code class="literal">
gen_blocklist()
</code>
</a>
returns it unchanged:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa30812496"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> gen_blocklist<span class="token punctuation">(</span><span class="token string">'Moscow'</span><span class="token punctuation">,</span> <span class="token string">'DE_Cities'</span><span class="token punctuation">,</span> <span class="token string">'US_Cities'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> gen_blocklist('Moscow', 'DE_Cities', 'US_Cities') <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Moscow <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h5 class="title">
<a name="data-masking-plugin-usage-customer-identification">
</a>
Using Masked Data for Customer Identification
</h5>
</div>
</div>
</div>
<p>
At customer-service call centers, one common identity
verification technique is to ask customers to provide their
last four Social Security number (SSN) digits. For example, a
customer might say her name is Joanna Bond and that her last
four SSN digits are
<code class="literal">
0007
</code>
.
</p>
<p>
Suppose that a
<code class="literal">
customer
</code>
table containing
customer records has these columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<code class="literal">
id
</code>
: Customer ID number.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
first_name
</code>
: Customer first name.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
last_name
</code>
: Customer last name.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
ssn
</code>
: Customer Social Security number.
</p>
</li>
</ul>
</div>
<p>
For example, the table might be defined as follows:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa89123474"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">CREATE</span> <span class="token keyword">TABLE</span> customer
<span class="token punctuation">(</span>
id <span class="token datatype">BIGINT</span> <span class="token operator">NOT</span> <span class="token boolean">NULL</span> <span class="token keyword">AUTO_INCREMENT</span> <span class="token keyword">PRIMARY</span> <span class="token keyword">KEY</span><span class="token punctuation">,</span>
first_name <span class="token datatype">VARCHAR</span><span class="token punctuation">(</span><span class="token number">40</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
last_name <span class="token datatype">VARCHAR</span><span class="token punctuation">(</span><span class="token number">40</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
ssn <span class="token datatype">VARCHAR</span><span class="token punctuation">(</span><span class="token number">11</span><span class="token punctuation">)</span>
<span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
The application used by customer-service representatives to
check the customer SSN might execute a query like this:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa42836104"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> id<span class="token punctuation">,</span> ssn
<span class="token prompt">mysql></span> <span class="token keyword">FROM</span> customer
<span class="token prompt">mysql></span> <span class="token keyword">WHERE</span> first_name <span class="token operator">=</span> <span class="token string">'Joanna'</span> <span class="token operator">AND</span> last_name <span class="token operator">=</span> <span class="token string">'Bond'</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> id <span class="token punctuation">|</span> ssn <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> 786 <span class="token punctuation">|</span> 906<span class="token punctuation">-</span>39<span class="token punctuation">-</span>0007 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
<p>
However, that exposes the SSN to the customer-service
representative, who has no need to see anything but the last
four digits. Instead, the application can use this query to
display only the masked SSN:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa21734235"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> id<span class="token punctuation">,</span> mask_ssn<span class="token punctuation">(</span><span class="token function">CONVERT</span><span class="token punctuation">(</span>ssn <span class="token keyword">USING</span> <span class="token datatype">binary</span><span class="token punctuation">)</span><span class="token punctuation">)</span> <span class="token keyword">AS</span> masked_ssn
<span class="token prompt">mysql></span> <span class="token keyword">FROM</span> customer
<span class="token prompt">mysql></span> <span class="token keyword">WHERE</span> first_name <span class="token operator">=</span> <span class="token string">'Joanna'</span> <span class="token operator">AND</span> last_name <span class="token operator">=</span> <span class="token string">'Bond'</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> id <span class="token punctuation">|</span> masked_ssn <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> 786 <span class="token punctuation">|</span> XXX<span class="token punctuation">-</span>XX<span class="token punctuation">-</span>0007 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
<p>
Now the representative sees only what is necessary, and
customer privacy is preserved.
</p>
<p>
Why was the
<a class="link" href="cast-functions.html#function_convert">
<code class="literal">
CONVERT()
</code>
</a>
function
used for the argument to
<a class="link" href="data-masking-plugin-functions.html#function_mask-ssn-plugin">
<code class="literal">
mask_ssn()
</code>
</a>
?
Because
<a class="link" href="data-masking-plugin-functions.html#function_mask-ssn-plugin">
<code class="literal">
mask_ssn()
</code>
</a>
requires an argument of length 11. Thus, even though
<code class="literal">
ssn
</code>
is defined as
<code class="literal">
VARCHAR(11)
</code>
, if the
<code class="literal">
ssn
</code>
column has a multibyte character set, it may appear to be
longer than 11 bytes when passed to a loadable function, and
an error occurs. Converting the value to a binary string
ensures that the function sees an argument of length 11.
</p>
<p>
A similar technique may be needed for other data masking
functions when string arguments do not have a single-byte
character set.
</p>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h5 class="title">
<a name="data-masking-plugin-usage-views">
</a>
Creating Views that Display Masked Data
</h5>
</div>
</div>
</div>
<p>
If masked data from a table is used for multiple queries, it
may be convenient to define a view that produces masked data.
That way, applications can select from the view without
performing masking in individual queries.
</p>
<p>
For example, a masking view on the
<code class="literal">
customer
</code>
table from the previous section can be defined like this:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa98031009"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">CREATE</span> <span class="token keyword">VIEW</span> masked_customer <span class="token keyword">AS</span>
<span class="token keyword">SELECT</span> id<span class="token punctuation">,</span> first_name<span class="token punctuation">,</span> last_name<span class="token punctuation">,</span>
mask_ssn<span class="token punctuation">(</span><span class="token function">CONVERT</span><span class="token punctuation">(</span>ssn <span class="token keyword">USING</span> <span class="token datatype">binary</span><span class="token punctuation">)</span><span class="token punctuation">)</span> <span class="token keyword">AS</span> masked_ssn
<span class="token keyword">FROM</span> customer<span class="token punctuation">;</span></code></pre>
</div>
<p>
Then the query to look up a customer becomes simpler but still
returns masked data:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa8224403"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> id<span class="token punctuation">,</span> masked_ssn
<span class="token prompt">mysql></span> <span class="token keyword">FROM</span> masked_customer
<span class="token prompt">mysql></span> <span class="token keyword">WHERE</span> first_name <span class="token operator">=</span> <span class="token string">'Joanna'</span> <span class="token operator">AND</span> last_name <span class="token operator">=</span> <span class="token string">'Bond'</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> id <span class="token punctuation">|</span> masked_ssn <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> 786 <span class="token punctuation">|</span> XXX<span class="token punctuation">-</span>XX<span class="token punctuation">-</span>0007 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
</div>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/view-metadata.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a name="view-metadata">
</a>
27.5.5 View Metadata
</h3>
</div>
</div>
</div>
<a class="indexterm" name="idm46045081674720">
</a>
<a class="indexterm" name="idm46045081673232">
</a>
<p>
To obtain metadata about views:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
Query the
<a class="link" href="information-schema-views-table.html" title="28.3.47 The INFORMATION_SCHEMA VIEWS Table">
<code class="literal">
VIEWS
</code>
</a>
table of the
<code class="literal">
INFORMATION_SCHEMA
</code>
database. See
<a class="xref" href="information-schema-views-table.html" title="28.3.47 The INFORMATION_SCHEMA VIEWS Table">
Section 28.3.47, “The INFORMATION_SCHEMA VIEWS Table”
</a>
.
</p>
</li>
<li class="listitem">
<p>
Use the
<a class="link" href="show-create-view.html" title="15.7.7.14 SHOW CREATE VIEW Statement">
<code class="literal">
SHOW CREATE VIEW
</code>
</a>
statement. See
<a class="xref" href="show-create-view.html" title="15.7.7.14 SHOW CREATE VIEW Statement">
Section 15.7.7.14, “SHOW CREATE VIEW Statement”
</a>
.
</p>
</li>
</ul>
</div>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/audit-log-logging-configuration.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title">
<a name="audit-log-logging-configuration">
</a>
8.4.5.5 Configuring Audit Logging Characteristics
</h4>
</div>
</div>
</div>
<p>
This section describes how to configure audit logging
characteristics, such as the file to which the audit log plugin
writes events, the format of written events, whether to enable
log file compression and encryption, and space management.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<a class="xref" href="audit-log-logging-configuration.html#audit-log-file-name" title="Naming Conventions for Audit Log Files">
Naming Conventions for Audit Log Files
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="xref" href="audit-log-logging-configuration.html#audit-log-file-format" title="Selecting Audit Log File Format">
Selecting Audit Log File Format
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="xref" href="audit-log-logging-configuration.html#audit-log-flush-task" title="Enabling the Audit Log Flush Task">
Enabling the Audit Log Flush Task
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="xref" href="audit-log-logging-configuration.html#audit-log-query-statistics" title="Adding Query Statistics for Outlier Detection">
Adding Query Statistics for Outlier Detection
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="xref" href="audit-log-logging-configuration.html#audit-log-file-compression" title="Compressing Audit Log Files">
Compressing Audit Log Files
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="xref" href="audit-log-logging-configuration.html#audit-log-file-encryption" title="Encrypting Audit Log Files">
Encrypting Audit Log Files
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="xref" href="audit-log-logging-configuration.html#audit-log-file-uncompression-decryption" title="Manually Uncompressing and Decrypting Audit Log Files">
Manually Uncompressing and Decrypting Audit Log Files
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="xref" href="audit-log-logging-configuration.html#audit-log-space-management" title="Space Management of Audit Log Files">
Space Management of Audit Log Files
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="xref" href="audit-log-logging-configuration.html#audit-log-strategy" title="Write Strategies for Audit Logging">
Write Strategies for Audit Logging
</a>
</p>
</li>
</ul>
</div>
<p>
For additional information about the functions and system
variables that affect audit logging, see
<a class="xref" href="audit-log-reference.html#audit-log-routines" title="Audit Log Functions">
Audit Log Functions
</a>
, and
<a class="xref" href="audit-log-reference.html#audit-log-options-variables" title="Audit Log Options and Variables">
Audit Log Options and Variables
</a>
.
</p>
<p>
The audit log plugin can also control which audited events are
written to the audit log file, based on event content or the
account from which events originate. See
<a class="xref" href="audit-log-filtering.html" title="8.4.5.7 Audit Log Filtering">
Section 8.4.5.7, “Audit Log Filtering”
</a>
.
</p>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h5 class="title">
<a name="audit-log-file-name">
</a>
Naming Conventions for Audit Log Files
</h5>
</div>
</div>
</div>
<p>
To configure the audit log file name, set the
<a class="link" href="audit-log-reference.html#sysvar_audit_log_file">
<code class="literal">
audit_log_file
</code>
</a>
system
variable at server startup. The default name is
<code class="filename">
audit.log
</code>
in the server data directory.
For best security, write the audit log to a directory
accessible only to the MySQL server and to users with a
legitimate reason to view the log.
</p>
<p>
The plugin interprets the
<a class="link" href="audit-log-reference.html#sysvar_audit_log_file">
<code class="literal">
audit_log_file
</code>
</a>
value as
composed of an optional leading directory name, a base name,
and an optional suffix. If compression or encryption are
enabled, the effective file name (the name actually used to
create the log file) differs from the configured file name
because it has additional suffixes:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
If compression is enabled, the plugin adds a suffix of
<code class="filename">
.gz
</code>
.
</p>
</li>
<li class="listitem">
<p>
If encryption is enabled, the plugin adds a suffix of
<code class="filename">
.
<em class="replaceable">
<code>
pwd_id
</code>
</em>
.enc
</code>
,
where
<em class="replaceable">
<code>
pwd_id
</code>
</em>
indicates which
encryption password to use for log file operations. The
audit log plugin stores encryption passwords in the
keyring; see
<a class="xref" href="audit-log-logging-configuration.html#audit-log-file-encryption" title="Encrypting Audit Log Files">
Encrypting Audit Log Files
</a>
.
</p>
</li>
</ul>
</div>
<p>
The effective audit log file name is the name resulting from
the addition of applicable compression and encryption suffixes
to the configured file name. For example, if the configured
<a class="link" href="audit-log-reference.html#sysvar_audit_log_file">
<code class="literal">
audit_log_file
</code>
</a>
value is
<code class="filename">
audit.log
</code>
, the effective file name is one
of the values shown in the following table.
</p>
<div class="informaltable">
<table summary="audit_log effective file names for various combinations of the compression and encryption features.">
<colgroup>
<col style="width: 50%"/>
<col style="width: 50%"/>
</colgroup>
<thead>
<tr>
<th>
Enabled Features
</th>
<th>
Effective File Name
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
No compression or encryption
</td>
<td>
<code class="filename">
audit.log
</code>
</td>
</tr>
<tr>
<td>
Compression
</td>
<td>
<code class="filename">
audit.log.gz
</code>
</td>
</tr>
<tr>
<td>
Encryption
</td>
<td>
<code class="filename">
audit.log.
<em class="replaceable">
<code>
pwd_id
</code>
</em>
.enc
</code>
</td>
</tr>
<tr>
<td>
Compression, encryption
</td>
<td>
<code class="filename">
audit.log.gz.
<em class="replaceable">
<code>
pwd_id
</code>
</em>
.enc
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
<em class="replaceable">
<code>
pwd_id
</code>
</em>
indicates the ID of the
password used to encrypt or decrypt a file.
<em class="replaceable">
<code>
pwd_id
</code>
</em>
format is
<em class="replaceable">
<code>
pwd_timestamp-seq
</code>
</em>
, where:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<em class="replaceable">
<code>
pwd_timestamp
</code>
</em>
is a UTC value in
<code class="literal">
<em class="replaceable">
<code>
YYYYMMDD
</code>
</em>
T
<em class="replaceable">
<code>
hhmmss
</code>
</em>
</code>
format indicating when the password was created.
</p>
</li>
<li class="listitem">
<p>
<em class="replaceable">
<code>
seq
</code>
</em>
is a sequence number.
Sequence numbers start at 1 and increase for passwords
that have the same
<em class="replaceable">
<code>
pwd_timestamp
</code>
</em>
value.
</p>
</li>
</ul>
</div>
<p>
Here are some example
<em class="replaceable">
<code>
pwd_id
</code>
</em>
password ID values:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-none"><div class="docs-select-all right" id="sa6151261"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-none">20190403T142359-1
20190403T142400-1
20190403T142400-2</code></pre>
</div>
<p>
To construct the corresponding keyring IDs for storing
passwords in the keyring, the audit log plugin adds a prefix
of
<code class="literal">
audit_log-
</code>
to the
<em class="replaceable">
<code>
pwd_id
</code>
</em>
values. For the example
password IDs just shown, the corresponding keyring IDs are:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-none"><div class="docs-select-all right" id="sa55873161"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-none">audit_log-20190403T142359-1
audit_log-20190403T142400-1
audit_log-20190403T142400-2</code></pre>
</div>
<p>
The ID of the password currently used for encryption by the
audit log plugin is the one having the largest
<em class="replaceable">
<code>
pwd_timestamp
</code>
</em>
value. If multiple
passwords have that
<em class="replaceable">
<code>
pwd_timestamp
</code>
</em>
value, the current password ID is the one with the largest
sequence number. For example, in the preceding set of password
IDs, two of them have the largest timestamp,
<code class="literal">
20190403T142400
</code>
, so the current password ID
is the one with the largest sequence number
(
<code class="literal">
2
</code>
).
</p>
<p>
The audit log plugin performs certain actions during
initialization and termination based on the effective audit
log file name:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
During initialization, the plugin checks whether a file
with the audit log file name already exists and renames it
if so. (In this case, the plugin assumes that the previous
server invocation exited unexpectedly with the audit log
plugin running.) The plugin then writes to a new empty
audit log file.
</p>
</li>
<li class="listitem">
<p>
During termination, the plugin renames the audit log file.
</p>
</li>
<li class="listitem">
<p>
File renaming (whether during plugin initialization or
termination) occurs according to the usual rules for
automatic size-based log file rotation; see
<a class="xref" href="audit-log-logging-configuration.html#audit-log-manual-rotation" title="Manual Audit Log File Rotation">
Manual Audit Log File Rotation
</a>
.
</p>
</li>
</ul>
</div>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h5 class="title">
<a name="audit-log-file-format">
</a>
Selecting Audit Log File Format
</h5>
</div>
</div>
</div>
<p>
To configure the audit log file format, set the
<a class="link" href="audit-log-reference.html#sysvar_audit_log_format">
<code class="literal">
audit_log_format
</code>
</a>
system
variable at server startup. These formats are available:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<code class="literal">
NEW
</code>
: New-style XML format. This is the
default.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
OLD
</code>
: Old-style XML format.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
JSON
</code>
: JSON format. Writes the audit log
as a JSON array. Only this format supports the optional
query time and size statistics.
</p>
</li>
</ul>
</div>
<p>
For details about each format, see
<a class="xref" href="audit-log-file-formats.html" title="8.4.5.4 Audit Log File Formats">
Section 8.4.5.4, “Audit Log File Formats”
</a>
.
</p>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h5 class="title">
<a name="audit-log-flush-task">
</a>
Enabling the Audit Log Flush Task
</h5>
</div>
</div>
</div>
<p>
MySQL Enterprise Audit provides the capability of setting a refresh
interval to dispose of the in-memory cache automatically. A
flush task configured using the
<a class="link" href="audit-log-reference.html#sysvar_audit_log_flush_interval_seconds">
<code class="literal">
audit_log_flush_interval_seconds
</code>
</a>
system variable has a value of zero by default, which means
the task is not scheduled to run.
</p>
<p>
When the task is configured to run (the value is non-zero),
MySQL Enterprise Audit attempts to call the
<a class="link" href="scheduler-component.html" title="7.5.5 Scheduler Component">
scheduler
</a>
component
at its initialization and configure a regular, recurring flush
of its memory cache:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
If the audit log cannot find an implementation of the
scheduler registration service, it does not schedule the
flush and continue loading.
</p>
</li>
<li class="listitem">
<p>
Audit log implements the
<code class="literal">
dynamic_loader_services_loaded_notification
</code>
service and listens for new registrations of
<code class="literal">
mysql_scheduler
</code>
so that audit log can
register its scheduled task into the newly loaded
scheduler.
</p>
</li>
<li class="listitem">
<p>
Audit log only registers itself into the first scheduler
implementation loaded.
</p>
</li>
</ul>
</div>
<p>
Similarly, MySQL Enterprise Audit calls the
<code class="literal">
scheduler
</code>
component at its deinitialization and unconfigures the
recurring flush that it has scheduled. It keeps an active
reference to the scheduler registration service until the
scheduled task is unregistered, ensuring that the
<code class="literal">
scheduler
</code>
component cannot be unloaded
while there are active scheduled jobs. All of the results from
executing the scheduler and its tasks are written to the
server error log.
</p>
<p>
To schedule an audit log flush task:
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1">
<li class="listitem">
<p>
Confirm that the
<code class="literal">
scheduler
</code>
component is
loaded and enabled. The component is enabled
(
<code class="literal">
ON
</code>
) by default (see
<a class="link" href="server-system-variables.html#sysvar_component_scheduler.enabled">
<code class="literal">
component_scheduler.enabled
</code>
</a>
).
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa63170328"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SELECT</span> <span class="token operator">*</span> <span class="token keyword">FROM</span> mysql<span class="token punctuation">.</span>components<span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> component_id <span class="token punctuation">|</span> component_group_id <span class="token punctuation">|</span> component_urn <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> 1 <span class="token punctuation">|</span> 1 <span class="token punctuation">|</span> file://component_scheduler <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
</li>
<li class="listitem">
<p>
Install the
<code class="literal">
audit_log
</code>
plugin, if it is
not installed already (see
<a class="xref" href="audit-log-installation.html" title="8.4.5.2 Installing or Uninstalling MySQL Enterprise Audit">
Section 8.4.5.2, “Installing or Uninstalling MySQL Enterprise Audit”
</a>
).
</p>
</li>
<li class="listitem">
<p>
Start the server using
<a class="link" href="audit-log-reference.html#sysvar_audit_log_flush_interval_seconds">
<code class="literal">
audit_log_flush_interval_seconds
</code>
</a>
and set the value to a number greater than 59. The upper
limit of the value varies by platform. For example, to
configure the flush task to recur every two minutes:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa34138578"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal"><span class="token prompt">$> </span><span class="token command">mysqld</span> <span class="token constant">--audit_log_flush_interval_seconds</span><span class="token attr-value"><span class="token punctuation">=</span>120</span></code></pre>
</div>
<p>
For more information, see the
<a class="link" href="audit-log-reference.html#sysvar_audit_log_flush_interval_seconds">
<code class="literal">
audit_log_flush_interval_seconds
</code>
</a>
system variable.
</p>
</li>
</ol>
</div>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h5 class="title">
<a name="audit-log-query-statistics">
</a>
Adding Query Statistics for Outlier Detection
</h5>
</div>
</div>
</div>
<p>
In MySQL 8.4, you can extend log files in JSON
format with optional data fields to show the query time, the
number of bytes sent and received, the number of rows returned
to the client, and the number of rows examined. This data is
available in the slow query log for qualifying queries, and in
the context of the audit log it similarly helps to detect
outliers for activity analysis. The extended data fields can
be added only when the audit log is in JSON format
(
<a class="link" href="audit-log-reference.html#sysvar_audit_log_format">
<code class="literal">
audit_log_format=JSON
</code>
</a>
),
which is not the default setting.
</p>
<p>
The query statistics are delivered to the audit log through
component services that you set up as an audit log filtering
function. The services are named
<code class="literal">
mysql_audit_print_service_longlong_data_source
</code>
and
<code class="literal">
mysql_audit_print_service_double_data_source
</code>
.
You can choose either data type for each output item. For the
query time,
<code class="literal">
longlong
</code>
outputs the value in
microseconds, and
<code class="literal">
double
</code>
outputs the value
in seconds.
</p>
<p>
You add the query statistics using the
<a class="link" href="audit-log-reference.html#function_audit-log-filter-set-filter">
<code class="literal">
audit_log_filter_set_filter()
</code>
</a>
audit log function, as the
<code class="literal">
service
</code>
element
of the JSON filtering syntax, as follows:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa68768660"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SELECT</span> audit_log_filter_set_filter<span class="token punctuation">(</span><span class="token string">'QueryStatistics'</span><span class="token punctuation">,</span>
<span class="token string">'{ "filter": { "class": { "name": "general", "event": { "name": "status", "print" : '</span>
<span class="token string">'{ "service": { "implementation": "mysql_server", "tag": "query_statistics", "element": [ '</span>
<span class="token string">'{ "name": "query_time", "type": "double" }, '</span>
<span class="token string">'{ "name": "bytes_sent", "type": "longlong" }, '</span>
<span class="token string">'{ "name": "bytes_received", "type": "longlong" }, '</span>
<span class="token string">'{ "name": "rows_sent", "type": "longlong" }, '</span>
<span class="token string">'{ "name": "rows_examined", "type": "longlong" } ] } } } } } }'</span><span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
For the
<code class="literal">
bytes_sent
</code>
and
<code class="literal">
bytes_received
</code>
fields to be populated, the
system variable
<a class="link" href="server-system-variables.html#sysvar_log_slow_extra">
<code class="literal">
log_slow_extra
</code>
</a>
must be set to
<code class="literal">
ON
</code>
. If the system variable is value is
<code class="literal">
OFF
</code>
, a null value is written to the log
file for these fields.
</p>
<p>
If you want to stop collecting the query statistics, use the
<a class="link" href="audit-log-reference.html#function_audit-log-filter-set-filter">
<code class="literal">
audit_log_filter_set_filter()
</code>
</a>
audit log function to remove the filter, for example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa25966498"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SELECT</span> audit_log_filter_remove_filter<span class="token punctuation">(</span><span class="token string">'QueryStatistics'</span><span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>
</div>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h5 class="title">
<a name="audit-log-file-compression">
</a>
Compressing Audit Log Files
</h5>
</div>
</div>
</div>
<p>
Audit log file compression can be enabled for any logging
format.
</p>
<p>
To configure audit log file compression, set the
<a class="link" href="audit-log-reference.html#sysvar_audit_log_compression">
<code class="literal">
audit_log_compression
</code>
</a>
system
variable at server startup. Permitted values are
<code class="literal">
NONE
</code>
(no compression; the default) and
<code class="literal">
GZIP
</code>
(GNU Zip compression).
</p>
<p>
If both compression and encryption are enabled, compression
occurs before encryption. To recover the original file
manually, first decrypt it, then uncompress it. See
<a class="xref" href="audit-log-logging-configuration.html#audit-log-file-uncompression-decryption" title="Manually Uncompressing and Decrypting Audit Log Files">
Manually Uncompressing and Decrypting Audit Log Files
</a>
.
</p>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h5 class="title">
<a name="audit-log-file-encryption">
</a>
Encrypting Audit Log Files
</h5>
</div>
</div>
</div>
<p>
Audit log file encryption can be enabled for any logging
format. Encryption is based on user-defined passwords (with
the exception of the initial password that the audit log
plugin generates). To use this feature, the MySQL keyring must
be enabled because audit logging uses it for password storage.
Any keyring component or plugin can be used; for instructions,
see
<a class="xref" href="keyring.html" title="8.4.4 The MySQL Keyring">
Section 8.4.4, “The MySQL Keyring”
</a>
.
</p>
<p>
To configure audit log file encryption, set the
<a class="link" href="audit-log-reference.html#sysvar_audit_log_encryption">
<code class="literal">
audit_log_encryption
</code>
</a>
system
variable at server startup. Permitted values are
<code class="literal">
NONE
</code>
(no encryption; the default) and
<code class="literal">
AES
</code>
(AES-256-CBC cipher encryption).
</p>
<p>
To set or get an encryption password at runtime, use these
audit log functions:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
To set the current encryption password, invoke
<a class="link" href="audit-log-reference.html#function_audit-log-encryption-password-set">
<code class="literal">
audit_log_encryption_password_set()
</code>
</a>
.
This function stores the new password in the keyring. If
encryption is enabled, it also performs a log file
rotation operation that renames the current log file, and
begins a new log file encrypted with the password. File
renaming occurs according to the usual rules for automatic
size-based log file rotation; see
<a class="xref" href="audit-log-logging-configuration.html#audit-log-manual-rotation" title="Manual Audit Log File Rotation">
Manual Audit Log File Rotation
</a>
.
</p>
<a class="indexterm" name="idm46045237717968">
</a>
<a class="indexterm" name="idm46045237716848">
</a>
<p>
If the
<a class="link" href="audit-log-reference.html#sysvar_audit_log_password_history_keep_days">
<code class="literal">
audit_log_password_history_keep_days
</code>
</a>
system variable is nonzero, invoking
<a class="link" href="audit-log-reference.html#function_audit-log-encryption-password-set">
<code class="literal">
audit_log_encryption_password_set()
</code>
</a>
also causes expiration of old archived audit log
encryption passwords. For information about audit log
password history, including password archiving and
expiration, see the description of that variable.
</p>
</li>
<li class="listitem">
<p>
To get the current encryption password, invoke
<a class="link" href="audit-log-reference.html#function_audit-log-encryption-password-get">
<code class="literal">
audit_log_encryption_password_get()
</code>
</a>
with no argument. To get a password by ID, pass an
argument that specifies the keyring ID of the current
password or an archived password.
</p>
<a class="indexterm" name="idm46045237709488">
</a>
<a class="indexterm" name="idm46045237708368">
</a>
<p>
To determine which audit log keyring IDs exist, query the
Performance Schema
<a class="link" href="performance-schema-keyring-keys-table.html" title="29.12.18.2 The keyring_keys table">
<code class="literal">
keyring_keys
</code>
</a>
table:
</p>
<a class="indexterm" name="idm46045237705008">
</a>
<a class="indexterm" name="idm46045237703520">
</a>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa70388524"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> KEY_ID <span class="token keyword">FROM</span> performance_schema<span class="token punctuation">.</span>keyring_keys
<span class="token keyword">WHERE</span> KEY_ID <span class="token operator">LIKE</span> <span class="token string">'audit_log%'</span>
<span class="token keyword">ORDER</span> <span class="token keyword">BY</span> KEY_ID<span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> KEY_ID <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> audit_log<span class="token punctuation">-</span>20190415T152248<span class="token punctuation">-</span>1 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> audit_log<span class="token punctuation">-</span>20190415T153507<span class="token punctuation">-</span>1 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> audit_log<span class="token punctuation">-</span>20190416T125122<span class="token punctuation">-</span>1 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> audit_log<span class="token punctuation">-</span>20190416T141608<span class="token punctuation">-</span>1 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
</li>
</ul>
</div>
<p>
For additional information about audit log encryption
functions, see
<a class="xref" href="audit-log-reference.html#audit-log-routines" title="Audit Log Functions">
Audit Log Functions
</a>
.
</p>
<p>
When the audit log plugin initializes, if it finds that log
file encryption is enabled, it checks whether the keyring
contains an audit log encryption password. If not, the plugin
automatically generates a random initial encryption password
and stores it in the keyring. To discover this password,
invoke
<a class="link" href="audit-log-reference.html#function_audit-log-encryption-password-get">
<code class="literal">
audit_log_encryption_password_get()
</code>
</a>
.
</p>
<p>
If both compression and encryption are enabled, compression
occurs before encryption. To recover the original file
manually, first decrypt it, then uncompress it. See
<a class="xref" href="audit-log-logging-configuration.html#audit-log-file-uncompression-decryption" title="Manually Uncompressing and Decrypting Audit Log Files">
Manually Uncompressing and Decrypting Audit Log Files
</a>
.
</p>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h5 class="title">
<a name="audit-log-file-uncompression-decryption">
</a>
Manually Uncompressing and Decrypting Audit Log Files
</h5>
</div>
</div>
</div>
<p>
Audit log files can be uncompressed and decrypted using
standard tools. This should be done only for log files that
have been closed (archived) and are no longer in use, not for
the log file that the audit log plugin is currently writing.
You can recognize archived log files because they have been
renamed by the audit log plugin to include a timestamp in the
file name just after the base name.
</p>
<p>
For this discussion, assume that
<a class="link" href="audit-log-reference.html#sysvar_audit_log_file">
<code class="literal">
audit_log_file
</code>
</a>
is set to
<code class="filename">
audit.log
</code>
. In that case, an archived
audit log file has one of the names shown in the following
table.
</p>
<div class="informaltable">
<table summary="audit_log archived file names for various combinations of the compression and encryption features.">
<colgroup>
<col style="width: 50%"/>
<col style="width: 50%"/>
</colgroup>
<thead>
<tr>
<th>
Enabled Features
</th>
<th>
Archived File Name
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
No compression or encryption
</td>
<td>
<code class="filename">
audit.
<em class="replaceable">
<code>
timestamp
</code>
</em>
.log
</code>
</td>
</tr>
<tr>
<td>
Compression
</td>
<td>
<code class="filename">
audit.
<em class="replaceable">
<code>
timestamp
</code>
</em>
.log.gz
</code>
</td>
</tr>
<tr>
<td>
Encryption
</td>
<td>
<code class="filename">
audit.
<em class="replaceable">
<code>
timestamp
</code>
</em>
.log.
<em class="replaceable">
<code>
pwd_id
</code>
</em>
.enc
</code>
</td>
</tr>
<tr>
<td>
Compression, encryption
</td>
<td>
<code class="filename">
audit.
<em class="replaceable">
<code>
timestamp
</code>
</em>
.log.gz.
<em class="replaceable">
<code>
pwd_id
</code>
</em>
.enc
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
As discussed in
<a class="xref" href="audit-log-logging-configuration.html#audit-log-file-name" title="Naming Conventions for Audit Log Files">
Naming Conventions for Audit Log Files
</a>
,
<em class="replaceable">
<code>
pwd_id
</code>
</em>
format is
<em class="replaceable">
<code>
pwd_timestamp-seq
</code>
</em>
. Thus, the names
of archived encrypted log files actually contain two
timestamps. The first indicates file rotation time, and the
second indicates when the encryption password was created.
</p>
<p>
Consider the following set of archived encrypted log file
names:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-simple"><div class="docs-select-all right" id="sa15623580"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-simple">audit<span class="token punctuation">.</span>20190410T205827<span class="token punctuation">.</span>log<span class="token punctuation">.</span>20190403T185337<span class="token operator">-</span>1<span class="token punctuation">.</span>enc
audit<span class="token punctuation">.</span>20190410T210243<span class="token punctuation">.</span>log<span class="token punctuation">.</span>20190403T185337<span class="token operator">-</span>1<span class="token punctuation">.</span>enc
audit<span class="token punctuation">.</span>20190415T145309<span class="token punctuation">.</span>log<span class="token punctuation">.</span>20190414T223342<span class="token operator">-</span>1<span class="token punctuation">.</span>enc
audit<span class="token punctuation">.</span>20190415T151322<span class="token punctuation">.</span>log<span class="token punctuation">.</span>20190414T223342<span class="token operator">-</span>2<span class="token punctuation">.</span>enc</code></pre>
</div>
<p>
Each file name has a unique rotation-time timestamp. By
contrast, the password timestamps are not unique:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
The first two files have the same password ID and sequence
number (
<code class="literal">
20190403T185337-1
</code>
). They have
the same encryption password.
</p>
</li>
<li class="listitem">
<p>
The second two files have the same password ID
(
<code class="literal">
20190414T223342
</code>
) but different
sequence numbers (
<code class="literal">
1
</code>
,
<code class="literal">
2
</code>
). These files have different
encryption passwords.
</p>
</li>
</ul>
</div>
<p>
To uncompress a compressed log file manually, use
<span class="command">
<strong>
gunzip
</strong>
</span>
,
<span class="command">
<strong>
gzip -d
</strong>
</span>
, or
equivalent command. For example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa26591025"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">gunzip <span class="token property">-c</span> audit<span class="token punctuation">.</span><em class="replaceable">timestamp</em><span class="token punctuation">.</span>log<span class="token punctuation">.</span>gz > audit<span class="token punctuation">.</span><em class="replaceable">timestamp</em><span class="token punctuation">.</span>log</code></pre>
</div>
<p>
To decrypt an encrypted log file manually, use the
<span class="command">
<strong>
openssl
</strong>
</span>
command. For example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-terminal"><div class="docs-select-all right" id="sa93281705"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">openssl enc <span class="token property">-d</span> <span class="token property">-aes-256-cbc</span> <span class="token property">-pass</span> pass<span class="token punctuation">:</span><em class="replaceable">password</em> <span class="token property">-md</span> sha256
<span class="token property">-in</span> audit<span class="token punctuation">.</span><em class="replaceable">timestamp</em><span class="token punctuation">.</span>log<span class="token punctuation">.</span><em class="replaceable">pwd_id</em><span class="token punctuation">.</span>enc
<span class="token property">-out</span> audit<span class="token punctuation">.</span><em class="replaceable">timestamp</em><span class="token punctuation">.</span>log</code></pre>
</div>
<p>
To execute that command, you must obtain
<em class="replaceable">
<code>
password
</code>
</em>
, the encryption password.
To do this, use
<a class="link" href="audit-log-reference.html#function_audit-log-encryption-password-get">
<code class="literal">
audit_log_encryption_password_get()
</code>
</a>
.
For example, if the audit log file name is
<code class="filename">
audit.20190415T151322.log.20190414T223342-2.enc
</code>
,
the password ID is
<code class="literal">
20190414T223342-2
</code>
and
the keyring ID is
<code class="literal">
audit-log-20190414T223342-2
</code>
. Retrieve the
keyring password like this:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa19880040"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SELECT</span> audit_log_encryption_password_get<span class="token punctuation">(</span><span class="token string">'audit-log-20190414T223342-2'</span><span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
If both compression and encryption are enabled for audit
logging, compression occurs before encryption. In this case,
the file name has
<code class="filename">
.gz
</code>
and
<code class="filename">
.
<em class="replaceable">
<code>
pwd_id
</code>
</em>
.enc
</code>
suffixes added, corresponding to the order in which those
operations occur. To recover the original file manually,
perform the operations in reverse. That is, first decrypt the
file, then uncompress it:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-terminal"><div class="docs-select-all right" id="sa78763749"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">openssl enc <span class="token property">-d</span> <span class="token property">-aes-256-cbc</span> <span class="token property">-pass</span> pass<span class="token punctuation">:</span><em class="replaceable">password</em> <span class="token property">-md</span> sha256
<span class="token property">-in</span> audit<span class="token punctuation">.</span><em class="replaceable">timestamp</em><span class="token punctuation">.</span>log<span class="token punctuation">.</span>gz<span class="token punctuation">.</span><em class="replaceable">pwd_id</em><span class="token punctuation">.</span>enc
<span class="token property">-out</span> audit<span class="token punctuation">.</span><em class="replaceable">timestamp</em><span class="token punctuation">.</span>log<span class="token punctuation">.</span>gz
gunzip <span class="token property">-c</span> audit<span class="token punctuation">.</span><em class="replaceable">timestamp</em><span class="token punctuation">.</span>log<span class="token punctuation">.</span>gz > audit<span class="token punctuation">.</span><em class="replaceable">timestamp</em><span class="token punctuation">.</span>log</code></pre>
</div>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h5 class="title">
<a name="audit-log-space-management">
</a>
Space Management of Audit Log Files
</h5>
</div>
</div>
</div>
<p>
The audit log file has the potential to grow quite large and
consume a great deal of disk space. If you are collecting the
optional query time and size statistics, this increases the
space requirements. The query statistics are only supported
with JSON format.
</p>
<p>
To manage the space used, employ these methods:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
Log file rotation. This involves rotating the current log
file by renaming it, then opening a new current log file
using the original name. Rotation can be performed
manually, or configured to occur automatically.
</p>
</li>
<li class="listitem">
<p>
Pruning of rotated JSON-format log files, if automatic
rotation is enabled. Pruning can be performed based on log
file age or combined log file size.
</p>
</li>
</ul>
</div>
<p>
To configure audit log file space management, use the
following system variables:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
If
<a class="link" href="audit-log-reference.html#sysvar_audit_log_rotate_on_size">
<code class="literal">
audit_log_rotate_on_size
</code>
</a>
is 0 (the default), automatic log file rotation is
disabled.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
No rotation occurs unless performed manually.
</p>
</li>
<li class="listitem">
<p>
To rotate the current file, use one of the following
methods:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: square; ">
<li class="listitem">
<p>
Run
<code class="literal">
SELECT audit_log_rotate();
</code>
to rename the file and open a new audit log file
using the original name.
</p>
<p>
With this file rotation method, pruning of rotated
JSON-format log files occurs if
<a class="link" href="audit-log-reference.html#sysvar_audit_log_max_size">
<code class="literal">
audit_log_max_size
</code>
</a>
or
<a class="link" href="audit-log-reference.html#sysvar_audit_log_prune_seconds">
<code class="literal">
audit_log_prune_seconds
</code>
</a>
has a value greater than 0.
</p>
</li>
<li class="listitem">
<p>
Manually rename the file, then enable
<a class="link" href="audit-log-reference.html#sysvar_audit_log_flush">
<code class="literal">
audit_log_flush
</code>
</a>
to close it and open a new current log file using
the original name. This file rotation method and
the
<a class="link" href="audit-log-reference.html#sysvar_audit_log_flush">
<code class="literal">
audit_log_flush
</code>
</a>
variable are deprecated.
</p>
<p>
With this file rotation method, pruning of rotated
JSON-format log files does not occur;
<a class="link" href="audit-log-reference.html#sysvar_audit_log_max_size">
<code class="literal">
audit_log_max_size
</code>
</a>
and
<a class="link" href="audit-log-reference.html#sysvar_audit_log_prune_seconds">
<code class="literal">
audit_log_prune_seconds
</code>
</a>
have no effect.
</p>
</li>
</ul>
</div>
<p>
See
<a class="xref" href="audit-log-logging-configuration.html#audit-log-manual-rotation" title="Manual Audit Log File Rotation">
Manual Audit Log File Rotation
</a>
, for
more information.
</p>
</li>
</ul>
</div>
</li>
<li class="listitem">
<p>
If
<a class="link" href="audit-log-reference.html#sysvar_audit_log_rotate_on_size">
<code class="literal">
audit_log_rotate_on_size
</code>
</a>
is greater than 0, automatic audit log file rotation is
enabled:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
Automatic rotation occurs when a write to the current
log file causes its size to exceed the
<a class="link" href="audit-log-reference.html#sysvar_audit_log_rotate_on_size">
<code class="literal">
audit_log_rotate_on_size
</code>
</a>
value, as well as under certain other conditions; see
<a class="xref" href="audit-log-logging-configuration.html#audit-log-automatic-rotation" title="Automatic Audit Log File Rotation">
Automatic Audit Log File Rotation
</a>
. When
automatic rotation occurs, the audit log plugin
renames the current log file and opens a new current
log file using the original name.
</p>
</li>
<li class="listitem">
<p>
Pruning of rotated JSON-format log files occurs if
<a class="link" href="audit-log-reference.html#sysvar_audit_log_max_size">
<code class="literal">
audit_log_max_size
</code>
</a>
or
<a class="link" href="audit-log-reference.html#sysvar_audit_log_prune_seconds">
<code class="literal">
audit_log_prune_seconds
</code>
</a>
has a value greater than 0.
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="audit-log-reference.html#sysvar_audit_log_flush">
<code class="literal">
audit_log_flush
</code>
</a>
has
no effect.
</p>
</li>
</ul>
</div>
</li>
</ul>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
For JSON-format log files, rotation also occurs when the
value of the
<a class="link" href="audit-log-reference.html#sysvar_audit_log_format_unix_timestamp">
<code class="literal">
audit_log_format_unix_timestamp
</code>
</a>
system variable is changed at runtime. However, this does
not occur for space-management purposes, but rather so that,
for a given JSON-format log file, all records in the file
either do or do not include the
<code class="literal">
time
</code>
field.
</p>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
Rotated (renamed) log files are not removed automatically.
For example, with size-based log file rotation, renamed log
files have unique names and accumulate indefinitely. They do
not rotate off the end of the name sequence. To avoid
excessive use of space:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
For JSON-format log files: Enable log file pruning as
described in
<a class="xref" href="audit-log-logging-configuration.html#audit-log-pruning" title="Audit Log File Pruning">
Audit Log File Pruning
</a>
.
</p>
</li>
<li class="listitem">
<p>
Otherwise: Remove old files periodically, backing them
up first as necessary. If backed-up log files are
encrypted, also back up the corresponding encryption
passwords to a safe place, should you need to decrypt
the files later.
</p>
</li>
</ul>
</div>
</div>
<p>
The following sections describe log file rotation and pruning
in greater detail.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<a class="xref" href="audit-log-logging-configuration.html#audit-log-manual-rotation" title="Manual Audit Log File Rotation">
Manual Audit Log File Rotation
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="xref" href="audit-log-logging-configuration.html#audit-log-manual-rotation-old" title="Manual Audit Log File Rotation (Old Method)">
Manual Audit Log File Rotation (Old Method)
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="xref" href="audit-log-logging-configuration.html#audit-log-automatic-rotation" title="Automatic Audit Log File Rotation">
Automatic Audit Log File Rotation
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="xref" href="audit-log-logging-configuration.html#audit-log-pruning" title="Audit Log File Pruning">
Audit Log File Pruning
</a>
</p>
</li>
</ul>
</div>
<h6>
<a name="audit-log-manual-rotation">
</a>
Manual Audit Log File Rotation
</h6>
<p>
If
<a class="link" href="audit-log-reference.html#sysvar_audit_log_rotate_on_size">
<code class="literal">
audit_log_rotate_on_size
</code>
</a>
is 0 (the default), no log rotation occurs unless performed
manually.
</p>
<p>
To rotate the audit log file manually, run
<code class="literal">
SELECT
audit_log_rotate();
</code>
to rename the current audit log
file and open a new audit log file. Files are renamed
according to the conventions described in
<a class="xref" href="audit-log-logging-configuration.html#audit-log-file-name" title="Naming Conventions for Audit Log Files">
Naming Conventions for Audit Log Files
</a>
.
</p>
<p>
The
<a class="link" href="privileges-provided.html#priv_audit-admin">
<code class="literal">
AUDIT_ADMIN
</code>
</a>
privilege is
required to use the
<a class="link" href="audit-log-reference.html#function_audit-log-rotate">
<code class="literal">
audit_log_rotate()
</code>
</a>
function.
</p>
<p>
Managing the number of archived log files (the files that have
been renamed) and the space they use is a manual task that
involves removing archived audit log files that are no longer
needed from your file system.
</p>
<p>
The content of audit log files that are renamed using the
<code class="literal">
audit_log_rotate()
</code>
function can be read by
<a class="link" href="audit-log-reference.html#function_audit-log-read">
<code class="literal">
audit_log_read()
</code>
</a>
function.
</p>
<h6>
<a name="audit-log-manual-rotation-old">
</a>
Manual Audit Log File Rotation (Old Method)
</h6>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
The
<a class="link" href="audit-log-reference.html#sysvar_audit_log_flush">
<code class="literal">
audit_log_flush
</code>
</a>
variable and this method of audit log file rotation are
deprecated; expect support to be removed in a future version
of MySQL.
</p>
</div>
<p>
If
<a class="link" href="audit-log-reference.html#sysvar_audit_log_rotate_on_size">
<code class="literal">
audit_log_rotate_on_size
</code>
</a>
is 0 (the default), no log rotation occurs unless performed
manually. In this case, the audit log plugin closes and
reopens the log file when the
<a class="link" href="audit-log-reference.html#sysvar_audit_log_flush">
<code class="literal">
audit_log_flush
</code>
</a>
value changes
from disabled to enabled. Log file renaming must be done
externally to the server. Suppose that the log file name is
<code class="filename">
audit.log
</code>
and you want to maintain the
three most recent log files, cycling through the names
<code class="filename">
audit.log.1
</code>
through
<code class="filename">
audit.log.3
</code>
. On Unix, perform rotation
manually like this:
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1">
<li class="listitem">
<p>
From the command line, rename the current log files:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-terminal"><div class="docs-select-all right" id="sa37063714"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">mv audit<span class="token punctuation">.</span>log<span class="token punctuation">.</span>2 audit<span class="token punctuation">.</span>log<span class="token punctuation">.</span>3
mv audit<span class="token punctuation">.</span>log<span class="token punctuation">.</span>1 audit<span class="token punctuation">.</span>log<span class="token punctuation">.</span>2
mv audit<span class="token punctuation">.</span>log audit<span class="token punctuation">.</span>log<span class="token punctuation">.</span>1</code></pre>
</div>
<p>
This strategy overwrites the current
<code class="filename">
audit.log.3
</code>
contents, placing a bound
on the number of archived log files and the space they
use.
</p>
</li>
<li class="listitem">
<p>
At this point, the plugin is still writing to the current
log file, which has been renamed to
<code class="filename">
audit.log.1
</code>
. Connect to the server
and flush the log file so the plugin closes it and reopens
a new
<code class="filename">
audit.log
</code>
file:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa83062998"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SET</span> <span class="token keyword">GLOBAL</span> audit_log_flush <span class="token operator">=</span> <span class="token keyword">ON</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
<a class="link" href="audit-log-reference.html#sysvar_audit_log_flush">
<code class="literal">
audit_log_flush
</code>
</a>
is
special in that its value remains
<code class="literal">
OFF
</code>
so that you need not disable it explicitly before enabling
it again to perform another flush.
</p>
</li>
</ol>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
If compression or encryption are enabled, log file names
include suffixes that signify the enabled features, as well
as a password ID if encryption is enabled. If file names
include a password ID, be sure to retain the ID in the name
of any files you rename manually so that the password to use
for decryption operations can be determined.
</p>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
For JSON-format logging, renaming audit log files manually
makes them unavailable to the log-reading functions because
the audit log plugin can no longer determine that they are
part of the log file sequence (see
<a class="xref" href="audit-log-file-reading.html" title="8.4.5.6 Reading Audit Log Files">
Section 8.4.5.6, “Reading Audit Log Files”
</a>
). Consider setting
<a class="link" href="audit-log-reference.html#sysvar_audit_log_rotate_on_size">
<code class="literal">
audit_log_rotate_on_size
</code>
</a>
greater than 0 to use size-based rotation instead.
</p>
</div>
<h6>
<a name="audit-log-automatic-rotation">
</a>
Automatic Audit Log File Rotation
</h6>
<p>
If
<a class="link" href="audit-log-reference.html#sysvar_audit_log_rotate_on_size">
<code class="literal">
audit_log_rotate_on_size
</code>
</a>
is greater than 0, setting
<a class="link" href="audit-log-reference.html#sysvar_audit_log_flush">
<code class="literal">
audit_log_flush
</code>
</a>
has no
effect. Instead, whenever a write to the current log file
causes its size to exceed the
<a class="link" href="audit-log-reference.html#sysvar_audit_log_rotate_on_size">
<code class="literal">
audit_log_rotate_on_size
</code>
</a>
value, the audit log plugin automatically renames the current
log file and opens a new current log file using the original
name.
</p>
<p>
Automatic size-based rotation also occurs under these
conditions:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
During plugin initialization, if a file with the audit log
file name already exists (see
<a class="xref" href="audit-log-logging-configuration.html#audit-log-file-name" title="Naming Conventions for Audit Log Files">
Naming Conventions for Audit Log Files
</a>
).
</p>
</li>
<li class="listitem">
<p>
During plugin termination.
</p>
</li>
<li class="listitem">
<p>
When the
<a class="link" href="audit-log-reference.html#function_audit-log-encryption-password-set">
<code class="literal">
audit_log_encryption_password_set()
</code>
</a>
function is called to set the encryption password, if
encryption is enabled. (Rotation does not occur if
encryption is disabled.)
</p>
</li>
</ul>
</div>
<p>
The plugin renames the original file by inserting a timestamp
just after its base name. For example, if the file name is
<code class="filename">
audit.log
</code>
, the plugin renames it to a
value such as
<code class="filename">
audit.20210115T140633.log
</code>
.
The timestamp is a UTC value in
<code class="literal">
<em class="replaceable">
<code>
YYYYMMDD
</code>
</em>
T
<em class="replaceable">
<code>
hhmmss
</code>
</em>
</code>
format. For XML logging, the timestamp indicates rotation
time. For JSON logging, the timestamp is that of the last
event written to the file.
</p>
<p>
If log files are encrypted, the original file name already
contains a timestamp indicating the encryption password
creation time (see
<a class="xref" href="audit-log-logging-configuration.html#audit-log-file-name" title="Naming Conventions for Audit Log Files">
Naming Conventions for Audit Log Files
</a>
). In
this case, the file name after rotation contains two
timestamps. For example, an encrypted log file named
<code class="filename">
audit.log.20210110T130749-1.enc
</code>
is
renamed to a value such as
<code class="filename">
audit.20210115T140633.log.20210110T130749-1.enc
</code>
.
</p>
<h6>
<a name="audit-log-pruning">
</a>
Audit Log File Pruning
</h6>
<p>
The audit log plugin supports pruning of rotated JSON-format
audit log files, if automatic log file rotation is enabled. To
use this capability:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
Set
<code class="literal">
audit_log_format
</code>
to
<code class="literal">
JSON
</code>
. (In addition, consider also
changing
<a class="link" href="audit-log-reference.html#sysvar_audit_log_file">
<code class="literal">
audit_log_file
</code>
</a>
;
see
<a class="xref" href="audit-log-logging-configuration.html#audit-log-file-format" title="Selecting Audit Log File Format">
Selecting Audit Log File Format
</a>
.)
</p>
</li>
<li class="listitem">
<p>
Set
<a class="link" href="audit-log-reference.html#sysvar_audit_log_rotate_on_size">
<code class="literal">
audit_log_rotate_on_size
</code>
</a>
greater than 0 to specify the size in bytes at which
automatic log file rotation occurs.
</p>
</li>
<li class="listitem">
<p>
By default, no pruning of automatically rotated
JSON-format log files occurs. To enable pruning, set one
of these system variables to a value greater than 0:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
Set
<a class="link" href="audit-log-reference.html#sysvar_audit_log_max_size">
<code class="literal">
audit_log_max_size
</code>
</a>
greater than 0 to specify the limit in bytes on the
combined size of rotated log files above which the
files become subject to pruning.
</p>
</li>
<li class="listitem">
<p>
Set
<a class="link" href="audit-log-reference.html#sysvar_audit_log_prune_seconds">
<code class="literal">
audit_log_prune_seconds
</code>
</a>
greater than 0 to specify the number of seconds after
which rotated log files become subject to pruning.
</p>
</li>
</ul>
</div>
<p>
Nonzero values of
<a class="link" href="audit-log-reference.html#sysvar_audit_log_max_size">
<code class="literal">
audit_log_max_size
</code>
</a>
take
precedence over nonzero values of
<a class="link" href="audit-log-reference.html#sysvar_audit_log_prune_seconds">
<code class="literal">
audit_log_prune_seconds
</code>
</a>
.
If both are set greater than 0 at plugin initialization, a
warning is written to the server error log. If a client
sets both greater than 0 at runtime, a warning is returned
to the client.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
Warnings to the error log are written as Notes, which
are information messages. To ensure that such messages
appear in the error log and are not discarded, make sure
that error-logging verbosity is sufficient to include
information messages. For example, if you are using
priority-based log filtering, as described in
<a class="xref" href="error-log-priority-based-filtering.html" title="7.4.2.5 Priority-Based Error Log Filtering (log_filter_internal)">
Section 7.4.2.5, “Priority-Based Error Log Filtering (log_filter_internal)”
</a>
,
set the
<a class="link" href="server-system-variables.html#sysvar_log_error_verbosity">
<code class="literal">
log_error_verbosity
</code>
</a>
system variable to a value of 3.
</p>
</div>
</li>
</ul>
</div>
<p>
Pruning of JSON-format log files, if enabled, occurs as
follows:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
When automatic rotation takes place; for the conditions
under which this happens, see
<a class="xref" href="audit-log-logging-configuration.html#audit-log-automatic-rotation" title="Automatic Audit Log File Rotation">
Automatic Audit Log File Rotation
</a>
.
</p>
</li>
<li class="listitem">
<p>
When the global
<a class="link" href="audit-log-reference.html#sysvar_audit_log_max_size">
<code class="literal">
audit_log_max_size
</code>
</a>
or
<a class="link" href="audit-log-reference.html#sysvar_audit_log_prune_seconds">
<code class="literal">
audit_log_prune_seconds
</code>
</a>
system variable is set at runtime.
</p>
</li>
</ul>
</div>
<p>
For pruning based on combined rotated log file size, if the
combined size is greater than the limit specified by
<a class="link" href="audit-log-reference.html#sysvar_audit_log_max_size">
<code class="literal">
audit_log_max_size
</code>
</a>
, the audit
log plugin removes the oldest files until their combined size
does not exceed the limit.
</p>
<p>
For pruning based on rotated log file age, the pruning point
is the current time minus the value of
<a class="link" href="audit-log-reference.html#sysvar_audit_log_prune_seconds">
<code class="literal">
audit_log_prune_seconds
</code>
</a>
. In
rotated JSON-format log files, the timestamp part of each file
name indicates the timestamp of the last event written to the
file. The audit log plugin uses file name timestamps to
determine which files contain only events older than the
pruning point, and removes them.
</p>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h5 class="title">
<a name="audit-log-strategy">
</a>
Write Strategies for Audit Logging
</h5>
</div>
</div>
</div>
<p>
The audit log plugin can use any of several strategies for log
writes. Regardless of strategy, logging occurs on a
best-effort basis, with no guarantee of consistency.
</p>
<p>
To specify a write strategy, set the
<a class="link" href="audit-log-reference.html#sysvar_audit_log_strategy">
<code class="literal">
audit_log_strategy
</code>
</a>
system
variable at server startup. By default, the strategy value is
<code class="literal">
ASYNCHRONOUS
</code>
and the plugin logs
asynchronously to a buffer, waiting if the buffer is full. You
can tell the plugin not to wait
(
<code class="literal">
PERFORMANCE
</code>
) or to log synchronously,
either using file system caching
(
<code class="literal">
SEMISYNCHRONOUS
</code>
) or forcing output with a
<code class="literal">
sync()
</code>
call after each write request
(
<code class="literal">
SYNCHRONOUS
</code>
).
</p>
<p>
In many cases, the plugin writes directly to a JSON-format
audit log if the current query is too large for the buffer.
The write strategy determines how the plugin increments the
direct write count. You can track the number direct writes
with the
<a class="link" href="audit-log-reference.html#statvar_Audit_log_direct_writes">
<code class="literal">
Audit_log_direct_writes
</code>
</a>
status variable.
</p>
<p>
For asynchronous write strategy, the
<a class="link" href="audit-log-reference.html#sysvar_audit_log_buffer_size">
<code class="literal">
audit_log_buffer_size
</code>
</a>
system
variable is the buffer size in bytes. Set this variable at
server startup to change the buffer size. The plugin uses a
single buffer, which it allocates when it initializes and
removes when it terminates. The plugin does not allocate this
buffer for nonasynchronous write strategies.
</p>
<p>
Asynchronous logging strategy has these characteristics:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
Minimal impact on server performance and scalability.
</p>
</li>
<li class="listitem">
<p>
Blocking of threads that generate audit events for the
shortest possible time; that is, time to allocate the
buffer plus time to copy the event to the buffer.
</p>
</li>
<li class="listitem">
<p>
Output goes to the buffer. A separate thread handles
writes from the buffer to the log file.
</p>
</li>
</ul>
</div>
<p>
With asynchronous logging, the integrity of the log file may
be compromised if a problem occurs during a write to the file
or if the plugin does not shut down cleanly (for example, in
the event that the server host exits unexpectedly). To reduce
this risk, set
<a class="link" href="audit-log-reference.html#sysvar_audit_log_strategy">
<code class="literal">
audit_log_strategy
</code>
</a>
to use
synchronous logging.
</p>
<p>
A disadvantage of
<code class="literal">
PERFORMANCE
</code>
strategy is
that it drops events when the buffer is full. For a heavily
loaded server, the audit log may have events missing.
</p>
</div>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/function-loading.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a name="function-loading">
</a>
7.7.1 Installing and Uninstalling Loadable Functions
</h3>
</div>
</div>
</div>
<a class="indexterm" name="idm46045254213360">
</a>
<a class="indexterm" name="idm46045254212304">
</a>
<a class="indexterm" name="idm46045254210816">
</a>
<a class="indexterm" name="idm46045254209728">
</a>
<p>
Loadable functions, as the name implies, must be loaded into the
server before they can be used. MySQL supports automatic function
loading during server startup and manual loading thereafter.
</p>
<p>
While a loadable function is loaded, information about it is
available as described in
<a class="xref" href="obtaining-loadable-function-information.html" title="7.7.2 Obtaining Information About Loadable Functions">
Section 7.7.2, “Obtaining Information About Loadable Functions”
</a>
.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<a class="xref" href="function-loading.html#loadable-function-installing" title="Installing Loadable Functions">
Installing Loadable Functions
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="xref" href="function-loading.html#loadable-function-uninstalling" title="Uninstalling Loadable Functions">
Uninstalling Loadable Functions
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="xref" href="function-loading.html#loadable-function-upgrading" title="Reinstalling or Upgrading Loadable Functions">
Reinstalling or Upgrading Loadable Functions
</a>
</p>
</li>
</ul>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title">
<a name="loadable-function-installing">
</a>
Installing Loadable Functions
</h4>
</div>
</div>
</div>
<p>
To load a loadable function manually, use the
<a class="link" href="create-function-loadable.html" title="15.7.4.1 CREATE FUNCTION Statement for Loadable Functions">
<code class="literal">
CREATE
FUNCTION
</code>
</a>
statement. For example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa28970028"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">CREATE</span> <span class="token keyword">FUNCTION</span> metaphon
<span class="token keyword">RETURNS</span> <span class="token keyword">STRING</span>
<span class="token keyword">SONAME</span> <span class="token string">'udf_example.so'</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
The file base name depends on your platform. Common suffixes are
<code class="filename">
.so
</code>
for Unix and Unix-like systems,
<code class="filename">
.dll
</code>
for Windows.
</p>
<p>
<a class="link" href="create-function-loadable.html" title="15.7.4.1 CREATE FUNCTION Statement for Loadable Functions">
<code class="literal">
CREATE
FUNCTION
</code>
</a>
has these effects:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
It loads the function into the server to make it available
immediately.
</p>
</li>
<li class="listitem">
<p>
It registers the function in the
<code class="literal">
mysql.func
</code>
system table to make it
persistent across server restarts. For this reason,
<a class="link" href="create-function-loadable.html" title="15.7.4.1 CREATE FUNCTION Statement for Loadable Functions">
<code class="literal">
CREATE
FUNCTION
</code>
</a>
requires the
<a class="link" href="privileges-provided.html#priv_insert">
<code class="literal">
INSERT
</code>
</a>
privilege for the
<code class="literal">
mysql
</code>
system database.
</p>
</li>
<li class="listitem">
<p>
It adds the function to the Performance Schema
<a class="link" href="performance-schema-user-defined-functions-table.html" title="29.12.22.10 The user_defined_functions Table">
<code class="literal">
user_defined_functions
</code>
</a>
table
that provides runtime information about installed loadable
functions. See
<a class="xref" href="obtaining-loadable-function-information.html" title="7.7.2 Obtaining Information About Loadable Functions">
Section 7.7.2, “Obtaining Information About Loadable Functions”
</a>
.
</p>
</li>
</ul>
</div>
<p>
Automatic loading of loadable functions occurs during the normal
server startup sequence:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
Functions registered in the
<code class="literal">
mysql.func
</code>
table are installed.
</p>
</li>
<li class="listitem">
<p>
Components or plugins that are installed at startup may
automatically install related functions.
</p>
</li>
<li class="listitem">
<p>
Automatic function installation adds the functions to the
Performance Schema
<a class="link" href="performance-schema-user-defined-functions-table.html" title="29.12.22.10 The user_defined_functions Table">
<code class="literal">
user_defined_functions
</code>
</a>
table
that provides runtime information about installed functions.
</p>
</li>
</ul>
</div>
<p>
If the server is started with the
<a class="link" href="server-options.html#option_mysqld_skip-grant-tables">
<code class="option">
--skip-grant-tables
</code>
</a>
option,
functions registered in the
<code class="literal">
mysql.func
</code>
table
are not loaded and are unavailable. This does not apply to
functions installed automatically by a component or plugin.
</p>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title">
<a name="loadable-function-uninstalling">
</a>
Uninstalling Loadable Functions
</h4>
</div>
</div>
</div>
<p>
To remove a loadable function, use the
<a class="link" href="drop-function-loadable.html" title="15.7.4.2 DROP FUNCTION Statement for Loadable Functions">
<code class="literal">
DROP
FUNCTION
</code>
</a>
statement. For example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa67537964"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">DROP</span> <span class="token keyword">FUNCTION</span> metaphon<span class="token punctuation">;</span></code></pre>
</div>
<p>
<a class="link" href="drop-function-loadable.html" title="15.7.4.2 DROP FUNCTION Statement for Loadable Functions">
<code class="literal">
DROP
FUNCTION
</code>
</a>
has these effects:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
It unloads the function to make it unavailable.
</p>
</li>
<li class="listitem">
<p>
It removes the function from the
<code class="literal">
mysql.func
</code>
system table. For this reason,
<a class="link" href="drop-function-loadable.html" title="15.7.4.2 DROP FUNCTION Statement for Loadable Functions">
<code class="literal">
DROP
FUNCTION
</code>
</a>
requires the
<a class="link" href="privileges-provided.html#priv_delete">
<code class="literal">
DELETE
</code>
</a>
privilege for the
<code class="literal">
mysql
</code>
system database. With the function
no longer registered in the
<code class="literal">
mysql.func
</code>
table, the server does not load the function during
subsequent restarts.
</p>
</li>
<li class="listitem">
<p>
It removes the function from the Performance Schema
<a class="link" href="performance-schema-user-defined-functions-table.html" title="29.12.22.10 The user_defined_functions Table">
<code class="literal">
user_defined_functions
</code>
</a>
table
that provides runtime information about installed loadable
functions.
</p>
</li>
</ul>
</div>
<p>
<a class="link" href="drop-function-loadable.html" title="15.7.4.2 DROP FUNCTION Statement for Loadable Functions">
<code class="literal">
DROP
FUNCTION
</code>
</a>
cannot be used to drop a loadable function
that is installed automatically by components or plugins rather
than by using
<a class="link" href="create-function-loadable.html" title="15.7.4.1 CREATE FUNCTION Statement for Loadable Functions">
<code class="literal">
CREATE
FUNCTION
</code>
</a>
. Such a function is also dropped
automatically, when the component or plugin that installed it is
uninstalled.
</p>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title">
<a name="loadable-function-upgrading">
</a>
Reinstalling or Upgrading Loadable Functions
</h4>
</div>
</div>
</div>
<p>
To reinstall or upgrade the shared library associated with a
loadable function, issue a
<a class="link" href="drop-function-loadable.html" title="15.7.4.2 DROP FUNCTION Statement for Loadable Functions">
<code class="literal">
DROP
FUNCTION
</code>
</a>
statement, upgrade the shared library, and
then issue a
<a class="link" href="create-function-loadable.html" title="15.7.4.1 CREATE FUNCTION Statement for Loadable Functions">
<code class="literal">
CREATE
FUNCTION
</code>
</a>
statement. If you upgrade the shared library
first and then use
<a class="link" href="drop-function-loadable.html" title="15.7.4.2 DROP FUNCTION Statement for Loadable Functions">
<code class="literal">
DROP
FUNCTION
</code>
</a>
, the server may unexpectedly shut down.
</p>
</div>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/innodb-dedicated-server.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a name="innodb-dedicated-server">
</a>
17.8.12 Enabling Automatic InnoDB Configuration for a Dedicated MySQL Server
</h3>
</div>
</div>
</div>
<p>
When the server is started with
<a class="link" href="innodb-parameters.html#option_mysqld_innodb-dedicated-server">
<code class="option">
--innodb-dedicated-server
</code>
</a>
,
<code class="literal">
InnoDB
</code>
automatically calculates values for and
sets the following system variables:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<a class="link" href="innodb-parameters.html#sysvar_innodb_buffer_pool_size">
<code class="literal">
innodb_buffer_pool_size
</code>
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="innodb-parameters.html#sysvar_innodb_redo_log_capacity">
<code class="literal">
innodb_redo_log_capacity
</code>
</a>
</p>
</li>
</ul>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
<code class="literal">
innodb_redo_log_capacity
</code>
supersedes both
<a class="link" href="innodb-parameters.html#sysvar_innodb_log_file_size">
<code class="literal">
innodb_log_file_size
</code>
</a>
and
<a class="link" href="innodb-parameters.html#sysvar_innodb_log_files_in_group">
<code class="literal">
innodb_log_files_in_group
</code>
</a>
,
which were set by
<code class="option">
--innodb-dedicated-server
</code>
in
older versions of MySQL, but which have since been deprecated.
You should expect
<code class="literal">
innodb_log_file_size
</code>
and
<code class="literal">
innodb_log_files_in_group
</code>
to be removed in a
future version of MySQL.
</p>
<p>
In MySQL 8.0,
<a class="link" href="innodb-parameters.html#sysvar_innodb_flush_method">
<code class="literal">
innodb_flush_method
</code>
</a>
was also
set automatically by this option, but in MySQL 8.4, this is no
longer the case.
</p>
</div>
<p>
You should consider using
<code class="option">
--innodb-dedicated-server
</code>
only if the MySQL
instance resides on a dedicated server where it can use all
available system resources—for example, if you run MySQL
Server in a Docker container or dedicated VM that runs MySQL only.
using
<code class="option">
--innodb-dedicated-server
</code>
is not
recommended if the MySQL instance shares system resources with
other applications.
</p>
<p>
The value for each affected variable is determined and applied by
<code class="option">
--innodb-dedicated-server
</code>
as described in the
following list:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<a class="link" href="innodb-parameters.html#sysvar_innodb_buffer_pool_size">
<code class="literal">
innodb_buffer_pool_size
</code>
</a>
</p>
<p>
Buffer pool size is calculated according to the amount of
memory detected on the server, as shown in the following
table:
</p>
<div class="table">
<a name="dedicated-server-buffer-pool-size">
</a>
<p class="title">
<b>
Table 17.8 Automatically Configured Buffer Pool Size
</b>
</p>
<div class="table-contents">
<table summary="The first column shows the amount of server memory detected. The second column shows the buffer pool size which is automatically determined.">
<colgroup>
<col style="width: 50%"/>
<col style="width: 50%"/>
</colgroup>
<thead>
<tr>
<th>
Detected Server Memory
</th>
<th>
Buffer Pool Size
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
Less than 1GB
</td>
<td>
128MB (the default value)
</td>
</tr>
<tr>
<td>
1GB to 4GB
</td>
<td>
<em class="replaceable">
<code>
detected server memory
</code>
</em>
* 0.5
</td>
</tr>
<tr>
<td>
Greater than 4GB
</td>
<td>
<em class="replaceable">
<code>
detected server memory
</code>
</em>
* 0.75
</td>
</tr>
</tbody>
</table>
</div>
</div>
<br class="table-break"/>
</li>
<li class="listitem">
<p>
<a class="link" href="innodb-parameters.html#sysvar_innodb_redo_log_capacity">
<code class="literal">
innodb_redo_log_capacity
</code>
</a>
</p>
<p>
Redo log capacity is calculated according to the number of
logical processors available on the server. The formula is
(number of available logical processors / 2) GB, with a
maximum dynamic default value of 16 GB.
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="innodb-parameters.html#sysvar_innodb_log_file_size">
<code class="literal">
innodb_log_file_size
</code>
</a>
(deprecated)
</p>
<p>
Log file size is set according to the automatically configured
buffer pool size, as shown in the following table:
</p>
<div class="table">
<a name="dedicated-server-log-file-size">
</a>
<p class="title">
<b>
Table 17.9 Automatically Configured Log File Size
</b>
</p>
<div class="table-contents">
<table summary="The first column shows the buffer pool size. The second column shows the log file size which is automatically determined.">
<colgroup>
<col style="width: 50%"/>
<col style="width: 50%"/>
</colgroup>
<thead>
<tr>
<th>
Buffer Pool Size
</th>
<th>
Log File Size
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
Less than 8GB
</td>
<td>
512MB
</td>
</tr>
<tr>
<td>
8GB to 128GB
</td>
<td>
1024MB
</td>
</tr>
<tr>
<td>
Greater than 128GB
</td>
<td>
2048MB
</td>
</tr>
</tbody>
</table>
</div>
</div>
<br class="table-break"/>
</li>
<li class="listitem">
<p>
<a class="link" href="innodb-parameters.html#sysvar_innodb_log_files_in_group">
<code class="literal">
innodb_log_files_in_group
</code>
</a>
(deprecated)
</p>
<p>
The number of log files is determined according to the
automatically configured buffer pool size, as shown in the
following table:
</p>
<div class="table">
<a name="dedicated-server-log-files">
</a>
<p class="title">
<b>
Table 17.10 Automatically Configured Number of Log Files
</b>
</p>
<div class="table-contents">
<table summary="The first column shows the buffer pool size. The second column shows the number of log files which is automatically determined.">
<colgroup>
<col style="width: 50%"/>
<col style="width: 50%"/>
</colgroup>
<thead>
<tr>
<th>
Buffer Pool Size
</th>
<th>
Number of Log Files
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
Less than 8GB
</td>
<td>
round(
<em class="replaceable">
<code>
buffer pool size
</code>
</em>
)
</td>
</tr>
<tr>
<td>
8GB to 128GB
</td>
<td>
round(
<em class="replaceable">
<code>
buffer pool size
</code>
</em>
* 0.75)
</td>
</tr>
<tr>
<td>
Greater than 128GB
</td>
<td>
64
</td>
</tr>
</tbody>
</table>
</div>
</div>
<br class="table-break"/>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
The minimum value for
<code class="literal">
innodb_log_files_in_group
</code>
value is
<code class="literal">
2
</code>
; this lower limit is enforced if the
rounded buffer pool size value is less than this number.
</p>
</div>
</li>
</ul>
</div>
<p>
If one of the variables listed previously is set explicitly in an
option file or elsewhere, this explicit value is used, and a
startup warning similar to this one is printed to
<code class="literal">
stderr
</code>
:
</p>
<p>
<span class="errortext">
[Warning] [000000] InnoDB: Option
innodb_dedicated_server is ignored for innodb_buffer_pool_size
because innodb_buffer_pool_size=134217728 is specified
explicitly.
</span>
</p>
<p>
Setting one variable explicitly does not prevent the automatic
configuration of other options.
</p>
<p>
If the server is started with
<code class="option">
--innodb-dedicated-server
</code>
and
<a class="link" href="innodb-parameters.html#sysvar_innodb_buffer_pool_size">
<code class="literal">
innodb_buffer_pool_size
</code>
</a>
is set
explicitly, variable settings based on buffer pool size use the
buffer pool size value calculated according to the amount of
memory detected on the server rather than the explicitly defined
buffer pool size value.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
Automatic configuration settings are applied by
<code class="option">
--innodb-dedicated-server
</code>
<span class="emphasis">
<em>
only
</em>
</span>
when the MySQL server is started. If
you later set any of the affected variables explicitly, this
overrides its predetermined value, and the value that was
explicitly set is applied. Setting one of these variables to
<code class="literal">
DEFAULT
</code>
causes it to be set to the actual
default value as shown in the variable's description in the
Manual, and does
<span class="emphasis">
<em>
not
</em>
</span>
cause it to revert to
the value set by
<code class="option">
--innodb-dedicated-server
</code>
. The
corresponding system variable
<code class="literal">
innodb_dedicated_server
</code>
is changed only by
starting the server with
<code class="option">
--innodb-dedicated-server
</code>
(or with
<code class="option">
--innodb-dedicated-server=ON
</code>
or
<code class="option">
--innodb-dedicated-server=OFF
</code>
); it is otherwise
read-only.
</p>
</div>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/sys-ps-truncate-all-tables.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title">
<a name="sys-ps-truncate-all-tables">
</a>
30.4.4.24 The ps_truncate_all_tables() Procedure
</h4>
</div>
</div>
</div>
<a class="indexterm" name="idm46045061228960">
</a>
<a class="indexterm" name="idm46045061227456">
</a>
<p>
Truncates all Performance Schema summary tables, resetting all
aggregated instrumentation as a snapshot. Produces a result
set indicating how many tables were truncated.
</p>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h5 class="title">
<a name="sys-ps-truncate-all-tables-parameters">
</a>
Parameters
</h5>
</div>
</div>
</div>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<code class="literal">
in_verbose BOOLEAN
</code>
: Whether to
display each
<a class="link" href="truncate-table.html" title="15.1.37 TRUNCATE TABLE Statement">
<code class="literal">
TRUNCATE
TABLE
</code>
</a>
statement before executing it.
</p>
</li>
</ul>
</div>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h5 class="title">
<a name="sys-ps-truncate-all-tables-example">
</a>
Example
</h5>
</div>
</div>
</div>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa37494231"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">CALL</span> sys<span class="token punctuation">.</span>ps_truncate_all_tables<span class="token punctuation">(</span><span class="token boolean">FALSE</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> summary <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Truncated 49 tables <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
</div>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/history.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a name="history">
</a>
1.2.3 History of MySQL
</h3>
</div>
</div>
</div>
<a class="indexterm" name="idm46045335068544">
</a>
<a class="indexterm" name="idm46045335067536">
</a>
<a class="indexterm" name="idm46045335066528">
</a>
<a class="indexterm" name="idm46045335065520">
</a>
<a class="indexterm" name="idm46045335064128">
</a>
<a class="indexterm" name="idm46045335063120">
</a>
<p>
We started out with the intention of using the
<code class="literal">
mSQL
</code>
database system to connect to our tables
using our own fast low-level (ISAM) routines. However, after some
testing, we came to the conclusion that
<code class="literal">
mSQL
</code>
was not fast enough or flexible enough for our needs. This
resulted in a new SQL interface to our database but with almost
the same API interface as
<code class="literal">
mSQL
</code>
. This API was
designed to enable third-party code that was written for use with
<code class="literal">
mSQL
</code>
to be ported easily for use with MySQL.
</p>
<p>
MySQL is named after co-founder Monty Widenius's daughter, My.
</p>
<p>
The name of the MySQL Dolphin (our logo) is
<span class="quote">
“
<span class="quote">
Sakila,
</span>
”
</span>
which was chosen from a huge list of names suggested by users in
our
<span class="quote">
“
<span class="quote">
Name the Dolphin
</span>
”
</span>
contest. The winning name was
submitted by Ambrose Twebaze, an Open Source software developer
from Eswatini (formerly Swaziland), Africa. According to Ambrose,
the feminine name Sakila has its roots in SiSwati, the local
language of Eswatini. Sakila is also the name of a town in Arusha,
Tanzania, near Ambrose's country of origin, Uganda.
</p>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/myisamchk-memory.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title">
<a name="myisamchk-memory">
</a>
6.6.4.6 myisamchk Memory Usage
</h4>
</div>
</div>
</div>
<a class="indexterm" name="idm46045306582864">
</a>
<p>
Memory allocation is important when you run
<a class="link" href="myisamchk.html" title="6.6.4 myisamchk — MyISAM Table-Maintenance Utility">
<span class="command">
<strong>
myisamchk
</strong>
</span>
</a>
.
<a class="link" href="myisamchk.html" title="6.6.4 myisamchk — MyISAM Table-Maintenance Utility">
<span class="command">
<strong>
myisamchk
</strong>
</span>
</a>
uses
no more memory than its memory-related variables are set to. If
you are going to use
<a class="link" href="myisamchk.html" title="6.6.4 myisamchk — MyISAM Table-Maintenance Utility">
<span class="command">
<strong>
myisamchk
</strong>
</span>
</a>
on very large
tables, you should first decide how much memory you want it to
use. The default is to use only about 3MB to perform repairs. By
using larger values, you can get
<a class="link" href="myisamchk.html" title="6.6.4 myisamchk — MyISAM Table-Maintenance Utility">
<span class="command">
<strong>
myisamchk
</strong>
</span>
</a>
to
operate faster. For example, if you have more than 512MB RAM
available, you could use options such as these (in addition to
any other options you might specify):
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-terminal"><div class="docs-select-all right" id="sa91812956"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">myisamchk <span class="token constant">--myisam_sort_buffer_size</span><span class="token attr-value"><span class="token punctuation">=</span>256M</span> \
<span class="token constant">--key_buffer_size</span><span class="token attr-value"><span class="token punctuation">=</span>512M</span> \
<span class="token constant">--read_buffer_size</span><span class="token attr-value"><span class="token punctuation">=</span>64M</span> \
<span class="token constant">--write_buffer_size</span><span class="token attr-value"><span class="token punctuation">=</span>64M</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span></code></pre>
</div>
<p>
Using
<code class="option">
--myisam_sort_buffer_size=16M
</code>
is probably
enough for most cases.
</p>
<p>
Be aware that
<a class="link" href="myisamchk.html" title="6.6.4 myisamchk — MyISAM Table-Maintenance Utility">
<span class="command">
<strong>
myisamchk
</strong>
</span>
</a>
uses temporary files
in
<code class="literal">
TMPDIR
</code>
. If
<code class="literal">
TMPDIR
</code>
points to a memory file system, out of memory errors can easily
occur. If this happens, run
<a class="link" href="myisamchk.html" title="6.6.4 myisamchk — MyISAM Table-Maintenance Utility">
<span class="command">
<strong>
myisamchk
</strong>
</span>
</a>
with
the
<a class="link" href="myisamchk-repair-options.html#option_myisamchk_tmpdir">
<code class="option">
--tmpdir=
<em class="replaceable">
<code>
dir_name
</code>
</em>
</code>
</a>
option to specify a directory located on a file system that has
more space.
</p>
<p>
When performing repair operations,
<a class="link" href="myisamchk.html" title="6.6.4 myisamchk — MyISAM Table-Maintenance Utility">
<span class="command">
<strong>
myisamchk
</strong>
</span>
</a>
also needs a lot of disk space:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
Twice the size of the data file (the original file and a
copy). This space is not needed if you do a repair with
<a class="link" href="myisamchk-repair-options.html#option_myisamchk_quick">
<code class="option">
--quick
</code>
</a>
; in this case,
only the index file is re-created.
<span class="emphasis">
<em>
This space must
be available on the same file system as the original data
file
</em>
</span>
, as the copy is created in the same
directory as the original.
</p>
</li>
<li class="listitem">
<p>
Space for the new index file that replaces the old one. The
old index file is truncated at the start of the repair
operation, so you usually ignore this space. This space must
be available on the same file system as the original data
file.
</p>
</li>
<li class="listitem">
<p>
When using
<a class="link" href="myisamchk-repair-options.html#option_myisamchk_recover">
<code class="option">
--recover
</code>
</a>
or
<a class="link" href="myisamchk-repair-options.html#option_myisamchk_sort-recover">
<code class="option">
--sort-recover
</code>
</a>
(but not
when using
<a class="link" href="myisamchk-repair-options.html#option_myisamchk_safe-recover">
<code class="option">
--safe-recover
</code>
</a>
), you need
space on disk for sorting. This space is allocated in the
temporary directory (specified by
<code class="literal">
TMPDIR
</code>
or
<a class="link" href="myisamchk-repair-options.html#option_myisamchk_tmpdir">
<code class="option">
--tmpdir=
<em class="replaceable">
<code>
dir_name
</code>
</em>
</code>
</a>
).
The following formula yields the amount of space required:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-clike"><div class="docs-select-all right" id="sa34159575"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-clike"><span class="token punctuation">(</span><em class="replaceable">largest_key</em> <span class="token operator">+</span> <em class="replaceable">row_pointer_length</em><span class="token punctuation">)</span> <span class="token operator">*</span> <em class="replaceable">number_of_rows</em> <span class="token operator">*</span> <span class="token number">2</span></code></pre>
</div>
<p>
You can check the length of the keys and the
<em class="replaceable">
<code>
row_pointer_length
</code>
</em>
with
<a class="link" href="myisamchk.html" title="6.6.4 myisamchk — MyISAM Table-Maintenance Utility">
<span class="command">
<strong>
myisamchk -dv
<em class="replaceable">
<code>
tbl_name
</code>
</em>
</strong>
</span>
</a>
(see
<a class="xref" href="myisamchk-table-info.html" title="6.6.4.5 Obtaining Table Information with myisamchk">
Section 6.6.4.5, “Obtaining Table Information with myisamchk”
</a>
). The
<em class="replaceable">
<code>
row_pointer_length
</code>
</em>
and
<em class="replaceable">
<code>
number_of_rows
</code>
</em>
values are the
<code class="literal">
Datafile pointer
</code>
and
<code class="literal">
Data
records
</code>
values in the table description. To
determine the
<em class="replaceable">
<code>
largest_key
</code>
</em>
value,
check the
<code class="literal">
Key
</code>
lines in the table
description. The
<code class="literal">
Len
</code>
column indicates the
number of bytes for each key part. For a multiple-column
index, the key size is the sum of the
<code class="literal">
Len
</code>
values for all key parts.
</p>
</li>
</ul>
</div>
<p>
If you have a problem with disk space during repair, you can try
<a class="link" href="myisamchk-repair-options.html#option_myisamchk_safe-recover">
<code class="option">
--safe-recover
</code>
</a>
instead of
<a class="link" href="myisamchk-repair-options.html#option_myisamchk_recover">
<code class="option">
--recover
</code>
</a>
.
</p>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/mysql-cluster-options-variables.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title">
<a name="mysql-cluster-options-variables">
</a>
25.4.3.9 MySQL Server Options and Variables for NDB Cluster
</h4>
</div>
</div>
</div>
<a class="indexterm" name="idm46045113948288">
</a>
<a class="indexterm" name="idm46045113946832">
</a>
<p>
This section provides information about MySQL server options, server
and status variables that are specific to NDB Cluster. For general
information on using these, and for other options and variables not
specific to NDB Cluster, see
<a class="xref" href="mysqld-server.html" title="7.1 The MySQL Server">
Section 7.1, “The MySQL Server”
</a>
.
</p>
<p>
For NDB Cluster configuration parameters used in the cluster
configuration file (usually named
<code class="filename">
config.ini
</code>
),
see
<a class="xref" href="mysql-cluster-configuration.html" title="25.4 Configuration of NDB Cluster">
Section 25.4, “Configuration of NDB Cluster”
</a>
.
</p>
<div class="section">
<div class="titlepage">
<div>
<div>
<h5 class="title">
<a name="mysql-cluster-program-options-mysqld">
</a>
25.4.3.9.1 MySQL Server Options for NDB Cluster
</h5>
</div>
</div>
</div>
<a class="indexterm" name="idm46045113940144">
</a>
<a class="indexterm" name="idm46045113938656">
</a>
<a class="indexterm" name="idm46045113937168">
</a>
<a class="indexterm" name="idm46045113935664">
</a>
<a class="indexterm" name="idm46045113934176">
</a>
<p>
This section provides descriptions of
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
server options relating to NDB Cluster. For information about
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
options not specific to NDB Cluster, and
for general information about the use of options with
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
, see
<a class="xref" href="server-options.html" title="7.1.7 Server Command Options">
Section 7.1.7, “Server Command Options”
</a>
.
</p>
<p>
For information about command-line options used with other NDB
Cluster processes, see
<a class="xref" href="mysql-cluster-programs.html" title="25.5 NDB Cluster Programs">
Section 25.5, “NDB Cluster Programs”
</a>
.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<a name="option_mysqld_ndbcluster">
</a>
<a class="link" href="mysql-cluster-options-variables.html#option_mysqld_ndbcluster">
<code class="option">
--ndbcluster
</code>
</a>
</p>
<a class="indexterm" name="idm46045113924176">
</a>
<a class="indexterm" name="idm46045113922688">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndbcluster">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndbcluster[=value]
</code>
</td>
</tr>
<tr>
<th>
Disabled by
</th>
<td>
<code class="literal">
skip-ndbcluster
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Enumeration
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
ON
</code>
</td>
</tr>
<tr>
<th>
Valid Values
</th>
<td>
<p class="valid-value">
<code class="literal">
OFF
</code>
</p>
<p class="valid-value">
<code class="literal">
FORCE
</code>
</p>
</td>
</tr>
</tbody>
</table>
</div>
<p>
The
<a class="link" href="mysql-cluster.html" title="Chapter 25 MySQL NDB Cluster 8.4">
<code class="literal">
NDBCLUSTER
</code>
</a>
storage engine is
necessary for using NDB Cluster. If a
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
binary includes support for the
<a class="link" href="mysql-cluster.html" title="Chapter 25 MySQL NDB Cluster 8.4">
<code class="literal">
NDBCLUSTER
</code>
</a>
storage engine, the
engine is disabled by default. Use the
<a class="link" href="mysql-cluster-options-variables.html#option_mysqld_ndbcluster">
<code class="option">
--ndbcluster
</code>
</a>
option to enable
it. Use
<code class="option">
--skip-ndbcluster
</code>
to explicitly
disable the engine.
</p>
<p>
The
<code class="option">
--ndbcluster
</code>
option is ignored (and the
<code class="literal">
NDB
</code>
storage engine is
<span class="emphasis">
<em>
not
</em>
</span>
enabled) if
<a class="link" href="server-options.html#option_mysqld_initialize">
<code class="option">
--initialize
</code>
</a>
is also used. (It
is neither necessary nor desirable to use this option together
with
<code class="option">
--initialize
</code>
.)
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqld_ndb-allow-copying-alter-table">
</a>
<code class="option">
--ndb-allow-copying-alter-table=[ON|OFF]
</code>
</p>
<a class="indexterm" name="idm46045113893984">
</a>
<a class="indexterm" name="idm46045113892528">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb-allow-copying-alter-table">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-allow-copying-alter-table[={OFF|ON}]
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
ndb_allow_copying_alter_table
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global, Session
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
ON
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Let
<a class="link" href="alter-table.html" title="15.1.9 ALTER TABLE Statement">
<code class="literal">
ALTER TABLE
</code>
</a>
and other DDL
statements use copying operations on
<code class="literal">
NDB
</code>
tables. Set to
<code class="literal">
OFF
</code>
to keep this from
happening; doing so may improve performance of critical
applications.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqld_ndb-applier-allow-skip-epoch">
</a>
<code class="option">
--ndb-applier-allow-skip-epoch
</code>
</p>
<a class="indexterm" name="idm46045113866496">
</a>
<a class="indexterm" name="idm46045113864992">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb-applier-allow-skip-epoch">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-applier-allow-skip-epoch
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
ndb_applier_allow_skip_epoch
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
No
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
</tbody>
</table>
</div>
<p>
Use together with
<a class="link" href="replication-options-replica.html#sysvar_replica_skip_errors">
<code class="option">
--replica-skip-errors
</code>
</a>
to cause
<code class="literal">
NDB
</code>
to ignore skipped epoch transactions.
Has no effect when used alone.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqld_ndb-batch-size">
</a>
<code class="option">
--ndb-batch-size=
<em class="replaceable">
<code>
#
</code>
</em>
</code>
</p>
<a class="indexterm" name="idm46045113844304">
</a>
<a class="indexterm" name="idm46045113842816">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb-batch-size">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-batch-size
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
ndb_batch_size
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global, Session
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
32768
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
2147483648
</code>
</td>
</tr>
<tr>
<th>
Unit
</th>
<td>
bytes
</td>
</tr>
</tbody>
</table>
</div>
<p>
This sets the size in bytes that is used for NDB transaction
batches.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqld_ndb-cluster-connection-pool">
</a>
<code class="option">
--ndb-cluster-connection-pool=
<em class="replaceable">
<code>
#
</code>
</em>
</code>
</p>
<a class="indexterm" name="idm46045113812336">
</a>
<a class="indexterm" name="idm46045113810832">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb-cluster-connection-pool">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-cluster-connection-pool
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
ndb_cluster_connection_pool
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
ndb_cluster_connection_pool
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
No
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
1
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
1
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
63
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
By setting this option to a value greater than 1 (the
default), a
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
process can use multiple
connections to the cluster, effectively mimicking several SQL
nodes. Each connection requires its own
<code class="literal">
[api]
</code>
or
<code class="literal">
[mysqld]
</code>
section in the cluster configuration
(
<code class="filename">
config.ini
</code>
) file, and counts against the
maximum number of API connections supported by the cluster.
</p>
<p>
Suppose that you have 2 cluster host computers, each running
an SQL node whose
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
process was
started with
<code class="option">
--ndb-cluster-connection-pool=4
</code>
;
this means that the cluster must have 8 API slots available
for these connections (instead of 2). All of these connections
are set up when the SQL node connects to the cluster, and are
allocated to threads in a round-robin fashion.
</p>
<p>
This option is useful only when running
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
on host machines having multiple
CPUs, multiple cores, or both. For best results, the value
should be smaller than the total number of cores available on
the host machine. Setting it to a value greater than this is
likely to degrade performance severely.
</p>
<div class="important" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Important
</div>
<p>
Because each SQL node using connection pooling occupies
multiple API node slots—each slot having its own node
ID in the cluster—you must
<span class="emphasis">
<em>
not
</em>
</span>
use a node ID as part of the cluster connection string when
starting any
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
process that employs
connection pooling.
</p>
<p>
Setting a node ID in the connection string when using the
<code class="option">
--ndb-cluster-connection-pool
</code>
option causes
node ID allocation errors when the SQL node attempts to
connect to the cluster.
</p>
</div>
</li>
<li class="listitem">
<p>
<a name="option_mysqld_ndb-cluster-connection-pool-nodeids">
</a>
<code class="option">
--ndb-cluster-connection-pool-nodeids=
<em class="replaceable">
<code>
list
</code>
</em>
</code>
</p>
<a class="indexterm" name="idm46045113760672">
</a>
<a class="indexterm" name="idm46045113759216">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb-cluster-connection-pool-nodeids">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-cluster-connection-pool-nodeids
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
ndb_cluster_connection_pool_nodeids
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
No
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Set
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Specifies a comma-separated list of node IDs for connections
to the cluster used by an SQL node. The number of nodes in
this list must be the same as the value set for the
<a class="link" href="mysql-cluster-options-variables.html#option_mysqld_ndb-cluster-connection-pool">
<code class="option">
--ndb-cluster-connection-pool
</code>
</a>
option.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqld_ndb-blob-read-batch-bytes">
</a>
<code class="option">
--ndb-blob-read-batch-bytes=
<em class="replaceable">
<code>
bytes
</code>
</em>
</code>
</p>
<a class="indexterm" name="idm46045113734608">
</a>
<a class="indexterm" name="idm46045113733104">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb-blob-read-batch-bytes">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-blob-read-batch-bytes
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
ndb_blob_read_batch_bytes
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global, Session
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
65536
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
4294967295
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
This option can be used to set the size (in bytes) for
batching of
<a class="link" href="blob.html" title="13.3.4 The BLOB and TEXT Types">
<code class="literal">
BLOB
</code>
</a>
data reads in
NDB Cluster applications. When this batch size is exceeded by
the amount of
<a class="link" href="blob.html" title="13.3.4 The BLOB and TEXT Types">
<code class="literal">
BLOB
</code>
</a>
data to be
read within the current transaction, any pending
<a class="link" href="blob.html" title="13.3.4 The BLOB and TEXT Types">
<code class="literal">
BLOB
</code>
</a>
read operations are
immediately executed.
</p>
<p>
The maximum value for this option is 4294967295; the default
is 65536. Setting it to 0 has the effect of disabling
<a class="link" href="blob.html" title="13.3.4 The BLOB and TEXT Types">
<code class="literal">
BLOB
</code>
</a>
read batching.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
In NDB API applications, you can control
<a class="link" href="blob.html" title="13.3.4 The BLOB and TEXT Types">
<code class="literal">
BLOB
</code>
</a>
write batching with the
<a class="ulink" href="/doc/ndbapi/en/ndb-ndbtransaction.html#ndb-ndbtransaction-setmaxpendingblobreadbytes" target="_top">
<code class="literal">
setMaxPendingBlobReadBytes()
</code>
</a>
and
<a class="ulink" href="/doc/ndbapi/en/ndb-ndbtransaction.html#ndb-ndbtransaction-getmaxpendingblobreadbytes" target="_top">
<code class="literal">
getMaxPendingBlobReadBytes()
</code>
</a>
methods.
</p>
</div>
</li>
<li class="listitem">
<p>
<a name="option_mysqld_ndb-blob-write-batch-bytes">
</a>
<code class="option">
--ndb-blob-write-batch-bytes=
<em class="replaceable">
<code>
bytes
</code>
</em>
</code>
</p>
<a class="indexterm" name="idm46045113694304">
</a>
<a class="indexterm" name="idm46045113692800">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb-blob-write-batch-bytes">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-blob-write-batch-bytes
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
ndb_blob_write_batch_bytes
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global, Session
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
65536
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
4294967295
</code>
</td>
</tr>
<tr>
<th>
Unit
</th>
<td>
bytes
</td>
</tr>
</tbody>
</table>
</div>
<p>
This option can be used to set the size (in bytes) for
batching of
<a class="link" href="blob.html" title="13.3.4 The BLOB and TEXT Types">
<code class="literal">
BLOB
</code>
</a>
data writes in
NDB Cluster applications. When this batch size is exceeded by
the amount of
<a class="link" href="blob.html" title="13.3.4 The BLOB and TEXT Types">
<code class="literal">
BLOB
</code>
</a>
data to be
written within the current transaction, any pending
<a class="link" href="blob.html" title="13.3.4 The BLOB and TEXT Types">
<code class="literal">
BLOB
</code>
</a>
write operations are
immediately executed.
</p>
<p>
The maximum value for this option is 4294967295; the default
is 65536. Setting it to 0 has the effect of disabling
<a class="link" href="blob.html" title="13.3.4 The BLOB and TEXT Types">
<code class="literal">
BLOB
</code>
</a>
write batching.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
In NDB API applications, you can control
<a class="link" href="blob.html" title="13.3.4 The BLOB and TEXT Types">
<code class="literal">
BLOB
</code>
</a>
write batching with the
<a class="ulink" href="/doc/ndbapi/en/ndb-ndbtransaction.html#ndb-ndbtransaction-setmaxpendingblobwritebytes" target="_top">
<code class="literal">
setMaxPendingBlobWriteBytes()
</code>
</a>
and
<a class="ulink" href="/doc/ndbapi/en/ndb-ndbtransaction.html#ndb-ndbtransaction-getmaxpendingblobwritebytes" target="_top">
<code class="literal">
getMaxPendingBlobWriteBytes()
</code>
</a>
methods.
</p>
</div>
</li>
<li class="listitem">
<p>
<a name="option_mysqld_ndb-connectstring">
</a>
<code class="option">
--ndb-connectstring=
<em class="replaceable">
<code>
connection_string
</code>
</em>
</code>
</p>
<a class="indexterm" name="idm46045113652016">
</a>
<a class="indexterm" name="idm46045113650560">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb-connectstring">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-connectstring
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<p>
When using the
<a class="link" href="mysql-cluster.html" title="Chapter 25 MySQL NDB Cluster 8.4">
<code class="literal">
NDBCLUSTER
</code>
</a>
storage
engine, this option specifies the management server that
distributes cluster configuration data. See
<a class="xref" href="mysql-cluster-connection-strings.html" title="25.4.3.3 NDB Cluster Connection Strings">
Section 25.4.3.3, “NDB Cluster Connection Strings”
</a>
, for
syntax.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqld_ndb-default-column-format">
</a>
<code class="option">
--ndb-default-column-format=[FIXED|DYNAMIC]
</code>
</p>
<a class="indexterm" name="idm46045113637312">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb-default-column-format">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-default-column-format={FIXED|DYNAMIC}
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_default_column_format">
ndb_default_column_format
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Enumeration
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
FIXED
</code>
</td>
</tr>
<tr>
<th>
Valid Values
</th>
<td>
<p class="valid-value">
<code class="literal">
FIXED
</code>
</p>
<p class="valid-value">
<code class="literal">
DYNAMIC
</code>
</p>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Sets the default
<code class="literal">
COLUMN_FORMAT
</code>
and
<code class="literal">
ROW_FORMAT
</code>
for new tables (see
<a class="xref" href="create-table.html" title="15.1.20 CREATE TABLE Statement">
Section 15.1.20, “CREATE TABLE Statement”
</a>
). The default is
<code class="literal">
FIXED
</code>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqld_ndb-deferred-constraints">
</a>
<code class="option">
--ndb-deferred-constraints=[0|1]
</code>
</p>
<a class="indexterm" name="idm46045113607264">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb-deferred-constraints">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-deferred-constraints
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_deferred_constraints">
ndb_deferred_constraints
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global, Session
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
1
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Controls whether or not constraint checks on unique indexes
are deferred until commit time, where such checks are
supported.
<code class="literal">
0
</code>
is the default.
</p>
<p>
This option is not normally needed for operation of NDB
Cluster or NDB Cluster Replication, and is intended primarily
for use in testing.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqld_ndb-schema-dist-timeout">
</a>
<code class="option">
--ndb-schema-dist-timeout=#
</code>
</p>
<a class="indexterm" name="idm46045113577664">
</a>
<a class="indexterm" name="idm46045113576160">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb-schema-dist-timeout">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-schema-dist-timeout=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_schema_dist_timeout">
ndb_schema_dist_timeout
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
No
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
120
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
5
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
1200
</code>
</td>
</tr>
<tr>
<th>
Unit
</th>
<td>
seconds
</td>
</tr>
</tbody>
</table>
</div>
<p>
Specifies the maximum time in seconds that this
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
waits for a schema operation to
complete before marking it as having timed out.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqld_ndb-distribution">
</a>
<code class="option">
--ndb-distribution=[KEYHASH|LINHASH]
</code>
</p>
<a class="indexterm" name="idm46045113544160">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb-distribution">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-distribution={KEYHASH|LINHASH}
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_distribution">
ndb_distribution
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Enumeration
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
KEYHASH
</code>
</td>
</tr>
<tr>
<th>
Valid Values
</th>
<td>
<p class="valid-value">
<code class="literal">
LINHASH
</code>
</p>
<p class="valid-value">
<code class="literal">
KEYHASH
</code>
</p>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Controls the default distribution method for
<a class="link" href="mysql-cluster.html" title="Chapter 25 MySQL NDB Cluster 8.4">
<code class="literal">
NDB
</code>
</a>
tables. Can be set to either
of
<code class="literal">
KEYHASH
</code>
(key hashing) or
<code class="literal">
LINHASH
</code>
(linear hashing).
<code class="literal">
KEYHASH
</code>
is the default.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqld_ndb-log-apply-status">
</a>
<code class="option">
--ndb-log-apply-status
</code>
</p>
<a class="indexterm" name="idm46045113513584">
</a>
<a class="indexterm" name="idm46045113512096">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb-log-apply-status">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-log-apply-status[={OFF|ON}]
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_log_apply_status">
ndb_log_apply_status
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
No
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
OFF
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Causes a replica
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
to log any updates
received from its immediate source to the
<code class="literal">
mysql.ndb_apply_status
</code>
table in its own
binary log using its own server ID rather than the server ID
of the source. In a circular or chain replication setting,
this allows such updates to propagate to the
<code class="literal">
mysql.ndb_apply_status
</code>
tables of any MySQL
servers configured as replicas of the current
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
.
</p>
<p>
In a chain replication setup, using this option allows
downstream (replica) clusters to be aware of their positions
relative to all of their upstream contributors (sourcess).
</p>
<p>
In a circular replication setup, this option causes changes to
<code class="literal">
ndb_apply_status
</code>
tables to complete the
entire circuit, eventually propagating back to the originating
NDB Cluster. This also allows a cluster acting as a
replication source to see when its changes (epochs) have been
applied to the other clusters in the circle.
</p>
<p>
This option has no effect unless the MySQL server is started
with the
<a class="link" href="mysql-cluster-options-variables.html#option_mysqld_ndbcluster">
<code class="option">
--ndbcluster
</code>
</a>
option.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqld_ndb-log-empty-epochs">
</a>
<code class="option">
--ndb-log-empty-epochs=[ON|OFF]
</code>
</p>
<a class="indexterm" name="idm46045113480656">
</a>
<a class="indexterm" name="idm46045113479168">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb-log-empty-epochs">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-log-empty-epochs[={OFF|ON}]
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_log_empty_epochs">
ndb_log_empty_epochs
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
OFF
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Causes epochs during which there were no changes to be written
to the
<code class="literal">
ndb_apply_status
</code>
and
<code class="literal">
ndb_binlog_index
</code>
tables, even when
<a class="link" href="replication-options-binary-log.html#sysvar_log_replica_updates">
<code class="literal">
log_replica_updates
</code>
</a>
is
enabled.
</p>
<p>
By default this option is disabled. Disabling
<code class="option">
--ndb-log-empty-epochs
</code>
causes epoch
transactions with no changes not to be written to the binary
log, although a row is still written even for an empty epoch
in
<code class="literal">
ndb_binlog_index
</code>
.
</p>
<p>
Because
<code class="option">
--ndb-log-empty-epochs=1
</code>
causes the
size of the
<code class="literal">
ndb_binlog_index
</code>
table to
increase independently of the size of the binary log, users
should be prepared to manage the growth of this table, even if
they expect the cluster to be idle a large part of the time.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqld_ndb-log-empty-update">
</a>
<code class="option">
--ndb-log-empty-update=[ON|OFF]
</code>
</p>
<a class="indexterm" name="idm46045113449056">
</a>
<a class="indexterm" name="idm46045113447568">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb-log-empty-update">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-log-empty-update[={OFF|ON}]
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_log_empty_update">
ndb_log_empty_update
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
OFF
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Causes updates that produced no changes to be written to the
<code class="literal">
ndb_apply_status
</code>
and
<code class="literal">
ndb_binlog_index
</code>
tables, even when
<a class="link" href="replication-options-binary-log.html#sysvar_log_replica_updates">
<code class="literal">
log_replica_updates
</code>
</a>
is
enabled.
</p>
<p>
By default this option is disabled (
<code class="literal">
OFF
</code>
).
Disabling
<code class="option">
--ndb-log-empty-update
</code>
causes
updates with no changes not to be written to the binary log.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqld_ndb-log-exclusive-reads">
</a>
<code class="option">
--ndb-log-exclusive-reads=[0|1]
</code>
</p>
<a class="indexterm" name="idm46045113419456">
</a>
<a class="indexterm" name="idm46045113417968">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb-log-exclusive-reads">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-log-exclusive-reads[={OFF|ON}]
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_log_exclusive_reads">
ndb_log_exclusive_reads
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global, Session
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Starting the server with this option causes primary key reads
to be logged with exclusive locks, which allows for NDB
Cluster Replication conflict detection and resolution based on
read conflicts. You can also enable and disable these locks at
runtime by setting the value of the
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_log_exclusive_reads">
<code class="literal">
ndb_log_exclusive_reads
</code>
</a>
system variable to 1 or 0, respectively. 0 (disable locking)
is the default.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-replication-conflict-resolution.html#conflict-resolution-read-conflicts" title="Read conflict detection and resolution">
Read conflict detection and resolution
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqld_ndb-log-fail-terminate">
</a>
<code class="option">
--ndb-log-fail-terminate
</code>
</p>
<a class="indexterm" name="idm46045113391296">
</a>
<a class="indexterm" name="idm46045113389808">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb-log-fail-terminate">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-log-fail-terminate
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
ndb_log_fail_terminate
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
No
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
FALSE
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
When this option is specified, and complete logging of all
found row events is not possible, the
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
process is terminated.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqld_ndb-log-orig">
</a>
<code class="option">
--ndb-log-orig
</code>
</p>
<a class="indexterm" name="idm46045113365264">
</a>
<a class="indexterm" name="idm46045113363776">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb-log-orig">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-log-orig[={OFF|ON}]
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_log_orig">
ndb_log_orig
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
No
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
OFF
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Log the originating server ID and epoch in the
<code class="literal">
ndb_binlog_index
</code>
table.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
This makes it possible for a given epoch to have multiple
rows in
<code class="literal">
ndb_binlog_index
</code>
, one for each
originating epoch.
</p>
</div>
<p>
For more information, see
<a class="xref" href="mysql-cluster-replication-schema.html" title="25.7.4 NDB Cluster Replication Schema and Tables">
Section 25.7.4, “NDB Cluster Replication Schema and Tables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqld_ndb-log-transaction-dependency">
</a>
<code class="option">
--ndb-log-transaction-dependency
</code>
</p>
<a class="indexterm" name="idm46045113336544">
</a>
<a class="indexterm" name="idm46045113335040">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb-log-transaction-dependency">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-log-transaction-dependency={true|false}
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
ndb_log_transaction_dependency
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
No
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
false
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Causes the
<code class="literal">
NDB
</code>
binary logging thread to
calculate transaction dependencies for each transaction which
it writes to the binary log. The default value is
<code class="literal">
FALSE
</code>
.
</p>
<p>
This option cannot be set at runtime; the corresponding
<code class="literal">
ndb_log_transaction_dependency
</code>
system
variable is read-only.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqld_ndb-log-transaction-id">
</a>
<code class="option">
--ndb-log-transaction-id
</code>
</p>
<a class="indexterm" name="idm46045113309024">
</a>
<a class="indexterm" name="idm46045113307536">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb-log-transaction-id">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-log-transaction-id[={OFF|ON}]
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_log_transaction_id">
ndb_log_transaction_id
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
No
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
OFF
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Causes a replica
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
to write the NDB
transaction ID in each row of the binary log. The default
value is
<code class="literal">
FALSE
</code>
.
</p>
<p>
<code class="option">
--ndb-log-transaction-id
</code>
is required to
enable NDB Cluster Replication conflict detection and
resolution using the
<code class="literal">
NDB$EPOCH_TRANS()
</code>
function (see
<a class="xref" href="mysql-cluster-replication-conflict-resolution.html#mysql-cluster-replication-ndb-epoch-trans" title="NDB$EPOCH_TRANS()">
NDB$EPOCH_TRANS()
</a>
).
For more information, see
<a class="xref" href="mysql-cluster-replication-conflict-resolution.html" title="25.7.12 NDB Cluster Replication Conflict Resolution">
Section 25.7.12, “NDB Cluster Replication Conflict Resolution”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqld_ndb-log-update-as-write">
</a>
<code class="option">
--ndb-log-update-as-write
</code>
</p>
<a class="indexterm" name="idm46045113278448">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb-log-update-as-write">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-log-update-as-write[={OFF|ON}]
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
ndb_log_update_as_write
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
ON
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Whether updates on the source are written to the binary log as
updates (
<code class="literal">
OFF
</code>
) or writes
(
<code class="literal">
ON
</code>
). When this option is enabled, and both
<a class="link" href="mysql-cluster-options-variables.html#option_mysqld_ndb-log-updated-only">
<code class="option">
--ndb-log-updated-only
</code>
</a>
and
<a class="link" href="mysql-cluster-options-variables.html#option_mysqld_ndb-log-update-minimal">
<code class="option">
--ndb-log-update-minimal
</code>
</a>
are
disabled, operations of different types are loǵged as
described in the following list:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
<code class="literal">
INSERT
</code>
: Logged as a
<code class="literal">
WRITE_ROW
</code>
event with no before image;
the after image is logged with all columns.
</p>
<p>
<code class="literal">
UPDATE
</code>
: Logged as a
<code class="literal">
WRITE_ROW
</code>
event with no before image;
the after image is logged with all columns.
</p>
<p>
<code class="literal">
DELETE
</code>
: Logged as a
<code class="literal">
DELETE_ROW
</code>
event with all columns
logged in the before image; the after image is not logged.
</p>
</li>
</ul>
</div>
<p>
This option can be used for NDB Replication conflict
resolution in combination with the other two NDB logging
options mentioned previously; see
<a class="xref" href="mysql-cluster-replication-schema.html#ndb-replication-ndb-replication" title="ndb_replication Table">
ndb_replication Table
</a>
, for more
information.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqld_ndb-log-updated-only">
</a>
<code class="option">
--ndb-log-updated-only
</code>
</p>
<a class="indexterm" name="idm46045113243936">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb-log-updated-only">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-log-updated-only[={OFF|ON}]
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
ndb_log_updated_only
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
ON
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Whether
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
writes updates only
(
<code class="literal">
ON
</code>
) or complete rows
(
<code class="literal">
OFF
</code>
) to the binary log. When this option
is enabled, and both
<a class="link" href="mysql-cluster-options-variables.html#option_mysqld_ndb-log-update-as-write">
<code class="option">
--ndb-log-update-as-write
</code>
</a>
and
<a class="link" href="mysql-cluster-options-variables.html#option_mysqld_ndb-log-update-minimal">
<code class="option">
--ndb-log-update-minimal
</code>
</a>
are
disabled, operations of different types are loǵged as
described in the following list:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
<code class="literal">
INSERT
</code>
: Logged as a
<code class="literal">
WRITE_ROW
</code>
event with no before image;
the after image is logged with all columns.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
UPDATE
</code>
: Logged as an
<code class="literal">
UPDATE_ROW
</code>
event with primary key
columns and updated columns present in both the before and
after images.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
DELETE
</code>
: Logged as a
<code class="literal">
DELETE_ROW
</code>
event with primary key
columns incuded in the before image; the after image is
not logged.
</p>
</li>
</ul>
</div>
<p>
This option can be used for NDB Replication conflict
resolution in combination with the other two NDB logging
options mentioned previously; see
<a class="xref" href="mysql-cluster-replication-schema.html#ndb-replication-ndb-replication" title="ndb_replication Table">
ndb_replication Table
</a>
, for more
information about how these options interact with one another.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqld_ndb-log-update-minimal">
</a>
<code class="option">
--ndb-log-update-minimal
</code>
</p>
<a class="indexterm" name="idm46045113207568">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb-log-update-minimal">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-log-update-minimal[={OFF|ON}]
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
ndb_log_update_minimal
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
OFF
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Log updates in a minimal fashion, by writing only the primary
key values in the before image, and only the changed columns
in the after image. This may cause compatibility problems if
replicating to storage engines other than
<code class="literal">
NDB
</code>
. When this option is enabled, and both
<a class="link" href="mysql-cluster-options-variables.html#option_mysqld_ndb-log-updated-only">
<code class="option">
--ndb-log-updated-only
</code>
</a>
and
<a class="link" href="mysql-cluster-options-variables.html#option_mysqld_ndb-log-update-as-write">
<code class="option">
--ndb-log-update-as-write
</code>
</a>
are
disabled, operations of different types are loǵged as
described in the following list:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
<code class="literal">
INSERT
</code>
: Logged as a
<code class="literal">
WRITE_ROW
</code>
event with no before image;
the after image is logged with all columns.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
UPDATE
</code>
: Logged as an
<code class="literal">
UPDATE_ROW
</code>
event with primary key
columns in the before image; all columns
<span class="emphasis">
<em>
except
</em>
</span>
primary key columns are logged
in the after image.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
DELETE
</code>
: Logged as a
<code class="literal">
DELETE_ROW
</code>
event with all columns in
the before image; the after image is not logged.
</p>
</li>
</ul>
</div>
<p>
This option can be used for NDB Replication conflict
resolution in combination with the other two NDB logging
options mentioned previously; see
<a class="xref" href="mysql-cluster-replication-schema.html#ndb-replication-ndb-replication" title="ndb_replication Table">
ndb_replication Table
</a>
, for more
information.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqld_ndb-mgm-tls">
</a>
<code class="option">
--ndb-mgm-tls=[relaxed|strict]
</code>
</p>
<a class="indexterm" name="idm46045113172448">
</a>
<a class="indexterm" name="idm46045113170960">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb-mgm-tls">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-mgm-tls=[strict|relaxed]
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
ndb_mgm_tls
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
No
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Enumeration
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
relaxed
</code>
</td>
</tr>
<tr>
<th>
Valid Values
</th>
<td>
<p class="valid-value">
<code class="literal">
relaxed
</code>
</p>
<p class="valid-value">
<code class="literal">
strict
</code>
</p>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Sets the level of TLS support required for TLS connections to
NDB Cluster; the value is one of
<code class="literal">
relaxed
</code>
or
<code class="literal">
strict
</code>
.
<code class="literal">
relaxed
</code>
means
that a TLS connection is attempted, but success is not
required;
<code class="literal">
strict
</code>
means that TLS is required
to connect. The default is
<code class="literal">
relaxed
</code>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqld_ndb-mgmd-host">
</a>
<code class="option">
--ndb-mgmd-host=
<em class="replaceable">
<code>
host
</code>
</em>
[:
<em class="replaceable">
<code>
port
</code>
</em>
]
</code>
</p>
<a class="indexterm" name="idm46045113139360">
</a>
<a class="indexterm" name="idm46045113137872">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb-mgmd-host">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-mgmd-host=host_name[:port_num]
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
localhost:1186
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Can be used to set the host and port number of a single
management server for the program to connect to. If the
program requires node IDs or references to multiple management
servers (or both) in its connection information, use the
<a class="link" href="mysql-cluster-options-variables.html#option_mysqld_ndb-connectstring">
<code class="option">
--ndb-connectstring
</code>
</a>
option
instead.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqld_ndb-nodeid">
</a>
<code class="option">
--ndb-nodeid=#
</code>
</p>
<a class="indexterm" name="idm46045113123072">
</a>
<a class="indexterm" name="idm46045113121584">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb-nodeid">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-nodeid=#
</code>
</td>
</tr>
<tr>
<th>
Status Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_cluster_node_id">
Ndb_cluster_node_id
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
N/A
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
1
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
255
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
63
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Set this MySQL server's node ID in an NDB Cluster.
</p>
<p>
The
<code class="option">
--ndb-nodeid
</code>
option overrides any node ID
set with
<a class="link" href="mysql-cluster-options-variables.html#option_mysqld_ndb-connectstring">
<code class="option">
--ndb-connectstring
</code>
</a>
,
regardless of the order in which the two options are used.
</p>
<p>
In addition, if
<code class="option">
--ndb-nodeid
</code>
is used, then
either a matching node ID must be found in a
<code class="literal">
[mysqld]
</code>
or
<code class="literal">
[api]
</code>
section of
<code class="filename">
config.ini
</code>
, or there must be
an
<span class="quote">
“
<span class="quote">
open
</span>
”
</span>
<code class="literal">
[mysqld]
</code>
or
<code class="literal">
[api]
</code>
section in the file (that is, a
section without a
<code class="literal">
NodeId
</code>
or
<code class="literal">
Id
</code>
parameter specified). This is also true
if the node ID is specified as part of the connection string.
</p>
<p>
Regardless of how the node ID is determined, it is shown as
the value of the global status variable
<code class="literal">
Ndb_cluster_node_id
</code>
in the output of
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW STATUS
</code>
</a>
, and as
<code class="literal">
cluster_node_id
</code>
in the
<code class="literal">
connection
</code>
row of the output of
<a class="link" href="show-engine.html" title="15.7.7.16 SHOW ENGINE Statement">
<code class="literal">
SHOW ENGINE
NDBCLUSTER STATUS
</code>
</a>
.
</p>
<p>
For more information about node IDs for NDB Cluster SQL nodes,
see
<a class="xref" href="mysql-cluster-api-definition.html" title="25.4.3.7 Defining SQL and Other API Nodes in an NDB Cluster">
Section 25.4.3.7, “Defining SQL and Other API Nodes in an NDB Cluster”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqld_ndbinfo">
</a>
<code class="option">
--ndbinfo={ON|OFF|FORCE}
</code>
</p>
<a class="indexterm" name="idm46045113078896">
</a>
<a class="indexterm" name="idm46045113077440">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndbinfo">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndbinfo[=value]
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Enumeration
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
ON
</code>
</td>
</tr>
<tr>
<th>
Valid Values
</th>
<td>
<p class="valid-value">
<code class="literal">
ON
</code>
</p>
<p class="valid-value">
<code class="literal">
OFF
</code>
</p>
<p class="valid-value">
<code class="literal">
FORCE
</code>
</p>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Enables the plugin for the
<a class="link" href="mysql-cluster-ndbinfo.html" title="25.6.17 ndbinfo: The NDB Cluster Information Database">
<code class="literal">
ndbinfo
</code>
</a>
information
database. By default this is ON whenever
<code class="literal">
NDBCLUSTER
</code>
is enabled.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqld_ndb-optimization-delay">
</a>
<code class="option">
--ndb-optimization-delay=
<em class="replaceable">
<code>
milliseconds
</code>
</em>
</code>
</p>
<a class="indexterm" name="idm46045113056928">
</a>
<a class="indexterm" name="idm46045113055424">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb-optimization-delay">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-optimization-delay=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
ndb_optimization_delay
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
10
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
100000
</code>
</td>
</tr>
<tr>
<th>
Unit
</th>
<td>
milliseconds
</td>
</tr>
</tbody>
</table>
</div>
<p>
Set the number of milliseconds to wait between sets of rows by
<a class="link" href="optimize-table.html" title="15.7.3.4 OPTIMIZE TABLE Statement">
<code class="literal">
OPTIMIZE TABLE
</code>
</a>
statements on
<a class="link" href="mysql-cluster.html" title="Chapter 25 MySQL NDB Cluster 8.4">
<code class="literal">
NDB
</code>
</a>
tables. The default is 10.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqld_ndb-optimized-node-selection">
</a>
<code class="option">
--ndb-optimized-node-selection
</code>
</p>
<a class="indexterm" name="idm46045113022768">
</a>
<a class="indexterm" name="idm46045113021264">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb-optimized-node-selection">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-optimized-node-selection
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Enable optimizations for selection of nodes for transactions.
Enabled by default; use
<code class="option">
--skip-ndb-optimized-node-selection
</code>
to
disable.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqld_ndb-tls-search-path">
</a>
<code class="option">
ndb-tls-search-path=
<em class="replaceable">
<code>
path
</code>
</em>
</code>
</p>
<a class="indexterm" name="idm46045113011296">
</a>
<a class="indexterm" name="idm46045113009840">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb-tls-search-path">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-tls-search-path=path
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
ndb_tls_search_path
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
No
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Path name
</td>
</tr>
<tr>
<th>
Default Value (Unix)
</th>
<td>
<code class="literal">
$HOME/tls
</code>
</td>
</tr>
<tr>
<th>
Default Value (Windows)
</th>
<td>
<code class="literal">
$HOMEDIR/tls
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
List of directories to search for CAs and private keys for NDB
TLS connections. The list is comma-delimited on Unix platforms
and semicolon-delimited on Windows.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqld_ndb-transid-mysql-connection-map">
</a>
<code class="option">
--ndb-transid-mysql-connection-map=
<em class="replaceable">
<code>
state
</code>
</em>
</code>
</p>
<a class="indexterm" name="idm46045112983664">
</a>
<a class="indexterm" name="idm46045112982160">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb-transid-mysql-connection-map">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-transid-mysql-connection-map[=state]
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Enumeration
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
ON
</code>
</td>
</tr>
<tr>
<th>
Valid Values
</th>
<td>
<p class="valid-value">
<code class="literal">
ON
</code>
</p>
<p class="valid-value">
<code class="literal">
OFF
</code>
</p>
<p class="valid-value">
<code class="literal">
FORCE
</code>
</p>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Enables or disables the plugin that handles the
<a class="link" href="information-schema-ndb-transid-mysql-connection-map-table.html" title="28.3.18 The INFORMATION_SCHEMA ndb_transid_mysql_connection_map Table">
<code class="literal">
ndb_transid_mysql_connection_map
</code>
</a>
table in the
<code class="literal">
INFORMATION_SCHEMA
</code>
database.
Takes one of the values
<code class="literal">
ON
</code>
,
<code class="literal">
OFF
</code>
, or
<code class="literal">
FORCE
</code>
.
<code class="literal">
ON
</code>
(the default) enables the plugin.
<code class="literal">
OFF
</code>
disables the plugin, which makes
<code class="literal">
ndb_transid_mysql_connection_map
</code>
inaccessible.
<code class="literal">
FORCE
</code>
keeps the MySQL Server
from starting if the plugin fails to load and start.
</p>
<p>
You can see whether the
<a class="link" href="information-schema-ndb-transid-mysql-connection-map-table.html" title="28.3.18 The INFORMATION_SCHEMA ndb_transid_mysql_connection_map Table">
<code class="literal">
ndb_transid_mysql_connection_map
</code>
</a>
table plugin is running by checking the output of
<a class="link" href="show-plugins.html" title="15.7.7.27 SHOW PLUGINS Statement">
<code class="literal">
SHOW PLUGINS
</code>
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqld_ndb-wait-connected">
</a>
<code class="option">
--ndb-wait-connected=
<em class="replaceable">
<code>
seconds
</code>
</em>
</code>
</p>
<a class="indexterm" name="idm46045112953216">
</a>
<a class="indexterm" name="idm46045112951760">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb-wait-connected">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-wait-connected=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
ndb_wait_connected
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
No
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
120
</code>
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
30
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
31536000
</code>
</td>
</tr>
<tr>
<th>
Unit
</th>
<td>
seconds
</td>
</tr>
</tbody>
</table>
</div>
<p>
This option sets the period of time that the MySQL server
waits for connections to NDB Cluster management and data nodes
to be established before accepting MySQL client connections.
The time is specified in seconds. The default value is
<code class="literal">
30
</code>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqld_ndb-wait-setup">
</a>
<code class="option">
--ndb-wait-setup=
<em class="replaceable">
<code>
seconds
</code>
</em>
</code>
</p>
<a class="indexterm" name="idm46045112917984">
</a>
<a class="indexterm" name="idm46045112916496">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb-wait-setup">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-wait-setup=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
ndb_wait_setup
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
No
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
120
</code>
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
30
</code>
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
15
</code>
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
15
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
31536000
</code>
</td>
</tr>
<tr>
<th>
Unit
</th>
<td>
seconds
</td>
</tr>
</tbody>
</table>
</div>
<p>
This variable shows the period of time that the MySQL server
waits for the
<a class="link" href="mysql-cluster.html" title="Chapter 25 MySQL NDB Cluster 8.4">
<code class="literal">
NDB
</code>
</a>
storage engine
to complete setup before timing out and treating
<a class="link" href="mysql-cluster.html" title="Chapter 25 MySQL NDB Cluster 8.4">
<code class="literal">
NDB
</code>
</a>
as unavailable. The time is
specified in seconds. The default value is
<code class="literal">
30
</code>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqld_skip-ndbcluster">
</a>
<code class="option">
--skip-ndbcluster
</code>
</p>
<a class="indexterm" name="idm46045112875952">
</a>
<a class="indexterm" name="idm46045112874464">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for skip-ndbcluster">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--skip-ndbcluster
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Disable the
<a class="link" href="mysql-cluster.html" title="Chapter 25 MySQL NDB Cluster 8.4">
<code class="literal">
NDBCLUSTER
</code>
</a>
storage
engine. This is the default for binaries that were built with
<a class="link" href="mysql-cluster.html" title="Chapter 25 MySQL NDB Cluster 8.4">
<code class="literal">
NDBCLUSTER
</code>
</a>
storage engine
support; the server allocates memory and other resources for
this storage engine only if the
<a class="link" href="mysql-cluster-options-variables.html#option_mysqld_ndbcluster">
<code class="option">
--ndbcluster
</code>
</a>
option is given
explicitly. See
<a class="xref" href="mysql-cluster-quick.html" title="25.4.1 Quick Test Setup of NDB Cluster">
Section 25.4.1, “Quick Test Setup of NDB Cluster”
</a>
, for an
example.
</p>
</li>
</ul>
</div>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h5 class="title">
<a name="mysql-cluster-system-variables">
</a>
25.4.3.9.2 NDB Cluster System Variables
</h5>
</div>
</div>
</div>
<p>
This section provides detailed information about MySQL server
system variables that are specific to NDB Cluster and the
<a class="link" href="mysql-cluster.html" title="Chapter 25 MySQL NDB Cluster 8.4">
<code class="literal">
NDB
</code>
</a>
storage engine. For system
variables not specific to NDB Cluster, see
<a class="xref" href="server-system-variables.html" title="7.1.8 Server System Variables">
Section 7.1.8, “Server System Variables”
</a>
. For general information
on using system variables, see
<a class="xref" href="using-system-variables.html" title="7.1.9 Using System Variables">
Section 7.1.9, “Using System Variables”
</a>
.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<a name="sysvar_ndb_autoincrement_prefetch_sz">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_autoincrement_prefetch_sz">
<code class="literal">
ndb_autoincrement_prefetch_sz
</code>
</a>
</p>
<a class="indexterm" name="idm46045112855360">
</a>
<a class="indexterm" name="idm46045112854256">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb_autoincrement_prefetch_sz">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-autoincrement-prefetch-sz=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_autoincrement_prefetch_sz">
ndb_autoincrement_prefetch_sz
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global, Session
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
512
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
1
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
65536
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Determines the probability of gaps in an autoincremented
column. Set it to
<code class="literal">
1
</code>
to minimize this.
Setting it to a high value for optimization makes inserts
faster, but decreases the likelihood of consecutive
autoincrement numbers being used in a batch of inserts.
</p>
<p>
This variable affects only the number of
<code class="literal">
AUTO_INCREMENT
</code>
IDs that are fetched between
statements; within a given statement, at least 32 IDs are
obtained at a time.
</p>
<div class="important" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Important
</div>
<p>
This variable does not affect inserts performed using
<a class="link" href="insert-select.html" title="15.2.7.1 INSERT ... SELECT Statement">
<code class="literal">
INSERT ...
SELECT
</code>
</a>
.
</p>
</div>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndb_clear_apply_status">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_clear_apply_status">
<code class="literal">
ndb_clear_apply_status
</code>
</a>
</p>
<a class="indexterm" name="idm46045112820448">
</a>
<a class="indexterm" name="idm46045112819408">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb_clear_apply_status">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-clear-apply-status[={OFF|ON}]
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_clear_apply_status">
ndb_clear_apply_status
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
ON
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
By the default, executing
<a class="link" href="reset-replica.html" title="15.4.2.3 RESET REPLICA Statement">
<code class="literal">
RESET
REPLICA
</code>
</a>
causes an NDB Cluster replica to purge all
rows from its
<code class="literal">
ndb_apply_status
</code>
table. You
can disable this by setting
<code class="literal">
ndb_clear_apply_status=OFF
</code>
.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndb_conflict_role">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_conflict_role">
<code class="literal">
ndb_conflict_role
</code>
</a>
</p>
<a class="indexterm" name="idm46045112792048">
</a>
<a class="indexterm" name="idm46045112791008">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb_conflict_role">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-conflict-role=value
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_conflict_role">
ndb_conflict_role
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Enumeration
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
NONE
</code>
</td>
</tr>
<tr>
<th>
Valid Values
</th>
<td>
<p class="valid-value">
<code class="literal">
NONE
</code>
</p>
<p class="valid-value">
<code class="literal">
PRIMARY
</code>
</p>
<p class="valid-value">
<code class="literal">
SECONDARY
</code>
</p>
<p class="valid-value">
<code class="literal">
PASS
</code>
</p>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Determines the role of this SQL node (and NDB Cluster) in a
circular (
<span class="quote">
“
<span class="quote">
active-active
</span>
”
</span>
) replication setup.
<code class="literal">
ndb_conflict_role
</code>
can take any one of the
values
<code class="literal">
PRIMARY
</code>
,
<code class="literal">
SECONDARY
</code>
,
<code class="literal">
PASS
</code>
, or
<code class="literal">
NULL
</code>
(the default). The replica SQL thread
must be stopped before you can change
<code class="literal">
ndb_conflict_role
</code>
. In addition, it is not
possible to change directly between
<code class="literal">
PASS
</code>
and either of
<code class="literal">
PRIMARY
</code>
or
<code class="literal">
SECONDARY
</code>
directly; in such cases, you must
ensure that the SQL thread is stopped, then execute
<a class="link" href="set-statement.html" title="15.7.6 SET Statements">
<code class="literal">
SET
@@GLOBAL.ndb_conflict_role = 'NONE'
</code>
</a>
first.
</p>
<p>
This variable replaces the deprecated
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_slave_conflict_role">
<code class="literal">
ndb_slave_conflict_role
</code>
</a>
.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-replication-conflict-resolution.html" title="25.7.12 NDB Cluster Replication Conflict Resolution">
Section 25.7.12, “NDB Cluster Replication Conflict Resolution”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndb_data_node_neighbour">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_data_node_neighbour">
<code class="literal">
ndb_data_node_neighbour
</code>
</a>
</p>
<a class="indexterm" name="idm46045112749312">
</a>
<a class="indexterm" name="idm46045112748272">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb_data_node_neighbour">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-data-node-neighbour=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_data_node_neighbour">
ndb_data_node_neighbour
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
255
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Sets the ID of a
<span class="quote">
“
<span class="quote">
nearest
</span>
”
</span>
data node—that
is, a preferred nonlocal data node is chosen to execute the
transaction, rather than one running on the same host as the
SQL or API node. This used to ensure that when a fully
replicated table is accessed, we access it on this data node,
to ensure that the local copy of the table is always used
whenever possible. This can also be used for providing hints
for transactions.
</p>
<p>
This can improve data access times in the case of a node that
is physically closer than and thus has higher network
throughput than others on the same host.
</p>
<p>
See
<a class="xref" href="create-table-ndb-comment-options.html" title="15.1.20.12 Setting NDB Comment Options">
Section 15.1.20.12, “Setting NDB Comment Options”
</a>
, for
further information.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
An equivalent method
<a class="ulink" href="/doc/ndbapi/en/ndb-ndb-cluster-connection.html#ndb-ndb-cluster-connection-set-data-node-neighbour" target="_top">
<code class="literal">
set_data_node_neighbour()
</code>
</a>
is provided for use in NDB API applications.
</p>
</div>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndb_dbg_check_shares">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_dbg_check_shares">
<code class="literal">
ndb_dbg_check_shares
</code>
</a>
</p>
<a class="indexterm" name="idm46045112713952">
</a>
<a class="indexterm" name="idm46045112712912">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb_dbg_check_shares">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-dbg-check-shares=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_dbg_check_shares">
ndb_dbg_check_shares
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global, Session
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
1
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
When set to 1, check that no shares are lingering. Available
in debug builds only.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndb_default_column_format">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_default_column_format">
<code class="literal">
ndb_default_column_format
</code>
</a>
</p>
<a class="indexterm" name="idm46045112683520">
</a>
<a class="indexterm" name="idm46045112682416">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb_default_column_format">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-default-column-format={FIXED|DYNAMIC}
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_default_column_format">
ndb_default_column_format
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Enumeration
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
FIXED
</code>
</td>
</tr>
<tr>
<th>
Valid Values
</th>
<td>
<p class="valid-value">
<code class="literal">
FIXED
</code>
</p>
<p class="valid-value">
<code class="literal">
DYNAMIC
</code>
</p>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Sets the default
<code class="literal">
COLUMN_FORMAT
</code>
and
<code class="literal">
ROW_FORMAT
</code>
for new tables (see
<a class="xref" href="create-table.html" title="15.1.20 CREATE TABLE Statement">
Section 15.1.20, “CREATE TABLE Statement”
</a>
). The default is
<code class="literal">
FIXED
</code>
.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndb_deferred_constraints">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_deferred_constraints">
<code class="literal">
ndb_deferred_constraints
</code>
</a>
</p>
<a class="indexterm" name="idm46045112651104">
</a>
<a class="indexterm" name="idm46045112650000">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb_deferred_constraints">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-deferred-constraints=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_deferred_constraints">
ndb_deferred_constraints
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global, Session
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
1
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Controls whether or not constraint checks are deferred, where
these are supported.
<code class="literal">
0
</code>
is the default.
</p>
<p>
This variable is not normally needed for operation of NDB
Cluster or NDB Cluster Replication, and is intended primarily
for use in testing.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndb_distribution">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_distribution">
<code class="literal">
ndb_distribution
</code>
</a>
</p>
<a class="indexterm" name="idm46045112619376">
</a>
<a class="indexterm" name="idm46045112618288">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb_distribution">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-distribution={KEYHASH|LINHASH}
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_distribution">
ndb_distribution
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Enumeration
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
KEYHASH
</code>
</td>
</tr>
<tr>
<th>
Valid Values
</th>
<td>
<p class="valid-value">
<code class="literal">
LINHASH
</code>
</p>
<p class="valid-value">
<code class="literal">
KEYHASH
</code>
</p>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Controls the default distribution method for
<a class="link" href="mysql-cluster.html" title="Chapter 25 MySQL NDB Cluster 8.4">
<code class="literal">
NDB
</code>
</a>
tables. Can be set to either
of
<code class="literal">
KEYHASH
</code>
(key hashing) or
<code class="literal">
LINHASH
</code>
(linear hashing).
<code class="literal">
KEYHASH
</code>
is the default.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndb_eventbuffer_free_percent">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_eventbuffer_free_percent">
<code class="literal">
ndb_eventbuffer_free_percent
</code>
</a>
</p>
<a class="indexterm" name="idm46045112586528">
</a>
<a class="indexterm" name="idm46045112585424">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb_eventbuffer_free_percent">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-eventbuffer-free-percent=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_eventbuffer_free_percent">
ndb_eventbuffer_free_percent
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
20
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
1
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
99
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Sets the percentage of the maximum memory allocated to the
event buffer (ndb_eventbuffer_max_alloc) that should be
available in event buffer after reaching the maximum, before
starting to buffer again.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndb_eventbuffer_max_alloc">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_eventbuffer_max_alloc">
<code class="literal">
ndb_eventbuffer_max_alloc
</code>
</a>
</p>
<a class="indexterm" name="idm46045112555840">
</a>
<a class="indexterm" name="idm46045112554736">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb_eventbuffer_max_alloc">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-eventbuffer-max-alloc=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_eventbuffer_max_alloc">
ndb_eventbuffer_max_alloc
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
9223372036854775807
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Sets the maximum amount memory (in bytes) that can be
allocated for buffering events by the NDB API. 0 means that no
limit is imposed, and is the default.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndb_extra_logging">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_extra_logging">
<code class="literal">
ndb_extra_logging
</code>
</a>
</p>
<a class="indexterm" name="idm46045112525088">
</a>
<a class="indexterm" name="idm46045112524048">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb_extra_logging">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
ndb_extra_logging=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_extra_logging">
ndb_extra_logging
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
1
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
1
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
This variable enables recording in the MySQL error log of
information specific to the
<a class="link" href="mysql-cluster.html" title="Chapter 25 MySQL NDB Cluster 8.4">
<code class="literal">
NDB
</code>
</a>
storage engine.
</p>
<p>
When this variable is set to 0, the only information specific
to
<code class="literal">
NDB
</code>
that is written to the MySQL error
log relates to transaction handling. If it set to a value
greater than 0 but less than 10,
<code class="literal">
NDB
</code>
table
schema and connection events are also logged, as well as
whether or not conflict resolution is in use, and other
<code class="literal">
NDB
</code>
errors and information. If the value is
set to 10 or more, information about
<code class="literal">
NDB
</code>
internals, such as the progress of data distribution among
cluster nodes, is also written to the MySQL error log. The
default is 1.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndb_force_send">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_force_send">
<code class="literal">
ndb_force_send
</code>
</a>
</p>
<a class="indexterm" name="idm46045112489808">
</a>
<a class="indexterm" name="idm46045112488720">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb_force_send">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-force-send[={OFF|ON}]
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_force_send">
ndb_force_send
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global, Session
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
ON
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Forces sending of buffers to
<a class="link" href="mysql-cluster.html" title="Chapter 25 MySQL NDB Cluster 8.4">
<code class="literal">
NDB
</code>
</a>
immediately, without waiting for other threads. Defaults to
<code class="literal">
ON
</code>
.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndb_fully_replicated">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_fully_replicated">
<code class="literal">
ndb_fully_replicated
</code>
</a>
</p>
<a class="indexterm" name="idm46045112462272">
</a>
<a class="indexterm" name="idm46045112461232">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb_fully_replicated">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-fully-replicated[={OFF|ON}]
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_fully_replicated">
ndb_fully_replicated
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global, Session
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
OFF
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Determines whether new
<code class="literal">
NDB
</code>
tables are fully
replicated. This setting can be overridden for an individual
table using
<code class="literal">
COMMENT="NDB_TABLE=FULLY_REPLICATED=..."
</code>
in
a
<a class="link" href="create-table.html" title="15.1.20 CREATE TABLE Statement">
<code class="literal">
CREATE TABLE
</code>
</a>
or
<a class="link" href="alter-table.html" title="15.1.9 ALTER TABLE Statement">
<code class="literal">
ALTER TABLE
</code>
</a>
statement; see
<a class="xref" href="create-table-ndb-comment-options.html" title="15.1.20.12 Setting NDB Comment Options">
Section 15.1.20.12, “Setting NDB Comment Options”
</a>
, for syntax
and other information.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndb_index_stat_enable">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_index_stat_enable">
<code class="literal">
ndb_index_stat_enable
</code>
</a>
</p>
<a class="indexterm" name="idm46045112431952">
</a>
<a class="indexterm" name="idm46045112430912">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb_index_stat_enable">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-index-stat-enable[={OFF|ON}]
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_index_stat_enable">
ndb_index_stat_enable
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global, Session
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
ON
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Use
<a class="link" href="mysql-cluster.html" title="Chapter 25 MySQL NDB Cluster 8.4">
<code class="literal">
NDB
</code>
</a>
index statistics in query
optimization. The default is
<code class="literal">
ON
</code>
.
</p>
<p>
The index statistics tables are always created when the server
starts, regardless of this option's value.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndb_index_stat_option">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_index_stat_option">
<code class="literal">
ndb_index_stat_option
</code>
</a>
</p>
<a class="indexterm" name="idm46045112403888">
</a>
<a class="indexterm" name="idm46045112402848">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb_index_stat_option">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-index-stat-option=value
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_index_stat_option">
ndb_index_stat_option
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global, Session
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
loop_checkon=1000ms,loop_idle=1000ms,loop_busy=100ms, update_batch=1,read_batch=4,idle_batch=32,check_batch=32, check_delay=1m,delete_batch=8,clean_delay=0,error_batch=4, error_delay=1m,evict_batch=8,evict_delay=1m,cache_limit=32M, cache_lowpct=90
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
This variable is used for providing tuning options for NDB
index statistics generation. The list consist of
comma-separated name-value pairs of option names and values,
and this list must not contain any space characters.
</p>
<p>
Options not used when setting
<code class="literal">
ndb_index_stat_option
</code>
are not changed from
their default values. For example, you can set
<code class="literal">
ndb_index_stat_option =
'loop_idle=1000ms,cache_limit=32M'
</code>
.
</p>
<p>
Time values can be optionally suffixed with
<code class="literal">
h
</code>
(hours),
<code class="literal">
m
</code>
(minutes),
or
<code class="literal">
s
</code>
(seconds). Millisecond values can
optionally be specified using
<code class="literal">
ms
</code>
;
millisecond values cannot be specified using
<code class="literal">
h
</code>
,
<code class="literal">
m
</code>
, or
<code class="literal">
s
</code>
.) Integer values can be suffixed with
<code class="literal">
K
</code>
,
<code class="literal">
M
</code>
, or
<code class="literal">
G
</code>
.
</p>
<p>
The names of the options that can be set using this variable
are shown in the table that follows. The table also provides
brief descriptions of the options, their default values, and
(where applicable) their minimum and maximum values.
</p>
<div class="table">
<a name="idm46045112369072">
</a>
<p class="title">
<b>
Table 25.19 ndb_index_stat_option options
and values
</b>
</p>
<div class="table-contents">
<table>
<colgroup>
<col style="width: 25%"/>
<col style="width: 25%"/>
<col style="width: 25%"/>
<col style="width: 25%"/>
</colgroup>
<thead>
<tr>
<th scope="col">
Name
</th>
<th scope="col">
Description
</th>
<th scope="col">
Default/Units
</th>
<th scope="col">
Minimum/Maximum
</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">
<code class="literal">
loop_enable
</code>
</th>
<td>
</td>
<td>
1000 ms
</td>
<td>
0/4G
</td>
</tr>
<tr>
<th scope="row">
<code class="literal">
loop_idle
</code>
</th>
<td>
Time to sleep when idle
</td>
<td>
1000 ms
</td>
<td>
0/4G
</td>
</tr>
<tr>
<th scope="row">
<code class="literal">
loop_busy
</code>
</th>
<td>
Time to sleep when more work is waiting
</td>
<td>
100 ms
</td>
<td>
0/4G
</td>
</tr>
<tr>
<th scope="row">
<code class="literal">
update_batch
</code>
</th>
<td>
</td>
<td>
1
</td>
<td>
0/4G
</td>
</tr>
<tr>
<th scope="row">
<code class="literal">
read_batch
</code>
</th>
<td>
</td>
<td>
4
</td>
<td>
1/4G
</td>
</tr>
<tr>
<th scope="row">
<code class="literal">
idle_batch
</code>
</th>
<td>
</td>
<td>
32
</td>
<td>
1/4G
</td>
</tr>
<tr>
<th scope="row">
<code class="literal">
check_batch
</code>
</th>
<td>
</td>
<td>
8
</td>
<td>
1/4G
</td>
</tr>
<tr>
<th scope="row">
<code class="literal">
check_delay
</code>
</th>
<td>
How often to check for new statistics
</td>
<td>
10 m
</td>
<td>
1/4G
</td>
</tr>
<tr>
<th scope="row">
<code class="literal">
delete_batch
</code>
</th>
<td>
</td>
<td>
8
</td>
<td>
0/4G
</td>
</tr>
<tr>
<th scope="row">
<code class="literal">
clean_delay
</code>
</th>
<td>
</td>
<td>
1 m
</td>
<td>
0/4G
</td>
</tr>
<tr>
<th scope="row">
<code class="literal">
error_batch
</code>
</th>
<td>
</td>
<td>
4
</td>
<td>
1/4G
</td>
</tr>
<tr>
<th scope="row">
<code class="literal">
error_delay
</code>
</th>
<td>
</td>
<td>
1 m
</td>
<td>
1/4G
</td>
</tr>
<tr>
<th scope="row">
<code class="literal">
evict_batch
</code>
</th>
<td>
</td>
<td>
8
</td>
<td>
1/4G
</td>
</tr>
<tr>
<th scope="row">
<code class="literal">
evict_delay
</code>
</th>
<td>
Clean LRU cache, from read time
</td>
<td>
1 m
</td>
<td>
0/4G
</td>
</tr>
<tr>
<th scope="row">
<code class="literal">
cache_limit
</code>
</th>
<td>
Maximum amount of memory in bytes used for cached index statistics by
this
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
; clean up the cache when
this is exceeded.
</td>
<td>
32 M
</td>
<td>
0/4G
</td>
</tr>
<tr>
<th scope="row">
<code class="literal">
cache_lowpct
</code>
</th>
<td>
</td>
<td>
90
</td>
<td>
0/100
</td>
</tr>
<tr>
<th scope="row">
<code class="literal">
zero_total
</code>
</th>
<td>
Setting this to 1 resets all accumulating counters in
<code class="literal">
ndb_index_stat_status
</code>
to 0. This
option value is also reset to 0 when this is done.
</td>
<td>
0
</td>
<td>
0/1
</td>
</tr>
</tbody>
</table>
</div>
<div class="table-contents">
<table cellpadding="0" cellspacing="0" style="position: fixed; top: 0px; display: none; left: 431px; width: 709px;">
<thead>
<tr>
<th scope="col" style="width: 176.719px;">
Name
</th>
<th scope="col" style="width: 177.641px;">
Description
</th>
<th scope="col" style="width: 176.719px;">
Default/Units
</th>
<th scope="col" style="width: 176.922px;">
Minimum/Maximum
</th>
</tr>
</thead>
</table>
</div>
</div>
<br class="table-break"/>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndb_join_pushdown">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_join_pushdown">
<code class="literal">
ndb_join_pushdown
</code>
</a>
</p>
<a class="indexterm" name="idm46045112278448">
</a>
<a class="indexterm" name="idm46045112277408">
</a>
<a class="indexterm" name="idm46045112275920">
</a>
<a class="indexterm" name="idm46045112274848">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb_join_pushdown">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_join_pushdown">
ndb_join_pushdown
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global, Session
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
ON
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
This variable controls whether joins on
<a class="link" href="mysql-cluster.html" title="Chapter 25 MySQL NDB Cluster 8.4">
<code class="literal">
NDB
</code>
</a>
tables are pushed down to the
NDB kernel (data nodes). Previously, a join was handled using
multiple accesses of
<a class="link" href="mysql-cluster.html" title="Chapter 25 MySQL NDB Cluster 8.4">
<code class="literal">
NDB
</code>
</a>
by the
SQL node; however, when
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_join_pushdown">
<code class="literal">
ndb_join_pushdown
</code>
</a>
is enabled,
a pushable join is sent in its entirety to the data nodes,
where it can be distributed among the data nodes and executed
in parallel on multiple copies of the data, with a single,
merged result being returned to
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
.
This can reduce greatly the number of round trips between an
SQL node and the data nodes required to handle such a join.
</p>
<p>
By default,
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_join_pushdown">
<code class="literal">
ndb_join_pushdown
</code>
</a>
is enabled.
</p>
<p>
<a name="ndb_join_pushdown-conditions">
</a>
<b>
Conditions for NDB pushdown joins.
</b>
In order for a join to be pushable, it must meet the
following conditions:
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1">
<li class="listitem">
<p>
Only columns can be compared, and all columns to be joined
must use
<span class="emphasis">
<em>
exactly
</em>
</span>
the same data type.
This means that (for example) a join on an
<a class="link" href="integer-types.html" title="13.1.2 Integer Types (Exact Value) - INTEGER, INT, SMALLINT, TINYINT, MEDIUMINT, BIGINT">
<code class="literal">
INT
</code>
</a>
column and a
<a class="link" href="integer-types.html" title="13.1.2 Integer Types (Exact Value) - INTEGER, INT, SMALLINT, TINYINT, MEDIUMINT, BIGINT">
<code class="literal">
BIGINT
</code>
</a>
column also cannot
be pushed down.
</p>
<p>
Expressions comparing columns from the same table can also
be pushed down. The columns (or the result of any
operations on those columns) must be of exactly the same
type, including the same signedness, length, character set
and collation, precision, and scale, where these are
applicable.
</p>
</li>
<li class="listitem">
<p>
Queries referencing
<a class="link" href="blob.html" title="13.3.4 The BLOB and TEXT Types">
<code class="literal">
BLOB
</code>
</a>
or
<a class="link" href="blob.html" title="13.3.4 The BLOB and TEXT Types">
<code class="literal">
TEXT
</code>
</a>
columns are not
supported.
</p>
</li>
<li class="listitem">
<p>
Explicit locking is not supported; however, the
<a class="link" href="mysql-cluster.html" title="Chapter 25 MySQL NDB Cluster 8.4">
<code class="literal">
NDB
</code>
</a>
storage engine's
characteristic implicit row-based locking is enforced.
</p>
<p>
This means that a join using
<code class="literal">
FOR UPDATE
</code>
cannot be pushed down.
</p>
</li>
<li class="listitem">
<p>
In order for a join to be pushed down, child tables in the
join must be accessed using one of the
<a class="link" href="explain-output.html#jointype_ref">
<code class="literal">
ref
</code>
</a>
,
<a class="link" href="explain-output.html#jointype_eq_ref">
<code class="literal">
eq_ref
</code>
</a>
, or
<a class="link" href="explain-output.html#jointype_const">
<code class="literal">
const
</code>
</a>
access methods,
or some combination of these methods.
</p>
<p>
Outer joined child tables can only be pushed using
<a class="link" href="explain-output.html#jointype_eq_ref">
<code class="literal">
eq_ref
</code>
</a>
.
</p>
<p>
If the root of the pushed join is an
<a class="link" href="explain-output.html#jointype_eq_ref">
<code class="literal">
eq_ref
</code>
</a>
or
<a class="link" href="explain-output.html#jointype_const">
<code class="literal">
const
</code>
</a>
, only child
tables joined by
<a class="link" href="explain-output.html#jointype_eq_ref">
<code class="literal">
eq_ref
</code>
</a>
can be appended. (A table joined by
<a class="link" href="explain-output.html#jointype_ref">
<code class="literal">
ref
</code>
</a>
is likely to become
the root of another pushed join.)
</p>
<p>
If the query optimizer decides on
<code class="literal">
Using join
cache
</code>
for a candidate child table, that table
cannot be pushed as a child. However, it may be the root
of another set of pushed tables.
</p>
</li>
<li class="listitem">
<p>
Joins referencing tables explicitly partitioned by
<code class="literal">
[LINEAR] HASH
</code>
,
<code class="literal">
LIST
</code>
,
or
<code class="literal">
RANGE
</code>
currently cannot be pushed
down.
</p>
</li>
</ol>
</div>
<p>
You can see whether a given join can be pushed down by
checking it with
<a class="link" href="explain.html" title="15.8.2 EXPLAIN Statement">
<code class="literal">
EXPLAIN
</code>
</a>
; when
the join can be pushed down, you can see references to the
<code class="literal">
pushed join
</code>
in the
<code class="literal">
Extra
</code>
column of the output, as shown in this example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa46785244"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">EXPLAIN</span>
<span class="token prompt"> -></span> <span class="token keyword">SELECT</span> e<span class="token punctuation">.</span>first_name<span class="token punctuation">,</span> e<span class="token punctuation">.</span>last_name<span class="token punctuation">,</span> t<span class="token punctuation">.</span>title<span class="token punctuation">,</span> d<span class="token punctuation">.</span>dept_name
<span class="token prompt"> -></span> <span class="token keyword">FROM</span> employees e
<span class="token prompt"> -></span> <span class="token keyword">JOIN</span> dept_emp de <span class="token keyword">ON</span> e<span class="token punctuation">.</span>emp_no<span class="token operator">=</span>de<span class="token punctuation">.</span>emp_no
<span class="token prompt"> -></span> <span class="token keyword">JOIN</span> departments d <span class="token keyword">ON</span> d<span class="token punctuation">.</span>dept_no<span class="token operator">=</span>de<span class="token punctuation">.</span>dept_no
<span class="token prompt"> -></span> <span class="token keyword">JOIN</span> titles t <span class="token keyword">ON</span> e<span class="token punctuation">.</span>emp_no<span class="token operator">=</span>t<span class="token punctuation">.</span>emp_no\G
<span class="token output"><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 1. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
id<span class="token punctuation">:</span> 1
select_type<span class="token punctuation">:</span> SIMPLE
table<span class="token punctuation">:</span> d
type<span class="token punctuation">:</span> ALL
possible_keys<span class="token punctuation">:</span> PRIMARY
key<span class="token punctuation">:</span> NULL
key_len<span class="token punctuation">:</span> NULL
ref<span class="token punctuation">:</span> NULL
rows<span class="token punctuation">:</span> 9
Extra<span class="token punctuation">:</span> Parent of 4 pushed join@1
<span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 2. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
id<span class="token punctuation">:</span> 1
select_type<span class="token punctuation">:</span> SIMPLE
table<span class="token punctuation">:</span> de
type<span class="token punctuation">:</span> ref
possible_keys<span class="token punctuation">:</span> PRIMARY,emp_no,dept_no
key<span class="token punctuation">:</span> dept_no
key_len<span class="token punctuation">:</span> 4
ref<span class="token punctuation">:</span> employees.d.dept_no
rows<span class="token punctuation">:</span> 5305
Extra<span class="token punctuation">:</span> Child of 'd' in pushed join@1
<span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 3. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
id<span class="token punctuation">:</span> 1
select_type<span class="token punctuation">:</span> SIMPLE
table<span class="token punctuation">:</span> e
type<span class="token punctuation">:</span> eq_ref
possible_keys<span class="token punctuation">:</span> PRIMARY
key<span class="token punctuation">:</span> PRIMARY
key_len<span class="token punctuation">:</span> 4
ref<span class="token punctuation">:</span> employees.de.emp_no
rows<span class="token punctuation">:</span> 1
Extra<span class="token punctuation">:</span> Child of 'de' in pushed join@1
<span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 4. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
id<span class="token punctuation">:</span> 1
select_type<span class="token punctuation">:</span> SIMPLE
table<span class="token punctuation">:</span> t
type<span class="token punctuation">:</span> ref
possible_keys<span class="token punctuation">:</span> PRIMARY,emp_no
key<span class="token punctuation">:</span> emp_no
key_len<span class="token punctuation">:</span> 4
ref<span class="token punctuation">:</span> employees.de.emp_no
rows<span class="token punctuation">:</span> 19
Extra<span class="token punctuation">:</span> Child of 'e' in pushed join@1
</span><span class="token output">4 rows in set (0.00 sec)</span></code></pre>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
If inner joined child tables are joined by
<a class="link" href="explain-output.html#jointype_ref">
<code class="literal">
ref
</code>
</a>
,
<span class="emphasis">
<em>
and
</em>
</span>
the result is ordered or grouped by
a sorted index, this index cannot provide sorted rows, which
forces writing to a sorted tempfile.
</p>
</div>
<p>
Two additional sources of information about pushed join
performance are available:
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1">
<li class="listitem">
<p>
The status variables
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_pushed_queries_defined">
<code class="literal">
Ndb_pushed_queries_defined
</code>
</a>
,
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_pushed_queries_dropped">
<code class="literal">
Ndb_pushed_queries_dropped
</code>
</a>
,
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_pushed_queries_executed">
<code class="literal">
Ndb_pushed_queries_executed
</code>
</a>
,
and
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_pushed_reads">
<code class="literal">
Ndb_pushed_reads
</code>
</a>
.
</p>
</li>
<li class="listitem">
<p>
The counters in the
<a class="link" href="mysql-cluster-ndbinfo-counters.html" title="25.6.17.13 The ndbinfo counters Table">
<code class="literal">
ndbinfo.counters
</code>
</a>
table
that belong to the
<a class="ulink" href="/doc/ndb-internals/en/ndb-internals-kernel-blocks-dbspj.html" target="_top">
<code class="literal">
DBSPJ
</code>
</a>
kernel block.
</p>
</li>
</ol>
</div>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndb_log_apply_status">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_log_apply_status">
<code class="literal">
ndb_log_apply_status
</code>
</a>
</p>
<a class="indexterm" name="idm46045112191072">
</a>
<a class="indexterm" name="idm46045112190032">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb_log_apply_status">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-log-apply-status[={OFF|ON}]
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_log_apply_status">
ndb_log_apply_status
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
No
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
OFF
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
A read-only variable which shows whether the server was
started with the
<a class="link" href="mysql-cluster-options-variables.html#option_mysqld_ndb-log-apply-status">
<code class="option">
--ndb-log-apply-status
</code>
</a>
option.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndb_log_bin">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_log_bin">
<code class="literal">
ndb_log_bin
</code>
</a>
</p>
<a class="indexterm" name="idm46045112164560">
</a>
<a class="indexterm" name="idm46045112163472">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb_log_bin">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-log-bin[={OFF|ON}]
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_log_bin">
ndb_log_bin
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global, Session
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
No
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
OFF
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Causes updates to
<code class="literal">
NDB
</code>
tables to be written
to the binary log. The setting for this variable has no effect
if binary logging is not already enabled on the server using
<a class="link" href="replication-options-binary-log.html#sysvar_log_bin">
<code class="literal">
log_bin
</code>
</a>
.
<code class="literal">
ndb_log_bin
</code>
defaults to 0 (FALSE).
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndb_log_binlog_index">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_log_binlog_index">
<code class="literal">
ndb_log_binlog_index
</code>
</a>
</p>
<a class="indexterm" name="idm46045112136176">
</a>
<a class="indexterm" name="idm46045112135136">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb_log_binlog_index">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-log-binlog-index[={OFF|ON}]
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_log_binlog_index">
ndb_log_binlog_index
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
ON
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Causes a mapping of epochs to positions in the binary log to
be inserted into the
<code class="literal">
ndb_binlog_index
</code>
table. Setting this variable has no effect if binary logging
is not already enabled for the server using
<a class="link" href="replication-options-binary-log.html#sysvar_log_bin">
<code class="literal">
log_bin
</code>
</a>
. (In addition,
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_log_bin">
<code class="literal">
ndb_log_bin
</code>
</a>
must not be
disabled.)
<code class="literal">
ndb_log_binlog_index
</code>
defaults to
<code class="literal">
1
</code>
(
<code class="literal">
ON
</code>
); normally, there
is never any need to change this value in a production
environment.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndb_log_cache_size">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_log_cache_size">
<code class="literal">
ndb_log_cache_size
</code>
</a>
</p>
<a class="indexterm" name="idm46045112104992">
</a>
<a class="indexterm" name="idm46045112103952">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb_log_cache_size">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-log-cache-size=#
</code>
</td>
</tr>
<tr>
<th>
Introduced
</th>
<td>
8.4.3-ndb-8.4.3
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_log_cache_size">
ndb_log_cache_size
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
64M
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
4096
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
18446744073709551615
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Set the size of the transaction cache used for writing the
<code class="literal">
NDB
</code>
binary log.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndb_log_empty_epochs">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_log_empty_epochs">
<code class="literal">
ndb_log_empty_epochs
</code>
</a>
</p>
<a class="indexterm" name="idm46045112071776">
</a>
<a class="indexterm" name="idm46045112070736">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb_log_empty_epochs">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-log-empty-epochs[={OFF|ON}]
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_log_empty_epochs">
ndb_log_empty_epochs
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
OFF
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
When this variable is set to 0, epoch transactions with no
changes are not written to the binary log, although a row is
still written even for an empty epoch in
<code class="literal">
ndb_binlog_index
</code>
.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndb_log_empty_update">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_log_empty_update">
<code class="literal">
ndb_log_empty_update
</code>
</a>
</p>
<a class="indexterm" name="idm46045112045328">
</a>
<a class="indexterm" name="idm46045112044288">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb_log_empty_update">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-log-empty-update[={OFF|ON}]
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_log_empty_update">
ndb_log_empty_update
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
OFF
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
When this variable is set to
<code class="literal">
ON
</code>
(
<code class="literal">
1
</code>
), update transactions with no changes
are written to the binary log, even when
<a class="link" href="replication-options-binary-log.html#sysvar_log_replica_updates">
<code class="literal">
log_replica_updates
</code>
</a>
is
enabled.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndb_log_exclusive_reads">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_log_exclusive_reads">
<code class="literal">
ndb_log_exclusive_reads
</code>
</a>
</p>
<a class="indexterm" name="idm46045112017024">
</a>
<a class="indexterm" name="idm46045112015984">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb_log_exclusive_reads">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-log-exclusive-reads[={OFF|ON}]
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_log_exclusive_reads">
ndb_log_exclusive_reads
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global, Session
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
This variable determines whether primary key reads are logged
with exclusive locks, which allows for NDB Cluster Replication
conflict detection and resolution based on read conflicts. To
enable these locks, set the value of
<code class="literal">
ndb_log_exclusive_reads
</code>
to 1. 0, which
disables such locking, is the default.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-replication-conflict-resolution.html#conflict-resolution-read-conflicts" title="Read conflict detection and resolution">
Read conflict detection and resolution
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndb_log_orig">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_log_orig">
<code class="literal">
ndb_log_orig
</code>
</a>
</p>
<a class="indexterm" name="idm46045111989408">
</a>
<a class="indexterm" name="idm46045111988320">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb_log_orig">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-log-orig[={OFF|ON}]
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_log_orig">
ndb_log_orig
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
No
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
OFF
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Shows whether the originating server ID and epoch are logged
in the
<code class="literal">
ndb_binlog_index
</code>
table. Set using
the
<a class="link" href="mysql-cluster-options-variables.html#option_mysqld_ndb-log-orig">
<code class="option">
--ndb-log-orig
</code>
</a>
server
option.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndb_log_transaction_id">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_log_transaction_id">
<code class="literal">
ndb_log_transaction_id
</code>
</a>
</p>
<a class="indexterm" name="idm46045111962032">
</a>
<a class="indexterm" name="idm46045111960992">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb_log_transaction_id">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_log_transaction_id">
ndb_log_transaction_id
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
No
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
OFF
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
This read-only, Boolean system variable shows whether a
replica
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
writes NDB transaction IDs
in the binary log (required to use
<span class="quote">
“
<span class="quote">
active-active
</span>
”
</span>
NDB Cluster Replication with
<code class="literal">
NDB$EPOCH_TRANS()
</code>
conflict detection). To
change the setting, use the
<a class="link" href="mysql-cluster-options-variables.html#option_mysqld_ndb-log-transaction-id">
<code class="option">
--ndb-log-transaction-id
</code>
</a>
option.
</p>
<p>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_log_transaction_id">
<code class="literal">
ndb_log_transaction_id
</code>
</a>
is not
supported in mainline MySQL Server 8.4.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-replication-conflict-resolution.html" title="25.7.12 NDB Cluster Replication Conflict Resolution">
Section 25.7.12, “NDB Cluster Replication Conflict Resolution”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndb_log_transaction_compression">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_log_transaction_compression">
<code class="literal">
ndb_log_transaction_compression
</code>
</a>
</p>
<a class="indexterm" name="idm46045111932400">
</a>
<a class="indexterm" name="idm46045111931296">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb_log_transaction_compression">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-log-transaction-compression
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_log_transaction_compression">
ndb_log_transaction_compression
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
OFF
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Whether a replica
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
writes compressed
transactions in the binary log; present only if
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
was compiled with support for
<code class="literal">
NDB
</code>
.
</p>
<p>
You should note that starting the MySQL server with
<a class="link" href="replication-options-binary-log.html#sysvar_binlog_transaction_compression">
<code class="option">
--binlog-transaction-compression
</code>
</a>
forces this variable to be enabled (
<code class="literal">
ON
</code>
),
and that this overrides any setting for
<code class="option">
--ndb-log-transaction-compression
</code>
made on the
command line or in a
<code class="filename">
my.cnf
</code>
file, as
shown here:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-terminal"><div class="docs-select-all right" id="sa58753700"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal"><span class="token prompt">$> </span><span class="token command">mysqld_safe</span> <span class="token property">--ndbcluster</span> <span class="token constant">--ndb-connectstring</span><span class="token attr-value"><span class="token punctuation">=</span>127.0.0.1</span> \
<span class="token constant">--binlog-transaction-compression</span><span class="token attr-value"><span class="token punctuation">=</span>ON</span> <span class="token constant">--ndb-log-transaction-compression</span><span class="token attr-value"><span class="token punctuation">=</span>OFF</span> &
<span class="token punctuation">[</span>1<span class="token punctuation">]</span> 27667
<span class="token prompt">$> </span><span class="token command">2022-07-07T12:29:20.459937Z</span> mysqld_safe Logging to <span class="token atrule">'/usr/local/mysql/data/myhost.err'</span><span class="token punctuation">.</span>
2022-07-07T12<span class="token punctuation">:</span>29<span class="token punctuation">:</span>20<span class="token punctuation">.</span>509873Z mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
<span class="token prompt">$> </span><span class="token command">mysql</span> <span class="token property">-e</span> <span class="token atrule">'SHOW VARIABLES LIKE "%transaction_compression%"'</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Variable_name <span class="token punctuation">|</span> Value <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> binlog_transaction_compression <span class="token punctuation">|</span> ON <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> binlog_transaction_compression_level_zstd <span class="token punctuation">|</span> 3 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> ndb_log_transaction_compression <span class="token punctuation">|</span> ON <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> ndb_log_transaction_compression_level_zstd <span class="token punctuation">|</span> 3 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
<p>
To disable binary log transaction compression for
<code class="literal">
NDB
</code>
tables only, set the
<code class="literal">
ndb_log_transaction_compression
</code>
system
variable to
<code class="literal">
OFF
</code>
in a
<a class="link" href="mysql.html" title="6.5.1 mysql — The MySQL Command-Line Client">
<span class="command">
<strong>
mysql
</strong>
</span>
</a>
or other client session after
starting
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
.
</p>
<p>
Setting the
<code class="literal">
binlog_transaction_compression
</code>
variable after startup has no effect on the value of
<code class="literal">
ndb_log_transaction_compression
</code>
.
</p>
<p>
For more information on binary log transaction compression,
such as which events are or are not compressed and as well as
behavior changes to be aware of when this feature is used, see
<a class="xref" href="binary-log-transaction-compression.html" title="7.4.4.5 Binary Log Transaction Compression">
Section 7.4.4.5, “Binary Log Transaction Compression”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndb_log_transaction_compression_level_zstd">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_log_transaction_compression_level_zstd">
<code class="literal">
ndb_log_transaction_compression_level_zstd
</code>
</a>
</p>
<a class="indexterm" name="idm46045111887360">
</a>
<a class="indexterm" name="idm46045111886240">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb_log_transaction_compression_level_zstd">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-log-transaction-compression-level-zstd=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_log_transaction_compression_level_zstd">
ndb_log_transaction_compression_level_zstd
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
3
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
1
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
22
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
The
<code class="literal">
ZSTD
</code>
compression level used for writing
compressed transactions to the replica's binary log if
enabled by
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_log_transaction_compression">
<code class="literal">
ndb_log_transaction_compression
</code>
</a>
.
Not supported if
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
was not compiled
with support for the
<code class="literal">
NDB
</code>
storage engine.
</p>
<p>
See
<a class="xref" href="binary-log-transaction-compression.html" title="7.4.4.5 Binary Log Transaction Compression">
Section 7.4.4.5, “Binary Log Transaction Compression”
</a>
, for
more information.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndb_metadata_check">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_metadata_check">
<code class="literal">
ndb_metadata_check
</code>
</a>
</p>
<a class="indexterm" name="idm46045111851456">
</a>
<a class="indexterm" name="idm46045111850416">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb_metadata_check">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-metadata-check[={OFF|ON}]
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_metadata_check">
ndb_metadata_check
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
ON
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
<code class="literal">
NDB
</code>
uses a background thread to check for
metadata changes each
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_metadata_check_interval">
<code class="literal">
ndb_metadata_check_interval
</code>
</a>
seconds as compared with the MySQL data dictionary. This
metadata change detection thread can be disabled by setting
<code class="literal">
ndb_metadata_check
</code>
to
<code class="literal">
OFF
</code>
. The thread is enabled by default.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndb_metadata_check_interval">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_metadata_check_interval">
<code class="literal">
ndb_metadata_check_interval
</code>
</a>
</p>
<a class="indexterm" name="idm46045111822320">
</a>
<a class="indexterm" name="idm46045111821216">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb_metadata_check_interval">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-metadata-check-interval=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_metadata_check_interval">
ndb_metadata_check_interval
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
60
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
31536000
</code>
</td>
</tr>
<tr>
<th>
Unit
</th>
<td>
seconds
</td>
</tr>
</tbody>
</table>
</div>
<p>
<code class="literal">
NDB
</code>
runs a metadata change detection thread
in the background to determine when the NDB dictionary has
changed with respect to the MySQL data dictionary. By
default,the interval between such checks is 60 seconds; this
can be adjusted by setting the value of
<code class="literal">
ndb_metadata_check_interval
</code>
. To enable or
disable the thread, use
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_metadata_check">
<code class="literal">
ndb_metadata_check
</code>
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndb_metadata_sync">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_metadata_sync">
<code class="literal">
ndb_metadata_sync
</code>
</a>
</p>
<a class="indexterm" name="idm46045111786704">
</a>
<a class="indexterm" name="idm46045111785664">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb_metadata_sync">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_metadata_sync">
ndb_metadata_sync
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
false
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Setting this variable causes the change monitor thread to
override any values set for
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_metadata_check">
<code class="literal">
ndb_metadata_check
</code>
</a>
or
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_metadata_check_interval">
<code class="literal">
ndb_metadata_check_interval
</code>
</a>
,
and to enter a period of continuous change detection. When the
thread ascertains that there are no more changes to be
detected, it stalls until the binary logging thread has
finished synchronization of all detected objects.
<code class="literal">
ndb_metadata_sync
</code>
is then set to
<code class="literal">
false
</code>
, and the change monitor thread
reverts to the behavior determined by the settings for
<code class="literal">
ndb_metadata_check
</code>
and
<code class="literal">
ndb_metadata_check_interval
</code>
.
</p>
<p>
Setting this variable to
<code class="literal">
true
</code>
causes the
list of excluded objects to be cleared; setting it to
<code class="literal">
false
</code>
clears the list of objects to be
retried.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndb_optimized_node_selection">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_optimized_node_selection">
<code class="literal">
ndb_optimized_node_selection
</code>
</a>
</p>
<a class="indexterm" name="idm46045111755680">
</a>
<a class="indexterm" name="idm46045111754576">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb_optimized_node_selection">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-optimized-node-selection=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_optimized_node_selection">
ndb_optimized_node_selection
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
No
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
3
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
3
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
There are two forms of optimized node selection, described
here:
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1">
<li class="listitem">
<p>
The SQL node uses
<span class="firstterm">
promixity
</span>
to
determine the transaction coordinator; that is, the
<span class="quote">
“
<span class="quote">
closest
</span>
”
</span>
data node to the SQL node is chosen
as the transaction coordinator. For this purpose, a data
node having a shared memory connection with the SQL node
is considered to be
<span class="quote">
“
<span class="quote">
closest
</span>
”
</span>
to the SQL
node; the next closest (in order of decreasing proximity)
are: TCP connection to
<code class="literal">
localhost
</code>
,
followed by TCP connection from a host other than
<code class="literal">
localhost
</code>
.
</p>
</li>
<li class="listitem">
<p>
The SQL thread uses
<span class="firstterm">
distribution
awareness
</span>
to select the data node. That is, the
data node housing the cluster partition accessed by the
first statement of a given transaction is used as the
transaction coordinator for the entire transaction. (This
is effective only if the first statement of the
transaction accesses no more than one cluster partition.)
</p>
</li>
</ol>
</div>
<p>
This option takes one of the integer values
<code class="literal">
0
</code>
,
<code class="literal">
1
</code>
,
<code class="literal">
2
</code>
, or
<code class="literal">
3
</code>
.
<code class="literal">
3
</code>
is the default. These values affect node
selection as follows:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
<code class="literal">
0
</code>
: Node selection is not optimized.
Each data node is employed as the transaction coordinator
8 times before the SQL thread proceeds to the next data
node.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
1
</code>
: Proximity to the SQL node is used to
determine the transaction coordinator.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
2
</code>
: Distribution awareness is used to
select the transaction coordinator. However, if the first
statement of the transaction accesses more than one
cluster partition, the SQL node reverts to the round-robin
behavior seen when this option is set to
<code class="literal">
0
</code>
.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
3
</code>
: If distribution awareness can be
employed to determine the transaction coordinator, then it
is used; otherwise proximity is used to select the
transaction coordinator. (This is the default behavior.)
</p>
</li>
</ul>
</div>
<p>
Proximity is determined as follows:
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1">
<li class="listitem">
<p>
Start with the value set for the
<a class="link" href="mysql-cluster-tcp-definition.html#ndbparam-tcp-group">
<code class="literal">
Group
</code>
</a>
parameter
(default 55).
</p>
</li>
<li class="listitem">
<p>
For an API node sharing the same host with other API
nodes, decrement the value by 1. Assuming the default
value for
<code class="literal">
Group
</code>
, the effective value
for data nodes on same host as the API node is 54, and for
remote data nodes 55.
</p>
</li>
<li class="listitem">
<p>
Setting
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_data_node_neighbour">
<code class="literal">
ndb_data_node_neighbour
</code>
</a>
further decreases the effective
<code class="literal">
Group
</code>
value by 50, causing this node to be regarded as the
nearest node. This is needed only when all data nodes are
on hosts other than that hosts the API node and it is
desirable to dedicate one of them to the API node. In
normal cases, the default adjustment described previously
is sufficient.
</p>
</li>
</ol>
</div>
<p>
Frequent changes in
<code class="literal">
ndb_data_node_neighbour
</code>
are not advisable, since this changes the state of the cluster
connection and thus may disrupt the selection algorithm for
new transactions from each thread until it stablilizes.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndb_read_backup">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_read_backup">
<code class="literal">
ndb_read_backup
</code>
</a>
</p>
<a class="indexterm" name="idm46045111696528">
</a>
<a class="indexterm" name="idm46045111695440">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb_read_backup">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-read-backup[={OFF|ON}]
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_read_backup">
ndb_read_backup
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
ON
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Enable read from any fragment replica for any
<code class="literal">
NDB
</code>
table subsequently created; doing so
greatly improves the table read performance at a relatively
small cost to writes.
</p>
<p>
If the SQL node and the data node use the same host name or IP
address, this fact is detected automatically, so that the
preference is to send reads to the same host. If these nodes
are on the same host but use different IP addresses, you can
tell the SQL node to use the correct data node by setting the
value of
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_data_node_neighbour">
<code class="literal">
ndb_data_node_neighbour
</code>
</a>
on
the SQL node to the node ID of the data node.
</p>
<p>
To enable or disable read from any fragment replica for an
individual table, you can set the
<code class="literal">
NDB_TABLE
</code>
option
<code class="literal">
READ_BACKUP
</code>
for the table
accordingly, in a
<a class="link" href="create-table.html" title="15.1.20 CREATE TABLE Statement">
<code class="literal">
CREATE TABLE
</code>
</a>
or
<a class="link" href="alter-table.html" title="15.1.9 ALTER TABLE Statement">
<code class="literal">
ALTER TABLE
</code>
</a>
statement; see
<a class="xref" href="create-table-ndb-comment-options.html" title="15.1.20.12 Setting NDB Comment Options">
Section 15.1.20.12, “Setting NDB Comment Options”
</a>
, for more
information.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndb_recv_thread_activation_threshold">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_recv_thread_activation_threshold">
<code class="literal">
ndb_recv_thread_activation_threshold
</code>
</a>
</p>
<a class="indexterm" name="idm46045111662720">
</a>
<a class="indexterm" name="idm46045111661680">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb_recv_thread_activation_threshold">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-recv-thread-activation-threshold=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_recv_thread_activation_threshold">
ndb_recv_thread_activation_threshold
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
8
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0 (MIN_ACTIVATION_THRESHOLD)
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
16 (MAX_ACTIVATION_THRESHOLD)
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
When this number of concurrently active threads is reached,
the receive thread takes over polling of the cluster
connection.
</p>
<p>
This variable is global in scope. It can also be set at
startup.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndb_recv_thread_cpu_mask">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_recv_thread_cpu_mask">
<code class="literal">
ndb_recv_thread_cpu_mask
</code>
</a>
</p>
<a class="indexterm" name="idm46045111631552">
</a>
<a class="indexterm" name="idm46045111630448">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb_recv_thread_cpu_mask">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-recv-thread-cpu-mask=mask
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_recv_thread_cpu_mask">
ndb_recv_thread_cpu_mask
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Bitmap
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
[empty]
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
CPU mask for locking receiver threads to specific CPUs. This
is specified as a hexadecimal bitmask. For example,
<code class="literal">
0x33
</code>
means that one CPU is used per
receiver thread. An empty string is the default; setting
<code class="literal">
ndb_recv_thread_cpu_mask
</code>
to this value
removes any receiver thread locks previously set.
</p>
<p>
This variable is global in scope. It can also be set at
startup.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndb_report_thresh_binlog_epoch_slip">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_report_thresh_binlog_epoch_slip">
<code class="literal">
ndb_report_thresh_binlog_epoch_slip
</code>
</a>
</p>
<a class="indexterm" name="idm46045111603552">
</a>
<a class="indexterm" name="idm46045111602512">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb_report_thresh_binlog_epoch_slip">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-report-thresh-binlog-epoch-slip=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_report_thresh_binlog_epoch_slip">
ndb_report_thresh_binlog_epoch_slip
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
10
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
256
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
This represents the threshold for the number of epochs
completely buffered in the event buffer, but not yet consumed
by the binlog injector thread. When this degree of slippage
(lag) is exceeded, an event buffer status message is reported,
with
<code class="literal">
BUFFERED_EPOCHS_OVER_THRESHOLD
</code>
supplied as the reason (see
<a class="xref" href="mysql-cluster-logs-event-buffer.html" title="25.6.2.3 Event Buffer Reporting in the Cluster Log">
Section 25.6.2.3, “Event Buffer Reporting in the Cluster Log”
</a>
). Slip is
increased when an epoch is received from data nodes and
buffered completely in the event buffer; it is decreased when
an epoch is consumed by the binlog injector thread, it is
reduced. Empty epochs are buffered and queued, and so included
in this calculation only when this is enabled using the
<a class="ulink" href="/doc/ndbapi/en/ndb-ndb.html#ndb-ndb-seteventbufferqueueemptyepoch" target="_top">
<code class="literal">
Ndb::setEventBufferQueueEmptyEpoch()
</code>
</a>
method from the NDB API.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndb_report_thresh_binlog_mem_usage">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_report_thresh_binlog_mem_usage">
<code class="literal">
ndb_report_thresh_binlog_mem_usage
</code>
</a>
</p>
<a class="indexterm" name="idm46045111569552">
</a>
<a class="indexterm" name="idm46045111568512">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb_report_thresh_binlog_mem_usage">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-report-thresh-binlog-mem-usage=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_report_thresh_binlog_mem_usage">
ndb_report_thresh_binlog_mem_usage
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
10
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
10
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
This is a threshold on the percentage of free memory remaining
before reporting binary log status. For example, a value of
<code class="literal">
10
</code>
(the default) means that if the amount
of available memory for receiving binary log data from the
data nodes falls below 10%, a status message is sent to the
cluster log.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndb_row_checksum">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_row_checksum">
<code class="literal">
ndb_row_checksum
</code>
</a>
</p>
<a class="indexterm" name="idm46045111538192">
</a>
<a class="indexterm" name="idm46045111537104">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb_row_checksum">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_row_checksum">
ndb_row_checksum
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global, Session
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
1
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
1
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Traditionally,
<code class="literal">
NDB
</code>
has created tables with
row checksums, which checks for hardware issues at the expense
of performance. Setting
<code class="literal">
ndb_row_checksum
</code>
to
0 means that row checksums are
<span class="emphasis">
<em>
not
</em>
</span>
used
for new or altered tables, which has a significant impact on
performance for all types of queries. This variable is set to
1 by default, to provide backward-compatible behavior.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndb_schema_dist_lock_wait_timeout">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_schema_dist_lock_wait_timeout">
<code class="literal">
ndb_schema_dist_lock_wait_timeout
</code>
</a>
</p>
<a class="indexterm" name="idm46045111507984">
</a>
<a class="indexterm" name="idm46045111506944">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb_schema_dist_lock_wait_timeout">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-schema-dist-lock-wait-timeout=value
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_schema_dist_lock_wait_timeout">
ndb_schema_dist_lock_wait_timeout
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
30
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
1200
</code>
</td>
</tr>
<tr>
<th>
Unit
</th>
<td>
seconds
</td>
</tr>
</tbody>
</table>
</div>
<p>
Number of seconds to wait during schema distribution for the
metadata lock taken on each SQL node in order to change its
local data dictionary to reflect the DDL statement change.
After this time has elapsed, a warning is returned to the
effect that a given SQL node's data dictionary was not
updated with the change. This avoids having the binary logging
thread wait an excessive length of time while handling schema
operations.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndb_schema_dist_timeout">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_schema_dist_timeout">
<code class="literal">
ndb_schema_dist_timeout
</code>
</a>
</p>
<a class="indexterm" name="idm46045111474944">
</a>
<a class="indexterm" name="idm46045111473904">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb_schema_dist_timeout">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-schema-dist-timeout=value
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_schema_dist_timeout">
ndb_schema_dist_timeout
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
No
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
120
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
5
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
1200
</code>
</td>
</tr>
<tr>
<th>
Unit
</th>
<td>
seconds
</td>
</tr>
</tbody>
</table>
</div>
<p>
Number of seconds to wait before detecting a timeout during
schema distribution. This can indicate that other SQL nodes
are experiencing excessive activity, or that they are somehow
being prevented from acquiring necessary resources at this
time.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndb_schema_dist_upgrade_allowed">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_schema_dist_upgrade_allowed">
<code class="literal">
ndb_schema_dist_upgrade_allowed
</code>
</a>
</p>
<a class="indexterm" name="idm46045111442176">
</a>
<a class="indexterm" name="idm46045111441072">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb_schema_dist_upgrade_allowed">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-schema-dist-upgrade-allowed=value
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_schema_dist_upgrade_allowed">
ndb_schema_dist_upgrade_allowed
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
No
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
true
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Allow upgrading of the schema distribution table when
connecting to
<code class="literal">
NDB
</code>
. When true (the default),
this change is deferred until all SQL nodes have been upgraded
to the same version of the NDB Cluster software.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
The performance of the schema distribution may be somewhat
degraded until the upgrade has been performed.
</p>
</div>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndb_show_foreign_key_mock_tables">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_show_foreign_key_mock_tables">
<code class="literal">
ndb_show_foreign_key_mock_tables
</code>
</a>
</p>
<a class="indexterm" name="idm46045111414624">
</a>
<a class="indexterm" name="idm46045111413520">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb_show_foreign_key_mock_tables">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-show-foreign-key-mock-tables[={OFF|ON}]
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_show_foreign_key_mock_tables">
ndb_show_foreign_key_mock_tables
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
OFF
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Show the mock tables used by
<code class="literal">
NDB
</code>
to support
<a class="link" href="server-system-variables.html#sysvar_foreign_key_checks">
<code class="literal">
foreign_key_checks=0
</code>
</a>
. When
this is enabled, extra warnings are shown when creating and
dropping the tables. The real (internal) name of the table can
be seen in the output of
<a class="link" href="show-create-table.html" title="15.7.7.11 SHOW CREATE TABLE Statement">
<code class="literal">
SHOW CREATE
TABLE
</code>
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndb_slave_conflict_role">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_slave_conflict_role">
<code class="literal">
ndb_slave_conflict_role
</code>
</a>
</p>
<a class="indexterm" name="idm46045111385552">
</a>
<a class="indexterm" name="idm46045111384512">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb_slave_conflict_role">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-slave-conflict-role=value
</code>
</td>
</tr>
<tr>
<th>
Deprecated
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_slave_conflict_role">
ndb_slave_conflict_role
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Enumeration
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
NONE
</code>
</td>
</tr>
<tr>
<th>
Valid Values
</th>
<td>
<p class="valid-value">
<code class="literal">
NONE
</code>
</p>
<p class="valid-value">
<code class="literal">
PRIMARY
</code>
</p>
<p class="valid-value">
<code class="literal">
SECONDARY
</code>
</p>
<p class="valid-value">
<code class="literal">
PASS
</code>
</p>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Deprecated synonym for
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_conflict_role">
<code class="literal">
ndb_conflict_role
</code>
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndb_table_no_logging">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_table_no_logging">
<code class="literal">
ndb_table_no_logging
</code>
</a>
</p>
<a class="indexterm" name="idm46045111350944">
</a>
<a class="indexterm" name="idm46045111349904">
</a>
<a class="indexterm" name="idm46045111348416">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb_table_no_logging">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_table_no_logging">
ndb_table_no_logging
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Session
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
OFF
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
When this variable is set to
<code class="literal">
ON
</code>
or
<code class="literal">
1
</code>
, it causes all tables created or altered
using
<code class="literal">
ENGINE NDB
</code>
to be nonlogging; that is,
no data changes for this table are written to the redo log or
checkpointed to disk, just as if the table had been created or
altered using the
<code class="literal">
NOLOGGING
</code>
option for
<a class="link" href="create-table.html" title="15.1.20 CREATE TABLE Statement">
<code class="literal">
CREATE TABLE
</code>
</a>
or
<a class="link" href="alter-table.html" title="15.1.9 ALTER TABLE Statement">
<code class="literal">
ALTER TABLE
</code>
</a>
.
</p>
<p>
For more information about nonlogging
<code class="literal">
NDB
</code>
tables, see
<a class="xref" href="create-table-ndb-comment-options.html#create-table-ndb-comment-table-options" title="NDB_TABLE Options">
NDB_TABLE Options
</a>
.
</p>
<p>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_table_no_logging">
<code class="literal">
ndb_table_no_logging
</code>
</a>
has no
effect on the creation of
<a class="link" href="mysql-cluster.html" title="Chapter 25 MySQL NDB Cluster 8.4">
<code class="literal">
NDB
</code>
</a>
table schema files; to suppress these, use
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_table_temporary">
<code class="literal">
ndb_table_temporary
</code>
</a>
instead.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndb_table_temporary">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_table_temporary">
<code class="literal">
ndb_table_temporary
</code>
</a>
</p>
<a class="indexterm" name="idm46045111314720">
</a>
<a class="indexterm" name="idm46045111313680">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb_table_temporary">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_table_temporary">
ndb_table_temporary
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Session
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
OFF
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
When set to
<code class="literal">
ON
</code>
or
<code class="literal">
1
</code>
,
this variable causes
<a class="link" href="mysql-cluster.html" title="Chapter 25 MySQL NDB Cluster 8.4">
<code class="literal">
NDB
</code>
</a>
tables
not to be written to disk: This means that no table schema
files are created, and that the tables are not logged.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
Setting this variable currently has no effect. This is a
known issue; see Bug #34036.
</p>
</div>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndb_use_copying_alter_table">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_use_copying_alter_table">
<code class="literal">
ndb_use_copying_alter_table
</code>
</a>
</p>
<a class="indexterm" name="idm46045111287984">
</a>
<a class="indexterm" name="idm46045111286880">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb_use_copying_alter_table">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_use_copying_alter_table">
ndb_use_copying_alter_table
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global, Session
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
No
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
</tbody>
</table>
</div>
<p>
Forces
<a class="link" href="mysql-cluster.html" title="Chapter 25 MySQL NDB Cluster 8.4">
<code class="literal">
NDB
</code>
</a>
to use copying of
tables in the event of problems with online
<a class="link" href="alter-table.html" title="15.1.9 ALTER TABLE Statement">
<code class="literal">
ALTER TABLE
</code>
</a>
operations. The
default value is
<code class="literal">
OFF
</code>
.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndb_use_exact_count">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_use_exact_count">
<code class="literal">
ndb_use_exact_count
</code>
</a>
</p>
<a class="indexterm" name="idm46045111265984">
</a>
<a class="indexterm" name="idm46045111264944">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb_use_exact_count">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_use_exact_count">
ndb_use_exact_count
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global, Session
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
OFF
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Forces
<a class="link" href="mysql-cluster.html" title="Chapter 25 MySQL NDB Cluster 8.4">
<code class="literal">
NDB
</code>
</a>
to use a count of
records during
<code class="literal">
SELECT COUNT(*)
</code>
query
planning to speed up this type of query. The default value is
<code class="literal">
OFF
</code>
, which allows for faster queries
overall.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndb_use_transactions">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_use_transactions">
<code class="literal">
ndb_use_transactions
</code>
</a>
</p>
<a class="indexterm" name="idm46045111240144">
</a>
<a class="indexterm" name="idm46045111239104">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb_use_transactions">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-use-transactions[={OFF|ON}]
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_use_transactions">
ndb_use_transactions
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global, Session
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
ON
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
You can disable
<code class="literal">
NDB
</code>
transaction support by
setting this variable's value to
<code class="literal">
OFF
</code>
.
This is generally not recommended, although it may be useful
to disable transaction support within a given client session
when that session is used to import one or more dump files
with large transactions; this allows a multi-row insert to be
executed in parts, rather than as a single transaction. In
such cases, once the import has been completed, you should
either reset the variable value for this session to
<code class="literal">
ON
</code>
, or simply terminate the session.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndb_version">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_version">
<code class="literal">
ndb_version
</code>
</a>
</p>
<a class="indexterm" name="idm46045111212080">
</a>
<a class="indexterm" name="idm46045111210992">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb_version">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_version">
ndb_version
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
No
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
<code class="literal">
NDB
</code>
engine version, as a composite integer.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndb_version_string">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_version_string">
<code class="literal">
ndb_version_string
</code>
</a>
</p>
<a class="indexterm" name="idm46045111188368">
</a>
<a class="indexterm" name="idm46045111187328">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb_version_string">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_version_string">
ndb_version_string
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
No
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
<code class="literal">
NDB
</code>
engine version in
<code class="literal">
ndb-
<em class="replaceable">
<code>
x.y.z
</code>
</em>
</code>
format.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_replica_allow_batching">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_replica_allow_batching">
<code class="literal">
replica_allow_batching
</code>
</a>
</p>
<a class="indexterm" name="idm46045111163664">
</a>
<a class="indexterm" name="idm46045111162624">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for replica_allow_batching">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--replica-allow-batching[={OFF|ON}]
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_replica_allow_batching">
replica_allow_batching
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
ON
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Whether or not batched updates are enabled on NDB Cluster
replicas.
</p>
<p>
Allowing batched updates on the replica greatly improves
performance, particularly when replicating
<a class="link" href="blob.html" title="13.3.4 The BLOB and TEXT Types">
<code class="literal">
TEXT
</code>
</a>
,
<a class="link" href="blob.html" title="13.3.4 The BLOB and TEXT Types">
<code class="literal">
BLOB
</code>
</a>
, and
<a class="link" href="json.html" title="13.5 The JSON Data Type">
<code class="literal">
JSON
</code>
</a>
columns. For this reason,
<code class="literal">
replica_allow_batching
</code>
is enabled by
default.
</p>
<p>
Setting this variable has an effect only when using
replication with the
<code class="literal">
NDB
</code>
storage engine; in
MySQL Server 8.4, it is present but does nothing.
For more information, see
<a class="xref" href="mysql-cluster-replication-starting.html" title="25.7.6 Starting NDB Cluster Replication (Single Replication Channel)">
Section 25.7.6, “Starting NDB Cluster Replication (Single Replication Channel)”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndb_replica_batch_size">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_replica_batch_size">
<code class="literal">
ndb_replica_batch_size
</code>
</a>
</p>
<a class="indexterm" name="idm46045111130944">
</a>
<a class="indexterm" name="idm46045111129904">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb_replica_batch_size">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-replica-batch-size=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_replica_batch_size">
ndb_replica_batch_size
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
2097152
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
2147483648
</code>
</td>
</tr>
<tr>
<th>
Unit
</th>
<td>
bytes
</td>
</tr>
</tbody>
</table>
</div>
<p>
Determines the batch size in bytes used by the replication
applier thread. Set this variable rather than the
<a class="link" href="mysql-cluster-options-variables.html#option_mysqld_ndb-batch-size">
<code class="option">
--ndb-batch-size
</code>
</a>
option to
apply this setting to the replica, exclusive of any other
sessions.
</p>
<p>
If this variable is unset (default 2 MB), its effective value
is the greater of the value of
<code class="option">
--ndb-batch-size
</code>
and 2 MB.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndb_replica_blob_write_batch_bytes">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_replica_blob_write_batch_bytes">
<code class="literal">
ndb_replica_blob_write_batch_bytes
</code>
</a>
</p>
<a class="indexterm" name="idm46045111096112">
</a>
<a class="indexterm" name="idm46045111095072">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndb_replica_blob_write_batch_bytes">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndb-replica-blob-write-batch-bytes=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndb_replica_blob_write_batch_bytes">
ndb_replica_blob_write_batch_bytes
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
2097152
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
2147483648
</code>
</td>
</tr>
<tr>
<th>
Unit
</th>
<td>
bytes
</td>
</tr>
</tbody>
</table>
</div>
<p>
Control the batch write size used for blob data by the
replication applier thread.
</p>
<p>
Use this variable rather than the
<a class="link" href="mysql-cluster-options-variables.html#option_mysqld_ndb-blob-write-batch-bytes">
<code class="option">
--ndb-blob-write-batch-bytes
</code>
</a>
option to control the blob batch write size on the replica,
exclusive of any other sessions. The reason for this is that,
when
<code class="literal">
ndb_replica_blob_write_batch_bytes
</code>
is not
set,the effective blob batch size (that is, the maximum
number of pending bytes to write for blob columns) is
determined by the greater of the value of
<code class="option">
--ndb-blob-write-batch-bytes
</code>
and 2 MB (the
default for
<code class="literal">
ndb_replica_blob_write_batch_bytes
</code>
).
</p>
<p>
Setting
<code class="literal">
ndb_replica_blob_write_batch_bytes
</code>
to 0 means that
<code class="literal">
NDB
</code>
imposes no limit on the
size of blob batch writes on the replica.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_server_id_bits">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_server_id_bits">
<code class="literal">
server_id_bits
</code>
</a>
</p>
<a class="indexterm" name="idm46045111057840">
</a>
<a class="indexterm" name="idm46045111056752">
</a>
<a class="indexterm" name="idm46045111055264">
</a>
<a class="indexterm" name="idm46045111054176">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for server_id_bits">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--server-id-bits=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_server_id_bits">
server_id_bits
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
No
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
32
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
7
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
32
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
This variable indicates the number of least significant bits
within the 32-bit
<a class="link" href="replication-options.html#sysvar_server_id">
<code class="literal">
server_id
</code>
</a>
which actually identify the server. Indicating that the server
is actually identified by fewer than 32 bits makes it possible
for some of the remaining bits to be used for other purposes,
such as storing user data generated by applications using the
NDB API's Event API within the
<code class="literal">
AnyValue
</code>
of an
<a class="ulink" href="/doc/ndbapi/en/ndb-ndboperation.html#ndb-ndboperation-operationoptions" target="_top">
<code class="literal">
OperationOptions
</code>
</a>
structure (NDB Cluster uses the
<code class="literal">
AnyValue
</code>
to
store the server ID).
</p>
<p>
When extracting the effective server ID from
<a class="link" href="replication-options.html#sysvar_server_id">
<code class="literal">
server_id
</code>
</a>
for purposes such
as detection of replication loops, the server ignores the
remaining bits. The
<a class="link" href="mysql-cluster-options-variables.html#sysvar_server_id_bits">
<code class="literal">
server_id_bits
</code>
</a>
variable is
used to mask out any irrelevant bits of
<a class="link" href="replication-options.html#sysvar_server_id">
<code class="literal">
server_id
</code>
</a>
in the I/O and SQL
threads when deciding whether an event should be ignored based
on the server ID.
</p>
<p>
This data can be read from the binary log by
<a class="link" href="mysqlbinlog.html" title="6.6.9 mysqlbinlog — Utility for Processing Binary Log Files">
<span class="command">
<strong>
mysqlbinlog
</strong>
</span>
</a>
, provided that it is run with
its own
<a class="link" href="mysql-cluster-options-variables.html#sysvar_server_id_bits">
<code class="literal">
server_id_bits
</code>
</a>
variable set to 32 (the default).
</p>
<p>
If the value of
<a class="link" href="replication-options.html#sysvar_server_id">
<code class="literal">
server_id
</code>
</a>
greater than or equal to 2 to the power of
<a class="link" href="mysql-cluster-options-variables.html#sysvar_server_id_bits">
<code class="literal">
server_id_bits
</code>
</a>
; otherwise,
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
refuses to start.
</p>
<p>
This system variable is supported only by NDB Cluster. It is
not supported in the standard MySQL 8.4 Server.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_slave_allow_batching">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_slave_allow_batching">
<code class="literal">
slave_allow_batching
</code>
</a>
</p>
<a class="indexterm" name="idm46045111008320">
</a>
<a class="indexterm" name="idm46045111007280">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for slave_allow_batching">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--slave-allow-batching[={OFF|ON}]
</code>
</td>
</tr>
<tr>
<th>
Deprecated
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_slave_allow_batching">
slave_allow_batching
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
ON
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Deprecated synonym for
<a class="link" href="mysql-cluster-options-variables.html#sysvar_replica_allow_batching">
<code class="literal">
replica_allow_batching
</code>
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_transaction_allow_batching">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_transaction_allow_batching">
<code class="literal">
transaction_allow_batching
</code>
</a>
</p>
<a class="indexterm" name="idm46045110979504">
</a>
<a class="indexterm" name="idm46045110978384">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for transaction_allow_batching">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_transaction_allow_batching">
transaction_allow_batching
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Session
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
OFF
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
When set to
<code class="literal">
1
</code>
or
<code class="literal">
ON
</code>
,
this variable enables batching of statements within the same
transaction. To use this variable,
<a class="link" href="server-system-variables.html#sysvar_autocommit">
<code class="literal">
autocommit
</code>
</a>
must first be
disabled by setting it to
<code class="literal">
0
</code>
or
<code class="literal">
OFF
</code>
; otherwise, setting
<a class="link" href="mysql-cluster-options-variables.html#sysvar_transaction_allow_batching">
<code class="literal">
transaction_allow_batching
</code>
</a>
has no effect.
</p>
<p>
It is safe to use this variable with transactions that
performs writes only, as having it enabled can lead to reads
from the
<span class="quote">
“
<span class="quote">
before
</span>
”
</span>
image. You should ensure that
any pending transactions are committed (using an explicit
<a class="link" href="commit.html" title="15.3.1 START TRANSACTION, COMMIT, and ROLLBACK Statements">
<code class="literal">
COMMIT
</code>
</a>
if desired) before
issuing a
<a class="link" href="select.html" title="15.2.13 SELECT Statement">
<code class="literal">
SELECT
</code>
</a>
.
</p>
<div class="important" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Important
</div>
<p>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_transaction_allow_batching">
<code class="literal">
transaction_allow_batching
</code>
</a>
should not be used whenever there is the possibility that
the effects of a given statement depend on the outcome of a
previous statement within the same transaction.
</p>
</div>
<p>
This variable is currently supported for NDB Cluster only.
</p>
</li>
</ul>
</div>
<p>
The system variables in the following list all relate to the
<a class="link" href="mysql-cluster-ndbinfo.html" title="25.6.17 ndbinfo: The NDB Cluster Information Database">
<code class="literal">
ndbinfo
</code>
</a>
information database.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<a name="sysvar_ndbinfo_database">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndbinfo_database">
<code class="literal">
ndbinfo_database
</code>
</a>
</p>
<a class="indexterm" name="idm46045110942544">
</a>
<a class="indexterm" name="idm46045110941456">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndbinfo_database">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndbinfo_database">
ndbinfo_database
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
No
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
ndbinfo
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Shows the name used for the
<code class="literal">
NDB
</code>
information
database; the default is
<code class="literal">
ndbinfo
</code>
. This is a
read-only variable whose value is determined at compile time.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndbinfo_max_bytes">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndbinfo_max_bytes">
<code class="literal">
ndbinfo_max_bytes
</code>
</a>
</p>
<a class="indexterm" name="idm46045110917888">
</a>
<a class="indexterm" name="idm46045110916848">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndbinfo_max_bytes">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndbinfo-max-bytes=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndbinfo_max_bytes">
ndbinfo_max_bytes
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global, Session
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
65535
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Used in testing and debugging only.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndbinfo_max_rows">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndbinfo_max_rows">
<code class="literal">
ndbinfo_max_rows
</code>
</a>
</p>
<a class="indexterm" name="idm46045110887584">
</a>
<a class="indexterm" name="idm46045110886496">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndbinfo_max_rows">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndbinfo-max-rows=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndbinfo_max_rows">
ndbinfo_max_rows
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global, Session
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
10
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
1
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
256
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Used in testing and debugging only.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndbinfo_offline">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndbinfo_offline">
<code class="literal">
ndbinfo_offline
</code>
</a>
</p>
<a class="indexterm" name="idm46045110857296">
</a>
<a class="indexterm" name="idm46045110856208">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndbinfo_offline">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndbinfo_offline">
ndbinfo_offline
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
OFF
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Place the
<a class="link" href="mysql-cluster-ndbinfo.html" title="25.6.17 ndbinfo: The NDB Cluster Information Database">
<code class="literal">
ndbinfo
</code>
</a>
database
into offline mode, in which tables and views can be opened
even when they do not actually exist, or when they exist but
have different definitions in
<a class="link" href="mysql-cluster.html" title="Chapter 25 MySQL NDB Cluster 8.4">
<code class="literal">
NDB
</code>
</a>
. No rows are returned from
such tables (or views).
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndbinfo_show_hidden">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndbinfo_show_hidden">
<code class="literal">
ndbinfo_show_hidden
</code>
</a>
</p>
<a class="indexterm" name="idm46045110831472">
</a>
<a class="indexterm" name="idm46045110830432">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndbinfo_show_hidden">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ndbinfo-show-hidden[={OFF|ON}]
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndbinfo_show_hidden">
ndbinfo_show_hidden
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global, Session
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
OFF
</code>
</td>
</tr>
<tr>
<th>
Valid Values
</th>
<td>
<p class="valid-value">
<code class="literal">
ON
</code>
</p>
<p class="valid-value">
<code class="literal">
OFF
</code>
</p>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Whether or not the
<a class="link" href="mysql-cluster-ndbinfo.html" title="25.6.17 ndbinfo: The NDB Cluster Information Database">
<code class="literal">
ndbinfo
</code>
</a>
database's underlying internal tables are shown in the
<a class="link" href="mysql.html" title="6.5.1 mysql — The MySQL Command-Line Client">
<span class="command">
<strong>
mysql
</strong>
</span>
</a>
client. The default is
<code class="literal">
OFF
</code>
.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
When
<code class="literal">
ndbinfo_show_hidden
</code>
is enabled, the
internal tables are shown in the
<code class="literal">
ndbinfo
</code>
database only; they are not visible in
<a class="link" href="information-schema-tables-table.html" title="28.3.38 The INFORMATION_SCHEMA TABLES Table">
<code class="literal">
TABLES
</code>
</a>
or other
<code class="literal">
INFORMATION_SCHEMA
</code>
tables, regardless of
the variable's setting.
</p>
</div>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndbinfo_table_prefix">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndbinfo_table_prefix">
<code class="literal">
ndbinfo_table_prefix
</code>
</a>
</p>
<a class="indexterm" name="idm46045110794512">
</a>
<a class="indexterm" name="idm46045110793472">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndbinfo_table_prefix">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndbinfo_table_prefix">
ndbinfo_table_prefix
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
No
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
ndb$
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
The prefix used in naming the ndbinfo database's base
tables (normally hidden, unless exposed by setting
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndbinfo_show_hidden">
<code class="literal">
ndbinfo_show_hidden
</code>
</a>
). This is
a read-only variable whose default value is
<code class="literal">
ndb$
</code>
; the prefix itself is determined at
compile time.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_ndbinfo_version">
</a>
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndbinfo_version">
<code class="literal">
ndbinfo_version
</code>
</a>
</p>
<a class="indexterm" name="idm46045110769232">
</a>
<a class="indexterm" name="idm46045110768144">
</a>
<a class="indexterm" name="idm46045110766656">
</a>
<a class="indexterm" name="idm46045110765568">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ndbinfo_version">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="mysql-cluster-options-variables.html#sysvar_ndbinfo_version">
ndbinfo_version
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
No
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Shows the version of the
<a class="link" href="mysql-cluster-ndbinfo.html" title="25.6.17 ndbinfo: The NDB Cluster Information Database">
<code class="literal">
ndbinfo
</code>
</a>
engine in use;
read-only.
</p>
</li>
</ul>
</div>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h5 class="title">
<a name="mysql-cluster-status-variables">
</a>
25.4.3.9.3 NDB Cluster Status Variables
</h5>
</div>
</div>
</div>
<a class="indexterm" name="idm46045110743312">
</a>
<a class="indexterm" name="idm46045110741824">
</a>
<p>
This section provides detailed information about MySQL server
status variables that relate to NDB Cluster and the
<a class="link" href="mysql-cluster.html" title="Chapter 25 MySQL NDB Cluster 8.4">
<code class="literal">
NDB
</code>
</a>
storage engine. For status
variables not specific to NDB Cluster, and for general information
on using status variables, see
<a class="xref" href="server-status-variables.html" title="7.1.10 Server Status Variables">
Section 7.1.10, “Server Status Variables”
</a>
.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<a name="statvar_Handler_discover">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Handler_discover">
<code class="literal">
Handler_discover
</code>
</a>
</p>
<a class="indexterm" name="idm46045110735232">
</a>
<a class="indexterm" name="idm46045110734192">
</a>
<p>
The MySQL server can ask the
<a class="link" href="mysql-cluster.html" title="Chapter 25 MySQL NDB Cluster 8.4">
<code class="literal">
NDBCLUSTER
</code>
</a>
storage engine if it
knows about a table with a given name. This is called
discovery.
<a class="link" href="mysql-cluster-options-variables.html#statvar_Handler_discover">
<code class="literal">
Handler_discover
</code>
</a>
indicates the number of times that tables have been discovered
using this mechanism.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_adaptive_send_deferred_count">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_adaptive_send_deferred_count">
<code class="literal">
Ndb_api_adaptive_send_deferred_count
</code>
</a>
</p>
<a class="indexterm" name="idm46045110727024">
</a>
<a class="indexterm" name="idm46045110725984">
</a>
<p>
Number of adaptive send calls that were not actually sent.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_adaptive_send_deferred_count_session">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_adaptive_send_deferred_count_session">
<code class="literal">
Ndb_api_adaptive_send_deferred_count_session
</code>
</a>
</p>
<a class="indexterm" name="idm46045110720240">
</a>
<a class="indexterm" name="idm46045110719120">
</a>
<p>
Number of adaptive send calls that were not actually sent.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_adaptive_send_deferred_count_replica">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_adaptive_send_deferred_count_replica">
<code class="literal">
Ndb_api_adaptive_send_deferred_count_replica
</code>
</a>
</p>
<a class="indexterm" name="idm46045110713472">
</a>
<a class="indexterm" name="idm46045110712352">
</a>
<p>
Number of adaptive send calls that were not actually sent by
this replica.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_adaptive_send_deferred_count_slave">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_adaptive_send_deferred_count_slave">
<code class="literal">
Ndb_api_adaptive_send_deferred_count_slave
</code>
</a>
</p>
<a class="indexterm" name="idm46045110706608">
</a>
<a class="indexterm" name="idm46045110705488">
</a>
<p>
Deprecated synonym for
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_adaptive_send_deferred_count_replica">
<code class="literal">
Ndb_api_adaptive_send_deferred_count_replica
</code>
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_adaptive_send_forced_count">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_adaptive_send_forced_count">
<code class="literal">
Ndb_api_adaptive_send_forced_count
</code>
</a>
</p>
<a class="indexterm" name="idm46045110699648">
</a>
<a class="indexterm" name="idm46045110698608">
</a>
<p>
Number of adaptive send calls using forced-send sent by this
MySQL Server (SQL node).
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_adaptive_send_forced_count_session">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_adaptive_send_forced_count_session">
<code class="literal">
Ndb_api_adaptive_send_forced_count_session
</code>
</a>
</p>
<a class="indexterm" name="idm46045110692880">
</a>
<a class="indexterm" name="idm46045110691760">
</a>
<p>
Number of adaptive send calls using forced-send sent in this
client session.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_adaptive_send_forced_count_replica">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_adaptive_send_forced_count_replica">
<code class="literal">
Ndb_api_adaptive_send_forced_count_replica
</code>
</a>
</p>
<a class="indexterm" name="idm46045110686080">
</a>
<a class="indexterm" name="idm46045110684960">
</a>
<p>
Number of adaptive send calls using forced-send sent by this
replica.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_adaptive_send_forced_count_slave">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_adaptive_send_forced_count_slave">
<code class="literal">
Ndb_api_adaptive_send_forced_count_slave
</code>
</a>
</p>
<a class="indexterm" name="idm46045110679296">
</a>
<a class="indexterm" name="idm46045110678176">
</a>
<p>
Deprecated synonym for
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_adaptive_send_forced_count_replica">
<code class="literal">
Ndb_api_adaptive_send_forced_count_replica
</code>
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_adaptive_send_unforced_count">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_adaptive_send_unforced_count">
<code class="literal">
Ndb_api_adaptive_send_unforced_count
</code>
</a>
</p>
<a class="indexterm" name="idm46045110672272">
</a>
<a class="indexterm" name="idm46045110671232">
</a>
<p>
Number of adaptive send calls without forced-send sent by this
MySQL server (SQL node).
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_adaptive_send_unforced_count_session">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_adaptive_send_unforced_count_session">
<code class="literal">
Ndb_api_adaptive_send_unforced_count_session
</code>
</a>
</p>
<a class="indexterm" name="idm46045110665504">
</a>
<a class="indexterm" name="idm46045110664384">
</a>
<p>
Number of adaptive send calls without forced-send sent in this
client session.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_adaptive_send_unforced_count_replica">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_adaptive_send_unforced_count_replica">
<code class="literal">
Ndb_api_adaptive_send_unforced_count_replica
</code>
</a>
</p>
<a class="indexterm" name="idm46045110658704">
</a>
<a class="indexterm" name="idm46045110657584">
</a>
<p>
Number of adaptive send calls without forced-send sent by this
replica.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_adaptive_send_unforced_count_slave">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_adaptive_send_unforced_count_slave">
<code class="literal">
Ndb_api_adaptive_send_unforced_count_slave
</code>
</a>
</p>
<a class="indexterm" name="idm46045110651920">
</a>
<a class="indexterm" name="idm46045110650800">
</a>
<p>
Deprecated synonym for
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_adaptive_send_unforced_count_replica">
<code class="literal">
Ndb_api_adaptive_send_unforced_count_replica
</code>
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_bytes_sent_count_session">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_bytes_sent_count_session">
<code class="literal">
Ndb_api_bytes_sent_count_session
</code>
</a>
</p>
<a class="indexterm" name="idm46045110644960">
</a>
<a class="indexterm" name="idm46045110643920">
</a>
<p>
Amount of data (in bytes) sent to the data nodes in this
client session.
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it relates to the current session only, and
is not affected by any other clients of this
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_bytes_sent_count_replica">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_bytes_sent_count_replica">
<code class="literal">
Ndb_api_bytes_sent_count_replica
</code>
</a>
</p>
<a class="indexterm" name="idm46045110633936">
</a>
<a class="indexterm" name="idm46045110632896">
</a>
<p>
Amount of data (in bytes) sent to the data nodes by this
replica.
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it is effectively global in scope. If this
MySQL server does not act as a replica, or does not use NDB
tables, this value is always 0.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_bytes_sent_count_slave">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_bytes_sent_count_slave">
<code class="literal">
Ndb_api_bytes_sent_count_slave
</code>
</a>
</p>
<a class="indexterm" name="idm46045110624160">
</a>
<a class="indexterm" name="idm46045110623056">
</a>
<p>
Deprecated synonym for
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_bytes_sent_count_replica">
<code class="literal">
Ndb_api_bytes_sent_count_replica
</code>
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_bytes_sent_count">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_bytes_sent_count">
<code class="literal">
Ndb_api_bytes_sent_count
</code>
</a>
</p>
<a class="indexterm" name="idm46045110617376">
</a>
<a class="indexterm" name="idm46045110616272">
</a>
<p>
Amount of data (in bytes) sent to the data nodes by this MySQL
Server (SQL node).
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it is effectively global in scope.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_bytes_received_count_session">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_bytes_received_count_session">
<code class="literal">
Ndb_api_bytes_received_count_session
</code>
</a>
</p>
<a class="indexterm" name="idm46045110607568">
</a>
<a class="indexterm" name="idm46045110606528">
</a>
<p>
Amount of data (in bytes) received from the data nodes in this
client session.
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it relates to the current session only, and
is not affected by any other clients of this
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_bytes_received_count_replica">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_bytes_received_count_replica">
<code class="literal">
Ndb_api_bytes_received_count_replica
</code>
</a>
</p>
<a class="indexterm" name="idm46045110596528">
</a>
<a class="indexterm" name="idm46045110595488">
</a>
<p>
Amount of data (in bytes) received from the data nodes by this
replica.
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it is effectively global in scope. If this
MySQL server does not act as a replica, or does not use NDB
tables, this value is always 0.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_bytes_received_count_slave">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_bytes_received_count_slave">
<code class="literal">
Ndb_api_bytes_received_count_slave
</code>
</a>
</p>
<a class="indexterm" name="idm46045110586624">
</a>
<a class="indexterm" name="idm46045110585584">
</a>
<p>
Deprecated synonym for
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_bytes_received_count_replica">
<code class="literal">
Ndb_api_bytes_received_count_replica
</code>
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_bytes_received_count">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_bytes_received_count">
<code class="literal">
Ndb_api_bytes_received_count
</code>
</a>
</p>
<a class="indexterm" name="idm46045110579840">
</a>
<a class="indexterm" name="idm46045110578736">
</a>
<p>
Amount of data (in bytes) received from the data nodes by this
MySQL Server (SQL node).
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it is effectively global in scope.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_event_data_count_injector">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_event_data_count_injector">
<code class="literal">
Ndb_api_event_data_count_injector
</code>
</a>
</p>
<a class="indexterm" name="idm46045110569968">
</a>
<a class="indexterm" name="idm46045110568928">
</a>
<p>
The number of row change events received by the NDB binlog
injector thread.
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it is effectively global in scope.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_event_data_count">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_event_data_count">
<code class="literal">
Ndb_api_event_data_count
</code>
</a>
</p>
<a class="indexterm" name="idm46045110560288">
</a>
<a class="indexterm" name="idm46045110559184">
</a>
<p>
The number of row change events received by this MySQL Server
(SQL node).
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it is effectively global in scope.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_event_nondata_count_injector">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_event_nondata_count_injector">
<code class="literal">
Ndb_api_event_nondata_count_injector
</code>
</a>
</p>
<a class="indexterm" name="idm46045110550496">
</a>
<a class="indexterm" name="idm46045110549456">
</a>
<p>
The number of events received, other than row change events,
by the NDB binary log injector thread.
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it is effectively global in scope.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_event_nondata_count">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_event_nondata_count">
<code class="literal">
Ndb_api_event_nondata_count
</code>
</a>
</p>
<a class="indexterm" name="idm46045110540800">
</a>
<a class="indexterm" name="idm46045110539696">
</a>
<p>
The number of events received, other than row change events,
by this MySQL Server (SQL node).
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it is effectively global in scope.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_event_bytes_count_injector">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_event_bytes_count_injector">
<code class="literal">
Ndb_api_event_bytes_count_injector
</code>
</a>
</p>
<a class="indexterm" name="idm46045110530912">
</a>
<a class="indexterm" name="idm46045110529872">
</a>
<p>
The number of bytes of events received by the NDB binlog
injector thread.
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it is effectively global in scope.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_event_bytes_count">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_event_bytes_count">
<code class="literal">
Ndb_api_event_bytes_count
</code>
</a>
</p>
<a class="indexterm" name="idm46045110521312">
</a>
<a class="indexterm" name="idm46045110520208">
</a>
<p>
The number of bytes of events received by this MySQL Server
(SQL node).
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it is effectively global in scope.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_pk_op_count_session">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_pk_op_count_session">
<code class="literal">
Ndb_api_pk_op_count_session
</code>
</a>
</p>
<a class="indexterm" name="idm46045110511584">
</a>
<a class="indexterm" name="idm46045110510480">
</a>
<p>
The number of operations in this client session based on or
using primary keys. This includes operations on blob tables,
implicit unlock operations, and auto-increment operations, as
well as user-visible primary key operations.
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it relates to the current session only, and
is not affected by any other clients of this
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_pk_op_count_replica">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_pk_op_count_replica">
<code class="literal">
Ndb_api_pk_op_count_replica
</code>
</a>
</p>
<a class="indexterm" name="idm46045110500448">
</a>
<a class="indexterm" name="idm46045110499344">
</a>
<p>
The number of operations by this replica based on or using
primary keys. This includes operations on blob tables,
implicit unlock operations, and auto-increment operations, as
well as user-visible primary key operations.
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it is effectively global in scope. If this
MySQL server does not act as a replica, or does not use NDB
tables, this value is always 0.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_pk_op_count_slave">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_pk_op_count_slave">
<code class="literal">
Ndb_api_pk_op_count_slave
</code>
</a>
</p>
<a class="indexterm" name="idm46045110490432">
</a>
<a class="indexterm" name="idm46045110489328">
</a>
<p>
Deprecated synonym for
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_pk_op_count_replica">
<code class="literal">
Ndb_api_pk_op_count_replica
</code>
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_pk_op_count">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_pk_op_count">
<code class="literal">
Ndb_api_pk_op_count
</code>
</a>
</p>
<a class="indexterm" name="idm46045110483584">
</a>
<a class="indexterm" name="idm46045110482544">
</a>
<p>
The number of operations by this MySQL Server (SQL node) based
on or using primary keys. This includes operations on blob
tables, implicit unlock operations, and auto-increment
operations, as well as user-visible primary key operations.
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it is effectively global in scope.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_pruned_scan_count_session">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_pruned_scan_count_session">
<code class="literal">
Ndb_api_pruned_scan_count_session
</code>
</a>
</p>
<a class="indexterm" name="idm46045110473680">
</a>
<a class="indexterm" name="idm46045110472640">
</a>
<p>
The number of scans in this client session that have been
pruned to a single partition.
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it relates to the current session only, and
is not affected by any other clients of this
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_pruned_scan_count_replica">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_pruned_scan_count_replica">
<code class="literal">
Ndb_api_pruned_scan_count_replica
</code>
</a>
</p>
<a class="indexterm" name="idm46045110462640">
</a>
<a class="indexterm" name="idm46045110461600">
</a>
<p>
The number of scans by this replica that have been pruned to a
single partition.
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it is effectively global in scope. If this
MySQL server does not act as a replica, or does not use NDB
tables, this value is always 0.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_pruned_scan_count_slave">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_pruned_scan_count_slave">
<code class="literal">
Ndb_api_pruned_scan_count_slave
</code>
</a>
</p>
<a class="indexterm" name="idm46045110452848">
</a>
<a class="indexterm" name="idm46045110451744">
</a>
<p>
Deprecated synonym for
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_pruned_scan_count_replica">
<code class="literal">
Ndb_api_pruned_scan_count_replica
</code>
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_pruned_scan_count">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_pruned_scan_count">
<code class="literal">
Ndb_api_pruned_scan_count
</code>
</a>
</p>
<a class="indexterm" name="idm46045110446000">
</a>
<a class="indexterm" name="idm46045110444896">
</a>
<p>
The number of scans by this MySQL Server (SQL node) that have
been pruned to a single partition.
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it is effectively global in scope.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_range_scan_count_session">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_range_scan_count_session">
<code class="literal">
Ndb_api_range_scan_count_session
</code>
</a>
</p>
<a class="indexterm" name="idm46045110436112">
</a>
<a class="indexterm" name="idm46045110435072">
</a>
<p>
The number of range scans that have been started in this
client session.
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it relates to the current session only, and
is not affected by any other clients of this
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_range_scan_count_replica">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_range_scan_count_replica">
<code class="literal">
Ndb_api_range_scan_count_replica
</code>
</a>
</p>
<a class="indexterm" name="idm46045110425024">
</a>
<a class="indexterm" name="idm46045110423984">
</a>
<p>
The number of range scans that have been started by this
replica.
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it is effectively global in scope. If this
MySQL server does not act as a replica, or does not use NDB
tables, this value is always 0.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_range_scan_count_slave">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_range_scan_count_slave">
<code class="literal">
Ndb_api_range_scan_count_slave
</code>
</a>
</p>
<a class="indexterm" name="idm46045110415312">
</a>
<a class="indexterm" name="idm46045110414208">
</a>
<p>
Deprecated synonym for
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_range_scan_count_replica">
<code class="literal">
Ndb_api_range_scan_count_replica
</code>
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_range_scan_count">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_range_scan_count">
<code class="literal">
Ndb_api_range_scan_count
</code>
</a>
</p>
<a class="indexterm" name="idm46045110408528">
</a>
<a class="indexterm" name="idm46045110407424">
</a>
<p>
The number of range scans that have been started by this MySQL
Server (SQL node).
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it is effectively global in scope.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_read_row_count_session">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_read_row_count_session">
<code class="literal">
Ndb_api_read_row_count_session
</code>
</a>
</p>
<a class="indexterm" name="idm46045110398848">
</a>
<a class="indexterm" name="idm46045110397744">
</a>
<p>
The total number of rows that have been read in this client
session. This includes all rows read by any primary key,
unique key, or scan operation made in this client session.
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it relates to the current session only, and
is not affected by any other clients of this
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_read_row_count_replica">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_read_row_count_replica">
<code class="literal">
Ndb_api_read_row_count_replica
</code>
</a>
</p>
<a class="indexterm" name="idm46045110387776">
</a>
<a class="indexterm" name="idm46045110386672">
</a>
<p>
The total number of rows that have been read by this replica.
This includes all rows read by any primary key, unique key, or
scan operation made by this replica.
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it is effectively global in scope. If this
MySQL server does not act as a replica, or does not use NDB
tables, this value is always 0.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_read_row_count_slave">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_read_row_count_slave">
<code class="literal">
Ndb_api_read_row_count_slave
</code>
</a>
</p>
<a class="indexterm" name="idm46045110377824">
</a>
<a class="indexterm" name="idm46045110376720">
</a>
<p>
Deprecated synonym for
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_read_row_count_replica">
<code class="literal">
Ndb_api_read_row_count_replica
</code>
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_read_row_count">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_read_row_count">
<code class="literal">
Ndb_api_read_row_count
</code>
</a>
</p>
<a class="indexterm" name="idm46045110370976">
</a>
<a class="indexterm" name="idm46045110369936">
</a>
<p>
The total number of rows that have been read by this MySQL
Server (SQL node). This includes all rows read by any primary
key, unique key, or scan operation made by this MySQL Server
(SQL node).
</p>
<p>
You should be aware that this value may not be completely
accurate with regard to rows read by
<a class="link" href="select.html" title="15.2.13 SELECT Statement">
<code class="literal">
SELECT
</code>
</a>
<a class="link" href="aggregate-functions.html#function_count">
<code class="literal">
COUNT(*)
</code>
</a>
queries, due to the
fact that, in this case, the MySQL server actually reads
pseudo-rows in the form
<code class="literal">
[
<em class="replaceable">
<code>
table fragment
ID
</code>
</em>
]:[
<em class="replaceable">
<code>
number of rows in
fragment
</code>
</em>
]
</code>
and sums the rows per
fragment for all fragments in the table to derive an estimated
count for all rows.
<code class="literal">
Ndb_api_read_row_count
</code>
uses this estimate and not the actual number of rows in the
table.
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it is effectively global in scope.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_scan_batch_count_session">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_scan_batch_count_session">
<code class="literal">
Ndb_api_scan_batch_count_session
</code>
</a>
</p>
<a class="indexterm" name="idm46045110355472">
</a>
<a class="indexterm" name="idm46045110354432">
</a>
<p>
The number of batches of rows received in this client session.
1 batch is defined as 1 set of scan results from a single
fragment.
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it relates to the current session only, and
is not affected by any other clients of this
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_scan_batch_count_replica">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_scan_batch_count_replica">
<code class="literal">
Ndb_api_scan_batch_count_replica
</code>
</a>
</p>
<a class="indexterm" name="idm46045110344368">
</a>
<a class="indexterm" name="idm46045110343328">
</a>
<p>
The number of batches of rows received by this replica. 1
batch is defined as 1 set of scan results from a single
fragment.
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it is effectively global in scope. If this
MySQL server does not act as a replica, or does not use NDB
tables, this value is always 0.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_scan_batch_count_slave">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_scan_batch_count_slave">
<code class="literal">
Ndb_api_scan_batch_count_slave
</code>
</a>
</p>
<a class="indexterm" name="idm46045110334528">
</a>
<a class="indexterm" name="idm46045110333424">
</a>
<p>
Deprecated synonym for
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_scan_batch_count_replica">
<code class="literal">
Ndb_api_scan_batch_count_replica
</code>
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_scan_batch_count">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_scan_batch_count">
<code class="literal">
Ndb_api_scan_batch_count
</code>
</a>
</p>
<a class="indexterm" name="idm46045110327744">
</a>
<a class="indexterm" name="idm46045110326640">
</a>
<p>
The number of batches of rows received by this MySQL Server
(SQL node). 1 batch is defined as 1 set of scan results from a
single fragment.
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it is effectively global in scope.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_table_scan_count_session">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_table_scan_count_session">
<code class="literal">
Ndb_api_table_scan_count_session
</code>
</a>
</p>
<a class="indexterm" name="idm46045110317872">
</a>
<a class="indexterm" name="idm46045110316832">
</a>
<p>
The number of table scans that have been started in this
client session, including scans of internal tables,.
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it relates to the current session only, and
is not affected by any other clients of this
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_table_scan_count_replica">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_table_scan_count_replica">
<code class="literal">
Ndb_api_table_scan_count_replica
</code>
</a>
</p>
<a class="indexterm" name="idm46045110306736">
</a>
<a class="indexterm" name="idm46045110305696">
</a>
<p>
The number of table scans that have been started by this
replica, including scans of internal tables.
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it is effectively global in scope. If this
MySQL server does not act as a replica, or does not use NDB
tables, this value is always 0.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_table_scan_count_slave">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_table_scan_count_slave">
<code class="literal">
Ndb_api_table_scan_count_slave
</code>
</a>
</p>
<a class="indexterm" name="idm46045110296928">
</a>
<a class="indexterm" name="idm46045110295824">
</a>
<p>
Deprecated synonym for
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_table_scan_count_replica">
<code class="literal">
Ndb_api_table_scan_count_replica
</code>
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_table_scan_count">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_table_scan_count">
<code class="literal">
Ndb_api_table_scan_count
</code>
</a>
</p>
<a class="indexterm" name="idm46045110290144">
</a>
<a class="indexterm" name="idm46045110289040">
</a>
<p>
The number of table scans that have been started by this MySQL
Server (SQL node), including scans of internal tables,.
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it is effectively global in scope.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_trans_abort_count_session">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_trans_abort_count_session">
<code class="literal">
Ndb_api_trans_abort_count_session
</code>
</a>
</p>
<a class="indexterm" name="idm46045110280240">
</a>
<a class="indexterm" name="idm46045110279200">
</a>
<p>
The number of transactions aborted in this client session.
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it relates to the current session only, and
is not affected by any other clients of this
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_trans_abort_count_replica">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_trans_abort_count_replica">
<code class="literal">
Ndb_api_trans_abort_count_replica
</code>
</a>
</p>
<a class="indexterm" name="idm46045110269232">
</a>
<a class="indexterm" name="idm46045110268192">
</a>
<p>
The number of transactions aborted by this replica.
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it is effectively global in scope. If this
MySQL server does not act as a replica, or does not use NDB
tables, this value is always 0.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_trans_abort_count_slave">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_trans_abort_count_slave">
<code class="literal">
Ndb_api_trans_abort_count_slave
</code>
</a>
</p>
<a class="indexterm" name="idm46045110259488">
</a>
<a class="indexterm" name="idm46045110258384">
</a>
<p>
Deprecated synonym for
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_trans_abort_count_replica">
<code class="literal">
Ndb_api_trans_abort_count_replica
</code>
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_trans_abort_count">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_trans_abort_count">
<code class="literal">
Ndb_api_trans_abort_count
</code>
</a>
</p>
<a class="indexterm" name="idm46045110252704">
</a>
<a class="indexterm" name="idm46045110251600">
</a>
<p>
The number of transactions aborted by this MySQL Server (SQL
node).
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it is effectively global in scope.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_trans_close_count_session">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_trans_close_count_session">
<code class="literal">
Ndb_api_trans_close_count_session
</code>
</a>
</p>
<a class="indexterm" name="idm46045110242912">
</a>
<a class="indexterm" name="idm46045110241872">
</a>
<p>
The number of transactions closed in this client session. This
value may be greater than the sum of
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_trans_commit_count_session">
<code class="literal">
Ndb_api_trans_commit_count_session
</code>
</a>
and
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_trans_abort_count_session">
<code class="literal">
Ndb_api_trans_abort_count_session
</code>
</a>
,
since some transactions may have been rolled back.
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it relates to the current session only, and
is not affected by any other clients of this
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_trans_close_count_replica">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_trans_close_count_replica">
<code class="literal">
Ndb_api_trans_close_count_replica
</code>
</a>
</p>
<a class="indexterm" name="idm46045110229104">
</a>
<a class="indexterm" name="idm46045110228064">
</a>
<p>
The number of transactions closed by this replica. This value
may be greater than the sum of
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_trans_commit_count_replica">
<code class="literal">
Ndb_api_trans_commit_count_replica
</code>
</a>
and
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_trans_abort_count_replica">
<code class="literal">
Ndb_api_trans_abort_count_replica
</code>
</a>
,
since some transactions may have been rolled back.
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it is effectively global in scope. If this
MySQL server does not act as a replica, or does not use NDB
tables, this value is always 0.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_trans_close_count_slave">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_trans_close_count_slave">
<code class="literal">
Ndb_api_trans_close_count_slave
</code>
</a>
</p>
<a class="indexterm" name="idm46045110216608">
</a>
<a class="indexterm" name="idm46045110215504">
</a>
<p>
Deprecated synonym for
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_trans_close_count_replica">
<code class="literal">
Ndb_api_trans_close_count_replica
</code>
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_trans_close_count">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_trans_close_count">
<code class="literal">
Ndb_api_trans_close_count
</code>
</a>
</p>
<a class="indexterm" name="idm46045110209760">
</a>
<a class="indexterm" name="idm46045110208656">
</a>
<p>
The number of transactions closed by this MySQL Server (SQL
node). This value may be greater than the sum of
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_trans_commit_count">
<code class="literal">
Ndb_api_trans_commit_count
</code>
</a>
and
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_trans_abort_count">
<code class="literal">
Ndb_api_trans_abort_count
</code>
</a>
,
since some transactions may have been rolled back.
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it is effectively global in scope.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_trans_commit_count_session">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_trans_commit_count_session">
<code class="literal">
Ndb_api_trans_commit_count_session
</code>
</a>
</p>
<a class="indexterm" name="idm46045110197296">
</a>
<a class="indexterm" name="idm46045110196256">
</a>
<p>
The number of transactions committed in this client session.
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it relates to the current session only, and
is not affected by any other clients of this
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_trans_commit_count_replica">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_trans_commit_count_replica">
<code class="literal">
Ndb_api_trans_commit_count_replica
</code>
</a>
</p>
<a class="indexterm" name="idm46045110186288">
</a>
<a class="indexterm" name="idm46045110185248">
</a>
<p>
The number of transactions committed by this replica.
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it is effectively global in scope. If this
MySQL server does not act as a replica, or does not use NDB
tables, this value is always 0.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_trans_commit_count_slave">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_trans_commit_count_slave">
<code class="literal">
Ndb_api_trans_commit_count_slave
</code>
</a>
</p>
<a class="indexterm" name="idm46045110176400">
</a>
<a class="indexterm" name="idm46045110175360">
</a>
<p>
Deprecated synonym for
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_trans_commit_count_replica">
<code class="literal">
Ndb_api_trans_commit_count_replica
</code>
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_trans_commit_count">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_trans_commit_count">
<code class="literal">
Ndb_api_trans_commit_count
</code>
</a>
</p>
<a class="indexterm" name="idm46045110169680">
</a>
<a class="indexterm" name="idm46045110168576">
</a>
<p>
The number of transactions committed by this MySQL Server (SQL
node).
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it is effectively global in scope.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_trans_local_read_row_count_session">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_trans_local_read_row_count_session">
<code class="literal">
Ndb_api_trans_local_read_row_count_session
</code>
</a>
</p>
<a class="indexterm" name="idm46045110159936">
</a>
<a class="indexterm" name="idm46045110158816">
</a>
<p>
The total number of rows that have been read in this client
session. This includes all rows read by any primary key,
unique key, or scan operation made in this client session.
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it relates to the current session only, and
is not affected by any other clients of this
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_trans_local_read_row_count_replica">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_trans_local_read_row_count_replica">
<code class="literal">
Ndb_api_trans_local_read_row_count_replica
</code>
</a>
</p>
<a class="indexterm" name="idm46045110148752">
</a>
<a class="indexterm" name="idm46045110147632">
</a>
<p>
The total number of rows that have been read by this replica.
This includes all rows read by any primary key, unique key, or
scan operation made by this replica.
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it is effectively global in scope. If this
MySQL server does not act as a replica, or does not use NDB
tables, this value is always 0.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_trans_local_read_row_count_slave">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_trans_local_read_row_count_slave">
<code class="literal">
Ndb_api_trans_local_read_row_count_slave
</code>
</a>
</p>
<a class="indexterm" name="idm46045110138752">
</a>
<a class="indexterm" name="idm46045110137632">
</a>
<p>
Deprecated synonym for
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_trans_local_read_row_count_replica">
<code class="literal">
Ndb_api_trans_local_read_row_count_replica
</code>
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_trans_local_read_row_count">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_trans_local_read_row_count">
<code class="literal">
Ndb_api_trans_local_read_row_count
</code>
</a>
</p>
<a class="indexterm" name="idm46045110131728">
</a>
<a class="indexterm" name="idm46045110130688">
</a>
<p>
The total number of rows that have been read by this MySQL
Server (SQL node). This includes all rows read by any primary
key, unique key, or scan operation made by this MySQL Server
(SQL node).
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it is effectively global in scope.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_trans_start_count_session">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_trans_start_count_session">
<code class="literal">
Ndb_api_trans_start_count_session
</code>
</a>
</p>
<a class="indexterm" name="idm46045110121856">
</a>
<a class="indexterm" name="idm46045110120816">
</a>
<p>
The number of transactions started in this client session.
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it relates to the current session only, and
is not affected by any other clients of this
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_trans_start_count_replica">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_trans_start_count_replica">
<code class="literal">
Ndb_api_trans_start_count_replica
</code>
</a>
</p>
<a class="indexterm" name="idm46045110110848">
</a>
<a class="indexterm" name="idm46045110109808">
</a>
<p>
The number of transactions started by this replica.
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it is effectively global in scope. If this
MySQL server does not act as a replica, or does not use NDB
tables, this value is always 0.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_trans_start_count_slave">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_trans_start_count_slave">
<code class="literal">
Ndb_api_trans_start_count_slave
</code>
</a>
</p>
<a class="indexterm" name="idm46045110101104">
</a>
<a class="indexterm" name="idm46045110100000">
</a>
<p>
Deprecated synonym for
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_trans_start_count_replica">
<code class="literal">
Ndb_api_trans_start_count_replica
</code>
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_trans_start_count">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_trans_start_count">
<code class="literal">
Ndb_api_trans_start_count
</code>
</a>
</p>
<a class="indexterm" name="idm46045110094320">
</a>
<a class="indexterm" name="idm46045110093216">
</a>
<p>
The number of transactions started by this MySQL Server (SQL
node).
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it is effectively global in scope.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_uk_op_count_session">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_uk_op_count_session">
<code class="literal">
Ndb_api_uk_op_count_session
</code>
</a>
</p>
<a class="indexterm" name="idm46045110084656">
</a>
<a class="indexterm" name="idm46045110083552">
</a>
<p>
The number of operations in this client session based on or
using unique keys.
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it relates to the current session only, and
is not affected by any other clients of this
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_uk_op_count_replica">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_uk_op_count_replica">
<code class="literal">
Ndb_api_uk_op_count_replica
</code>
</a>
</p>
<a class="indexterm" name="idm46045110073680">
</a>
<a class="indexterm" name="idm46045110072576">
</a>
<p>
The number of operations by this replica based on or using
unique keys.
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it is effectively global in scope. If this
MySQL server does not act as a replica, or does not use NDB
tables, this value is always 0.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_uk_op_count_slave">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_uk_op_count_slave">
<code class="literal">
Ndb_api_uk_op_count_slave
</code>
</a>
</p>
<a class="indexterm" name="idm46045110063840">
</a>
<a class="indexterm" name="idm46045110062736">
</a>
<p>
Deprecated synonym for
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_uk_op_count_replica">
<code class="literal">
Ndb_api_uk_op_count_replica
</code>
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_uk_op_count">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_uk_op_count">
<code class="literal">
Ndb_api_uk_op_count
</code>
</a>
</p>
<a class="indexterm" name="idm46045110057056">
</a>
<a class="indexterm" name="idm46045110056016">
</a>
<p>
The number of operations by this MySQL Server (SQL node) based
on or using unique keys.
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it is effectively global in scope.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_wait_exec_complete_count_session">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_wait_exec_complete_count_session">
<code class="literal">
Ndb_api_wait_exec_complete_count_session
</code>
</a>
</p>
<a class="indexterm" name="idm46045110047312">
</a>
<a class="indexterm" name="idm46045110046192">
</a>
<p>
The number of times a thread has been blocked in this client
session while waiting for execution of an operation to
complete. This includes all
<a class="ulink" href="/doc/ndbapi/en/ndb-ndbtransaction.html#ndb-ndbtransaction-execute" target="_top">
<code class="literal">
execute()
</code>
</a>
calls as well as implicit executes for blob and auto-increment
operations not visible to clients.
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it relates to the current session only, and
is not affected by any other clients of this
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_wait_exec_complete_count_replica">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_wait_exec_complete_count_replica">
<code class="literal">
Ndb_api_wait_exec_complete_count_replica
</code>
</a>
</p>
<a class="indexterm" name="idm46045110034848">
</a>
<a class="indexterm" name="idm46045110033728">
</a>
<p>
The number of times a thread has been blocked by this replica
while waiting for execution of an operation to complete. This
includes all
<a class="ulink" href="/doc/ndbapi/en/ndb-ndbtransaction.html#ndb-ndbtransaction-execute" target="_top">
<code class="literal">
execute()
</code>
</a>
calls as well as implicit executes for blob and auto-increment
operations not visible to clients.
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it is effectively global in scope. If this
MySQL server does not act as a replica, or does not use NDB
tables, this value is always 0.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_wait_exec_complete_count_slave">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_wait_exec_complete_count_slave">
<code class="literal">
Ndb_api_wait_exec_complete_count_slave
</code>
</a>
</p>
<a class="indexterm" name="idm46045110023536">
</a>
<a class="indexterm" name="idm46045110022496">
</a>
<p>
Deprecated synonym for
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_wait_exec_complete_count_replica">
<code class="literal">
Ndb_api_wait_exec_complete_count_replica
</code>
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_wait_exec_complete_count">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_wait_exec_complete_count">
<code class="literal">
Ndb_api_wait_exec_complete_count
</code>
</a>
</p>
<a class="indexterm" name="idm46045110016672">
</a>
<a class="indexterm" name="idm46045110015632">
</a>
<p>
The number of times a thread has been blocked by this MySQL
Server (SQL node) while waiting for execution of an operation
to complete. This includes all
<a class="ulink" href="/doc/ndbapi/en/ndb-ndbtransaction.html#ndb-ndbtransaction-execute" target="_top">
<code class="literal">
execute()
</code>
</a>
calls as well as implicit executes for blob and auto-increment
operations not visible to clients.
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it is effectively global in scope.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_wait_meta_request_count_session">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_wait_meta_request_count_session">
<code class="literal">
Ndb_api_wait_meta_request_count_session
</code>
</a>
</p>
<a class="indexterm" name="idm46045110005488">
</a>
<a class="indexterm" name="idm46045110004448">
</a>
<p>
The number of times a thread has been blocked in this client
session waiting for a metadata-based signal, such as is
expected for DDL requests, new epochs, and seizure of
transaction records.
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it relates to the current session only, and
is not affected by any other clients of this
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_wait_meta_request_count_replica">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_wait_meta_request_count_replica">
<code class="literal">
Ndb_api_wait_meta_request_count_replica
</code>
</a>
</p>
<a class="indexterm" name="idm46045109994320">
</a>
<a class="indexterm" name="idm46045109993280">
</a>
<p>
The number of times a thread has been blocked by this replica
waiting for a metadata-based signal, such as is expected for
DDL requests, new epochs, and seizure of transaction records.
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it is effectively global in scope. If this
MySQL server does not act as a replica, or does not use NDB
tables, this value is always 0.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_wait_meta_request_count_slave">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_wait_meta_request_count_slave">
<code class="literal">
Ndb_api_wait_meta_request_count_slave
</code>
</a>
</p>
<a class="indexterm" name="idm46045109984288">
</a>
<a class="indexterm" name="idm46045109983248">
</a>
<p>
Deprecated synonym for
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_wait_meta_request_count_replica">
<code class="literal">
Ndb_api_wait_meta_request_count_replica
</code>
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_wait_meta_request_count">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_wait_meta_request_count">
<code class="literal">
Ndb_api_wait_meta_request_count
</code>
</a>
</p>
<a class="indexterm" name="idm46045109977504">
</a>
<a class="indexterm" name="idm46045109976400">
</a>
<p>
The number of times a thread has been blocked by this MySQL
Server (SQL node) waiting for a metadata-based signal, such as
is expected for DDL requests, new epochs, and seizure of
transaction records.
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it is effectively global in scope.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_wait_nanos_count_session">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_wait_nanos_count_session">
<code class="literal">
Ndb_api_wait_nanos_count_session
</code>
</a>
</p>
<a class="indexterm" name="idm46045109967488">
</a>
<a class="indexterm" name="idm46045109966448">
</a>
<p>
Total time (in nanoseconds) spent in this client session
waiting for any type of signal from the data nodes.
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it relates to the current session only, and
is not affected by any other clients of this
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_wait_nanos_count_replica">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_wait_nanos_count_replica">
<code class="literal">
Ndb_api_wait_nanos_count_replica
</code>
</a>
</p>
<a class="indexterm" name="idm46045109956352">
</a>
<a class="indexterm" name="idm46045109955312">
</a>
<p>
Total time (in nanoseconds) spent by this replica waiting for
any type of signal from the data nodes.
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it is effectively global in scope. If this
MySQL server does not act as a replica, or does not use NDB
tables, this value is always 0.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_wait_nanos_count_slave">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_wait_nanos_count_slave">
<code class="literal">
Ndb_api_wait_nanos_count_slave
</code>
</a>
</p>
<a class="indexterm" name="idm46045109946544">
</a>
<a class="indexterm" name="idm46045109945440">
</a>
<p>
Deprecated synonym for
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_wait_nanos_count_replica">
<code class="literal">
Ndb_api_wait_nanos_count_replica
</code>
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_wait_nanos_count">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_wait_nanos_count">
<code class="literal">
Ndb_api_wait_nanos_count
</code>
</a>
</p>
<a class="indexterm" name="idm46045109939760">
</a>
<a class="indexterm" name="idm46045109938656">
</a>
<p>
Total time (in nanoseconds) spent by this MySQL Server (SQL
node) waiting for any type of signal from the data nodes.
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it is effectively global in scope.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_wait_scan_result_count_session">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_wait_scan_result_count_session">
<code class="literal">
Ndb_api_wait_scan_result_count_session
</code>
</a>
</p>
<a class="indexterm" name="idm46045109929920">
</a>
<a class="indexterm" name="idm46045109928880">
</a>
<p>
The number of times a thread has been blocked in this client
session while waiting for a scan-based signal, such as when
waiting for more results from a scan, or when waiting for a
scan to close.
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it relates to the current session only, and
is not affected by any other clients of this
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_wait_scan_result_count_replica">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_wait_scan_result_count_replica">
<code class="literal">
Ndb_api_wait_scan_result_count_replica
</code>
</a>
</p>
<a class="indexterm" name="idm46045109918688">
</a>
<a class="indexterm" name="idm46045109917648">
</a>
<p>
The number of times a thread has been blocked by this replica
while waiting for a scan-based signal, such as when waiting
for more results from a scan, or when waiting for a scan to
close.
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it is effectively global in scope. If this
MySQL server does not act as a replica, or does not use NDB
tables, this value is always 0.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_wait_scan_result_count_slave">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_wait_scan_result_count_slave">
<code class="literal">
Ndb_api_wait_scan_result_count_slave
</code>
</a>
</p>
<a class="indexterm" name="idm46045109908704">
</a>
<a class="indexterm" name="idm46045109907664">
</a>
<p>
Deprecated synonym for
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_wait_scan_result_count_replica">
<code class="literal">
Ndb_api_wait_scan_result_count_replica
</code>
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_api_wait_scan_result_count">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_wait_scan_result_count">
<code class="literal">
Ndb_api_wait_scan_result_count
</code>
</a>
</p>
<a class="indexterm" name="idm46045109901920">
</a>
<a class="indexterm" name="idm46045109900816">
</a>
<p>
The number of times a thread has been blocked by this MySQL
Server (SQL node) while waiting for a scan-based signal, such
as when waiting for more results from a scan, or when waiting
for a scan to close.
</p>
<p>
Although this variable can be read using either
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW GLOBAL
STATUS
</code>
</a>
or
<a class="link" href="show-status.html" title="15.7.7.37 SHOW STATUS Statement">
<code class="literal">
SHOW SESSION
STATUS
</code>
</a>
, it is effectively global in scope.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-ndb-api-statistics.html" title="25.6.16 NDB API Statistics Counters and Variables">
Section 25.6.16, “NDB API Statistics Counters and Variables”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_cluster_node_id">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_cluster_node_id">
<code class="literal">
Ndb_cluster_node_id
</code>
</a>
</p>
<a class="indexterm" name="idm46045109892064">
</a>
<a class="indexterm" name="idm46045109891024">
</a>
<p>
If the server is acting as an NDB Cluster node, then the value
of this variable its node ID in the cluster.
</p>
<p>
If the server is not part of an NDB Cluster, then the value of
this variable is 0.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_config_from_host">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_config_from_host">
<code class="literal">
Ndb_config_from_host
</code>
</a>
</p>
<a class="indexterm" name="idm46045109886032">
</a>
<a class="indexterm" name="idm46045109884992">
</a>
<p>
If the server is part of an NDB Cluster, the value of this
variable is the host name or IP address of the Cluster
management server from which it gets its configuration data.
</p>
<p>
If the server is not part of an NDB Cluster, then the value of
this variable is an empty string.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_config_from_port">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_config_from_port">
<code class="literal">
Ndb_config_from_port
</code>
</a>
</p>
<a class="indexterm" name="idm46045109879920">
</a>
<a class="indexterm" name="idm46045109878880">
</a>
<p>
If the server is part of an NDB Cluster, the value of this
variable is the number of the port through which it is
connected to the Cluster management server from which it gets
its configuration data.
</p>
<p>
If the server is not part of an NDB Cluster, then the value of
this variable is 0.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_config_generation">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_config_generation">
<code class="literal">
Ndb_config_generation
</code>
</a>
</p>
<a class="indexterm" name="idm46045109873776">
</a>
<a class="indexterm" name="idm46045109872736">
</a>
<p>
Shows the generation number of the cluster's current
configuration. This can be used as an indicator to determine
whether the configuration of the cluster has changed since
this SQL node last connected to the cluster.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_conflict_fn_epoch">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_conflict_fn_epoch">
<code class="literal">
Ndb_conflict_fn_epoch
</code>
</a>
</p>
<a class="indexterm" name="idm46045109868064">
</a>
<a class="indexterm" name="idm46045109867024">
</a>
<p>
Used in NDB Cluster Replication conflict resolution, this
variable shows the number of rows found to be in conflict
using
<code class="literal">
NDB$EPOCH()
</code>
conflict resolution on a
given
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
since the last time it was
restarted.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-replication-conflict-resolution.html" title="25.7.12 NDB Cluster Replication Conflict Resolution">
Section 25.7.12, “NDB Cluster Replication Conflict Resolution”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_conflict_fn_epoch_trans">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_conflict_fn_epoch_trans">
<code class="literal">
Ndb_conflict_fn_epoch_trans
</code>
</a>
</p>
<a class="indexterm" name="idm46045109859344">
</a>
<a class="indexterm" name="idm46045109858240">
</a>
<p>
Used in NDB Cluster Replication conflict resolution, this
variable shows the number of rows found to be in conflict
using
<code class="literal">
NDB$EPOCH_TRANS()
</code>
conflict resolution
on a given
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
since the last time it
was restarted.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-replication-conflict-resolution.html" title="25.7.12 NDB Cluster Replication Conflict Resolution">
Section 25.7.12, “NDB Cluster Replication Conflict Resolution”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_conflict_fn_epoch2">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_conflict_fn_epoch2">
<code class="literal">
Ndb_conflict_fn_epoch2
</code>
</a>
</p>
<a class="indexterm" name="idm46045109850448">
</a>
<a class="indexterm" name="idm46045109849408">
</a>
<p>
Shows the number of rows found to be in conflict in NDB
Cluster Replication conflict resolution, when using
<code class="literal">
NDB$EPOCH2()
</code>
, on the source designated as
the primary since the last time it was restarted.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-replication-conflict-resolution.html#mysql-cluster-replication-ndb-epoch2" title="NDB$EPOCH2()">
NDB$EPOCH2()
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_conflict_fn_epoch2_trans">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_conflict_fn_epoch2_trans">
<code class="literal">
Ndb_conflict_fn_epoch2_trans
</code>
</a>
</p>
<a class="indexterm" name="idm46045109842768">
</a>
<a class="indexterm" name="idm46045109841664">
</a>
<p>
Used in NDB Cluster Replication conflict resolution, this
variable shows the number of rows found to be in conflict
using
<code class="literal">
NDB$EPOCH_TRANS2()
</code>
conflict
resolution on a given
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
since the last
time it was restarted.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-replication-conflict-resolution.html#mysql-cluster-replication-ndb-epoch2-trans" title="NDB$EPOCH2_TRANS()">
NDB$EPOCH2_TRANS()
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_conflict_fn_max">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_conflict_fn_max">
<code class="literal">
Ndb_conflict_fn_max
</code>
</a>
</p>
<a class="indexterm" name="idm46045109833824">
</a>
<a class="indexterm" name="idm46045109832784">
</a>
<p>
Used in NDB Cluster Replication conflict resolution, this
variable shows the number of times that a row was not applied
on the current SQL node due to
<span class="quote">
“
<span class="quote">
greatest timestamp
wins
</span>
”
</span>
conflict resolution since the last time that this
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
was started.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-replication-conflict-resolution.html" title="25.7.12 NDB Cluster Replication Conflict Resolution">
Section 25.7.12, “NDB Cluster Replication Conflict Resolution”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_conflict_fn_max_del_win">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_conflict_fn_max_del_win">
<code class="literal">
Ndb_conflict_fn_max_del_win
</code>
</a>
</p>
<a class="indexterm" name="idm46045109825376">
</a>
<a class="indexterm" name="idm46045109824272">
</a>
<p>
Shows the number of times that a row was rejected on the
current SQL node due to NDB Cluster Replication conflict
resolution using
<code class="literal">
NDB$MAX_DELETE_WIN()
</code>
,
since the last time that this
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
was
started.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-replication-conflict-resolution.html" title="25.7.12 NDB Cluster Replication Conflict Resolution">
Section 25.7.12, “NDB Cluster Replication Conflict Resolution”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_conflict_fn_max_del_win_ins">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_conflict_fn_max_del_win_ins">
<code class="literal">
Ndb_conflict_fn_max_del_win_ins
</code>
</a>
</p>
<a class="indexterm" name="idm46045109816544">
</a>
<a class="indexterm" name="idm46045109815440">
</a>
<p>
Shows the number of times that insertion of a row was rejected
on the current SQL node due to NDB Cluster Replication
conflict resolution using
<code class="literal">
NDB$MAX_DEL_WIN_INS()
</code>
, since the last time
that this
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
was started.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-replication-conflict-resolution.html" title="25.7.12 NDB Cluster Replication Conflict Resolution">
Section 25.7.12, “NDB Cluster Replication Conflict Resolution”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_conflict_fn_max_ins">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_conflict_fn_max_ins">
<code class="literal">
Ndb_conflict_fn_max_ins
</code>
</a>
</p>
<a class="indexterm" name="idm46045109807728">
</a>
<a class="indexterm" name="idm46045109806688">
</a>
<p>
Used in NDB Cluster Replication conflict resolution, this
variable shows the number of times that a row was not inserted
on the current SQL node due to
<span class="quote">
“
<span class="quote">
greatest timestamp
wins
</span>
”
</span>
conflict resolution since the last time that this
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
was started.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-replication-conflict-resolution.html" title="25.7.12 NDB Cluster Replication Conflict Resolution">
Section 25.7.12, “NDB Cluster Replication Conflict Resolution”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_conflict_fn_old">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_conflict_fn_old">
<code class="literal">
Ndb_conflict_fn_old
</code>
</a>
</p>
<a class="indexterm" name="idm46045109799248">
</a>
<a class="indexterm" name="idm46045109798208">
</a>
<p>
Used in NDB Cluster Replication conflict resolution, this
variable shows the number of times that a row was not applied
as the result of
<span class="quote">
“
<span class="quote">
same timestamp wins
</span>
”
</span>
conflict
resolution on a given
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
since the last
time it was restarted.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-replication-conflict-resolution.html" title="25.7.12 NDB Cluster Replication Conflict Resolution">
Section 25.7.12, “NDB Cluster Replication Conflict Resolution”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_conflict_last_conflict_epoch">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_conflict_last_conflict_epoch">
<code class="literal">
Ndb_conflict_last_conflict_epoch
</code>
</a>
</p>
<a class="indexterm" name="idm46045109790656">
</a>
<a class="indexterm" name="idm46045109789616">
</a>
<p>
The most recent epoch in which a conflict was detected on this
replica. You can compare this value with
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_replica_max_replicated_epoch">
<code class="literal">
Ndb_replica_max_replicated_epoch
</code>
</a>
;
if
<code class="literal">
Ndb_replica_max_replicated_epoch
</code>
is
greater than
<code class="literal">
Ndb_conflict_last_conflict_epoch
</code>
, no
conflicts have yet been detected.
</p>
<p>
See
<a class="xref" href="mysql-cluster-replication-conflict-resolution.html" title="25.7.12 NDB Cluster Replication Conflict Resolution">
Section 25.7.12, “NDB Cluster Replication Conflict Resolution”
</a>
,
for more information.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_conflict_reflected_op_discard_count">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_conflict_reflected_op_discard_count">
<code class="literal">
Ndb_conflict_reflected_op_discard_count
</code>
</a>
</p>
<a class="indexterm" name="idm46045109780992">
</a>
<a class="indexterm" name="idm46045109779952">
</a>
<p>
When using NDB Cluster Replication conflict resolution, this
is the number of reflected operations that were not applied on
the secondary, due to encountering an error during execution.
</p>
<p>
See
<a class="xref" href="mysql-cluster-replication-conflict-resolution.html" title="25.7.12 NDB Cluster Replication Conflict Resolution">
Section 25.7.12, “NDB Cluster Replication Conflict Resolution”
</a>
,
for more information.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_conflict_reflected_op_prepare_count">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_conflict_reflected_op_prepare_count">
<code class="literal">
Ndb_conflict_reflected_op_prepare_count
</code>
</a>
</p>
<a class="indexterm" name="idm46045109774080">
</a>
<a class="indexterm" name="idm46045109773040">
</a>
<p>
When using conflict resolution with NDB Cluster Replication,
this status variable contains the number of reflected
operations that have been defined (that is, prepared for
execution on the secondary).
</p>
<p>
See
<a class="xref" href="mysql-cluster-replication-conflict-resolution.html" title="25.7.12 NDB Cluster Replication Conflict Resolution">
Section 25.7.12, “NDB Cluster Replication Conflict Resolution”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_conflict_refresh_op_count">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_conflict_refresh_op_count">
<code class="literal">
Ndb_conflict_refresh_op_count
</code>
</a>
</p>
<a class="indexterm" name="idm46045109767232">
</a>
<a class="indexterm" name="idm46045109766128">
</a>
<p>
When using conflict resolution with NDB Cluster Replication,
this gives the number of refresh operations that have been
prepared for execution on the secondary.
</p>
<p>
See
<a class="xref" href="mysql-cluster-replication-conflict-resolution.html" title="25.7.12 NDB Cluster Replication Conflict Resolution">
Section 25.7.12, “NDB Cluster Replication Conflict Resolution”
</a>
,
for more information.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_conflict_last_stable_epoch">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_conflict_last_stable_epoch">
<code class="literal">
Ndb_conflict_last_stable_epoch
</code>
</a>
</p>
<a class="indexterm" name="idm46045109760400">
</a>
<a class="indexterm" name="idm46045109759296">
</a>
<p>
Number of rows found to be in conflict by a transactional
conflict function
</p>
<p>
See
<a class="xref" href="mysql-cluster-replication-conflict-resolution.html" title="25.7.12 NDB Cluster Replication Conflict Resolution">
Section 25.7.12, “NDB Cluster Replication Conflict Resolution”
</a>
,
for more information.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_conflict_trans_row_conflict_count">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_conflict_trans_row_conflict_count">
<code class="literal">
Ndb_conflict_trans_row_conflict_count
</code>
</a>
</p>
<a class="indexterm" name="idm46045109753536">
</a>
<a class="indexterm" name="idm46045109752496">
</a>
<p>
Used in NDB Cluster Replication conflict resolution, this
status variable shows the number of rows found to be directly
in-conflict by a transactional conflict function on a given
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
since the last time it was
restarted.
</p>
<p>
Currently, the only transactional conflict detection function
supported by NDB Cluster is NDB$EPOCH_TRANS(), so this status
variable is effectively the same as
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_conflict_fn_epoch_trans">
<code class="literal">
Ndb_conflict_fn_epoch_trans
</code>
</a>
.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-replication-conflict-resolution.html" title="25.7.12 NDB Cluster Replication Conflict Resolution">
Section 25.7.12, “NDB Cluster Replication Conflict Resolution”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_conflict_trans_row_reject_count">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_conflict_trans_row_reject_count">
<code class="literal">
Ndb_conflict_trans_row_reject_count
</code>
</a>
</p>
<a class="indexterm" name="idm46045109743472">
</a>
<a class="indexterm" name="idm46045109742432">
</a>
<p>
Used in NDB Cluster Replication conflict resolution, this
status variable shows the total number of rows realigned due
to being determined as conflicting by a transactional conflict
detection function. This includes not only
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_conflict_trans_row_conflict_count">
<code class="literal">
Ndb_conflict_trans_row_conflict_count
</code>
</a>
,
but any rows in or dependent on conflicting transactions.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-replication-conflict-resolution.html" title="25.7.12 NDB Cluster Replication Conflict Resolution">
Section 25.7.12, “NDB Cluster Replication Conflict Resolution”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_conflict_trans_reject_count">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_conflict_trans_reject_count">
<code class="literal">
Ndb_conflict_trans_reject_count
</code>
</a>
</p>
<a class="indexterm" name="idm46045109735280">
</a>
<a class="indexterm" name="idm46045109734176">
</a>
<p>
Used in NDB Cluster Replication conflict resolution, this
status variable shows the number of transactions found to be
in conflict by a transactional conflict detection function.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-replication-conflict-resolution.html" title="25.7.12 NDB Cluster Replication Conflict Resolution">
Section 25.7.12, “NDB Cluster Replication Conflict Resolution”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_conflict_trans_detect_iter_count">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_conflict_trans_detect_iter_count">
<code class="literal">
Ndb_conflict_trans_detect_iter_count
</code>
</a>
</p>
<a class="indexterm" name="idm46045109728320">
</a>
<a class="indexterm" name="idm46045109727280">
</a>
<p>
Used in NDB Cluster Replication conflict resolution, this
shows the number of internal iterations required to commit an
epoch transaction. Should be (slightly) greater than or equal
to
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_conflict_trans_conflict_commit_count">
<code class="literal">
Ndb_conflict_trans_conflict_commit_count
</code>
</a>
.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-replication-conflict-resolution.html" title="25.7.12 NDB Cluster Replication Conflict Resolution">
Section 25.7.12, “NDB Cluster Replication Conflict Resolution”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_conflict_trans_conflict_commit_count">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_conflict_trans_conflict_commit_count">
<code class="literal">
Ndb_conflict_trans_conflict_commit_count
</code>
</a>
</p>
<a class="indexterm" name="idm46045109720128">
</a>
<a class="indexterm" name="idm46045109719008">
</a>
<p>
Used in NDB Cluster Replication conflict resolution, this
shows the number of epoch transactions committed after they
required transactional conflict handling.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-replication-conflict-resolution.html" title="25.7.12 NDB Cluster Replication Conflict Resolution">
Section 25.7.12, “NDB Cluster Replication Conflict Resolution”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_epoch_delete_delete_count">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_epoch_delete_delete_count">
<code class="literal">
Ndb_epoch_delete_delete_count
</code>
</a>
</p>
<a class="indexterm" name="idm46045109713232">
</a>
<a class="indexterm" name="idm46045109712128">
</a>
<p>
When using delete-delete conflict detection, this is the
number of delete-delete conflicts detected, where a delete
operation is applied, but the indicated row does not exist.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_execute_count">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_execute_count">
<code class="literal">
Ndb_execute_count
</code>
</a>
</p>
<a class="indexterm" name="idm46045109707504">
</a>
<a class="indexterm" name="idm46045109706464">
</a>
<p>
Provides the number of round trips to the
<a class="link" href="mysql-cluster.html" title="Chapter 25 MySQL NDB Cluster 8.4">
<code class="literal">
NDB
</code>
</a>
kernel made by operations.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_last_commit_epoch_server">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_last_commit_epoch_server">
<code class="literal">
Ndb_last_commit_epoch_server
</code>
</a>
</p>
<a class="indexterm" name="idm46045109700880">
</a>
<a class="indexterm" name="idm46045109699776">
</a>
<p>
The epoch most recently committed by
<code class="literal">
NDB
</code>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_last_commit_epoch_session">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_last_commit_epoch_session">
<code class="literal">
Ndb_last_commit_epoch_session
</code>
</a>
</p>
<a class="indexterm" name="idm46045109694656">
</a>
<a class="indexterm" name="idm46045109693552">
</a>
<p>
The epoch most recently committed by this
<code class="literal">
NDB
</code>
client.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_metadata_detected_count">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_metadata_detected_count">
<code class="literal">
Ndb_metadata_detected_count
</code>
</a>
</p>
<a class="indexterm" name="idm46045109688416">
</a>
<a class="indexterm" name="idm46045109687312">
</a>
<p>
The number of times since this server was last started that
the NDB metadata change detection thread has discovered
changes with respect to the MySQL data dictionary.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_metadata_excluded_count">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_metadata_excluded_count">
<code class="literal">
Ndb_metadata_excluded_count
</code>
</a>
</p>
<a class="indexterm" name="idm46045109682784">
</a>
<a class="indexterm" name="idm46045109681680">
</a>
<p>
The number of metadata objects that the NDB binlog thread has
been unable to synchronize on this SQL node since it was last
restarted.
</p>
<p>
Should an object be excluded, it is not again considered for
automatic synchronization until the user corrects the mismatch
manually. This can be done by attempting to use the table with
a statement such as
<code class="literal">
SHOW CREATE TABLE
<em class="replaceable">
<code>
table
</code>
</em>
</code>
,
<code class="literal">
SELECT *
FROM
<em class="replaceable">
<code>
table
</code>
</em>
</code>
, or any other
statement that would trigger table discovery.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_metadata_synced_count">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_metadata_synced_count">
<code class="literal">
Ndb_metadata_synced_count
</code>
</a>
</p>
<a class="indexterm" name="idm46045109674448">
</a>
<a class="indexterm" name="idm46045109673344">
</a>
<p>
The number of NDB metadata objects which have been
synchronized on this SQL node since it was last restarted.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_number_of_data_nodes">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_number_of_data_nodes">
<code class="literal">
Ndb_number_of_data_nodes
</code>
</a>
</p>
<a class="indexterm" name="idm46045109668880">
</a>
<a class="indexterm" name="idm46045109667776">
</a>
<p>
If the server is part of an NDB Cluster, the value of this
variable is the number of data nodes in the cluster.
</p>
<p>
If the server is not part of an NDB Cluster, then the value of
this variable is 0.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_pushed_queries_defined">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_pushed_queries_defined">
<code class="literal">
Ndb_pushed_queries_defined
</code>
</a>
</p>
<a class="indexterm" name="idm46045109662800">
</a>
<a class="indexterm" name="idm46045109661696">
</a>
<p>
The total number of joins pushed down to the NDB kernel for
distributed handling on the data nodes.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
Joins tested using
<a class="link" href="explain.html" title="15.8.2 EXPLAIN Statement">
<code class="literal">
EXPLAIN
</code>
</a>
that can be pushed down contribute to this number.
</p>
</div>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_pushed_queries_dropped">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_pushed_queries_dropped">
<code class="literal">
Ndb_pushed_queries_dropped
</code>
</a>
</p>
<a class="indexterm" name="idm46045109655072">
</a>
<a class="indexterm" name="idm46045109653968">
</a>
<p>
The number of joins that were pushed down to the NDB kernel
but that could not be handled there.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_pushed_queries_executed">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_pushed_queries_executed">
<code class="literal">
Ndb_pushed_queries_executed
</code>
</a>
</p>
<a class="indexterm" name="idm46045109649456">
</a>
<a class="indexterm" name="idm46045109648352">
</a>
<p>
The number of joins successfully pushed down to
<a class="link" href="mysql-cluster.html" title="Chapter 25 MySQL NDB Cluster 8.4">
<code class="literal">
NDB
</code>
</a>
and executed there.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_pushed_reads">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_pushed_reads">
<code class="literal">
Ndb_pushed_reads
</code>
</a>
</p>
<a class="indexterm" name="idm46045109642656">
</a>
<a class="indexterm" name="idm46045109641616">
</a>
<p>
The number of rows returned to
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
from
the NDB kernel by joins that were pushed down.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
Executing
<a class="link" href="explain.html" title="15.8.2 EXPLAIN Statement">
<code class="literal">
EXPLAIN
</code>
</a>
on joins
that can be pushed down to
<a class="link" href="mysql-cluster.html" title="Chapter 25 MySQL NDB Cluster 8.4">
<code class="literal">
NDB
</code>
</a>
does not add to this number.
</p>
</div>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_pruned_scan_count">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_pruned_scan_count">
<code class="literal">
Ndb_pruned_scan_count
</code>
</a>
</p>
<a class="indexterm" name="idm46045109632656">
</a>
<a class="indexterm" name="idm46045109631616">
</a>
<p>
This variable holds a count of the number of scans executed by
<a class="link" href="mysql-cluster.html" title="Chapter 25 MySQL NDB Cluster 8.4">
<code class="literal">
NDBCLUSTER
</code>
</a>
since the NDB Cluster
was last started where
<a class="link" href="mysql-cluster.html" title="Chapter 25 MySQL NDB Cluster 8.4">
<code class="literal">
NDBCLUSTER
</code>
</a>
was able to use partition pruning.
</p>
<p>
Using this variable together with
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_scan_count">
<code class="literal">
Ndb_scan_count
</code>
</a>
can be
helpful in schema design to maximize the ability of the server
to prune scans to a single table partition, thereby involving
replica only a single data node.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_replica_max_replicated_epoch">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_replica_max_replicated_epoch">
<code class="literal">
Ndb_replica_max_replicated_epoch
</code>
</a>
</p>
<a class="indexterm" name="idm46045109622688">
</a>
<a class="indexterm" name="idm46045109621648">
</a>
<p>
The most recently committed epoch on this replica. You can
compare this value with
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_conflict_last_conflict_epoch">
<code class="literal">
Ndb_conflict_last_conflict_epoch
</code>
</a>
;
if
<code class="literal">
Ndb_replica_max_replicated_epoch
</code>
is the
greater of the two, no conflicts have yet been detected.
</p>
<p>
For more information, see
<a class="xref" href="mysql-cluster-replication-conflict-resolution.html" title="25.7.12 NDB Cluster Replication Conflict Resolution">
Section 25.7.12, “NDB Cluster Replication Conflict Resolution”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_scan_count">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_scan_count">
<code class="literal">
Ndb_scan_count
</code>
</a>
</p>
<a class="indexterm" name="idm46045109614000">
</a>
<a class="indexterm" name="idm46045109612912">
</a>
<p>
This variable holds a count of the total number of scans
executed by
<a class="link" href="mysql-cluster.html" title="Chapter 25 MySQL NDB Cluster 8.4">
<code class="literal">
NDBCLUSTER
</code>
</a>
since the
NDB Cluster was last started.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_slave_max_replicated_epoch">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_slave_max_replicated_epoch">
<code class="literal">
Ndb_slave_max_replicated_epoch
</code>
</a>
</p>
<a class="indexterm" name="idm46045109607232">
</a>
<a class="indexterm" name="idm46045109606128">
</a>
<p>
Deprecated synonym for
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_replica_max_replicated_epoch">
<code class="literal">
Ndb_replica_max_replicated_epoch
</code>
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_system_name">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_system_name">
<code class="literal">
Ndb_system_name
</code>
</a>
</p>
<a class="indexterm" name="idm46045109600464">
</a>
<a class="indexterm" name="idm46045109599376">
</a>
<p>
If this MySQL Server is connected to an NDB cluster, this
read-only variable shows the cluster system name. Otherwise,
the value is an empty string.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Ndb_trans_hint_count_session">
</a>
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_trans_hint_count_session">
<code class="literal">
Ndb_trans_hint_count_session
</code>
</a>
</p>
<a class="indexterm" name="idm46045109594880">
</a>
<a class="indexterm" name="idm46045109593776">
</a>
<p>
The number of transactions using hints that have been started
in the current session. Compare with
<a class="link" href="mysql-cluster-options-variables.html#statvar_Ndb_api_trans_start_count_session">
<code class="literal">
Ndb_api_trans_start_count_session
</code>
</a>
to obtain the proportion of all NDB transactions able to use
hints.
</p>
</li>
</ul>
</div>
</div>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/bug-reports.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title">
<a name="bug-reports">
</a>
1.6 How to Report Bugs or Problems
</h2>
</div>
</div>
</div>
<a class="indexterm" name="idm46045333723392">
</a>
<a class="indexterm" name="idm46045333721968">
</a>
<a class="indexterm" name="idm46045333720480">
</a>
<a class="indexterm" name="idm46045333718992">
</a>
<a class="indexterm" name="idm46045333717504">
</a>
<a class="indexterm" name="idm46045333716016">
</a>
<a class="indexterm" name="idm46045333714528">
</a>
<a class="indexterm" name="idm46045333713040">
</a>
<a class="indexterm" name="idm46045333711552">
</a>
<a class="indexterm" name="idm46045333710480">
</a>
<p>
Before posting a bug report about a problem, please try to verify
that it is a bug and that it has not been reported already:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
Start by searching the MySQL online manual at
<a class="ulink" href="/doc/" target="_top">
https://dev.mysql.com/doc/
</a>
. We try to keep the manual up to
date by updating it frequently with solutions to newly found
problems. In addition, the release notes accompanying the manual
can be particularly useful since it is quite possible that a
newer version contains a solution to your problem. The release
notes are available at the location just given for the manual.
</p>
</li>
<li class="listitem">
<p>
If you get a parse error for an SQL statement, please check your
syntax closely. If you cannot find something wrong with it, it
is extremely likely that your current version of MySQL Server
doesn't support the syntax you are using. If you are using the
current version and the manual doesn't cover the syntax that you
are using, MySQL Server doesn't support your statement.
</p>
<p>
If the manual covers the syntax you are using, but you have an
older version of MySQL Server, you should check the MySQL change
history to see when the syntax was implemented. In this case,
you have the option of upgrading to a newer version of MySQL
Server.
</p>
</li>
<li class="listitem">
<p>
For solutions to some common problems, see
<a class="xref" href="problems.html" title="B.3 Problems and Common Errors">
Section B.3, “Problems and Common Errors”
</a>
.
</p>
</li>
<li class="listitem">
<p>
Search the bugs database at
<a class="ulink" href="http://bugs.mysql.com/" target="_blank">
http://bugs.mysql.com/
</a>
to see whether the bug has
been reported and fixed.
</p>
</li>
<li class="listitem">
<p>
You can also use
<a class="ulink" href="http://www.mysql.com/search/" target="_blank">
http://www.mysql.com/search/
</a>
to
search all the Web pages (including the manual) that are located
at the MySQL website.
</p>
</li>
</ul>
</div>
<p>
If you cannot find an answer in the manual, the bugs database, or
the mailing list archives, check with your local MySQL expert. If
you still cannot find an answer to your question, please use the
following guidelines for reporting the bug.
</p>
<p>
The normal way to report bugs is to visit
<a class="ulink" href="http://bugs.mysql.com/" target="_blank">
http://bugs.mysql.com/
</a>
, which is the address for our
bugs database. This database is public and can be browsed and
searched by anyone. If you log in to the system, you can enter new
reports.
</p>
<p>
Bugs posted in the bugs database at
<a class="ulink" href="http://bugs.mysql.com/" target="_blank">
http://bugs.mysql.com/
</a>
that are corrected for a given
release are noted in the release notes.
</p>
<p>
If you find a security bug in MySQL Server, please let us know
immediately by sending an email message to
<code class="email">
<
<a class="email" href="mailto:[email protected]">
[email protected]
</a>
>
</code>
. Exception: Support customers
should report all problems, including security bugs, to Oracle
Support at
<a class="ulink" href="http://support.oracle.com/" target="_blank">
http://support.oracle.com/
</a>
.
</p>
<p>
To discuss problems with other users, you can use the
<a class="ulink" href="https://mysqlcommunity.slack.com/" target="_blank">
MySQL Community
Slack
</a>
.
</p>
<p>
Writing a good bug report takes patience, but doing it right the
first time saves time both for us and for yourself. A good bug
report, containing a full test case for the bug, makes it very
likely that we will fix the bug in the next release. This section
helps you write your report correctly so that you do not waste your
time doing things that may not help us much or at all. Please read
this section carefully and make sure that all the information
described here is included in your report.
</p>
<p>
Preferably, you should test the problem using the latest production
or development version of MySQL Server before posting. Anyone should
be able to repeat the bug by just using
<code class="literal">
mysql test <
script_file
</code>
on your test case or by running the shell or
Perl script that you include in the bug report. Any bug that we are
able to repeat has a high chance of being fixed in the next MySQL
release.
</p>
<p>
It is most helpful when a good description of the problem is
included in the bug report. That is, give a good example of
everything you did that led to the problem and describe, in exact
detail, the problem itself. The best reports are those that include
a full example showing how to reproduce the bug or problem. See
<a class="xref" href="debugging-mysql.html" title="7.9 Debugging MySQL">
Section 7.9, “Debugging MySQL”
</a>
.
</p>
<p>
Remember that it is possible for us to respond to a report
containing too much information, but not to one containing too
little. People often omit facts because they think they know the
cause of a problem and assume that some details do not matter. A
good principle to follow is that if you are in doubt about stating
something, state it. It is faster and less troublesome to write a
couple more lines in your report than to wait longer for the answer
if we must ask you to provide information that was missing from the
initial report.
</p>
<p>
The most common errors made in bug reports are (a) not including the
version number of the MySQL distribution that you use, and (b) not
fully describing the platform on which the MySQL server is installed
(including the platform type and version number). These are highly
relevant pieces of information, and in 99 cases out of 100, the bug
report is useless without them. Very often we get questions like,
<span class="quote">
“
<span class="quote">
Why doesn't this work for me?
</span>
”
</span>
Then we find that the
feature requested wasn't implemented in that MySQL version, or that
a bug described in a report has been fixed in newer MySQL versions.
Errors often are platform-dependent. In such cases, it is next to
impossible for us to fix anything without knowing the operating
system and the version number of the platform.
</p>
<p>
If you compiled MySQL from source, remember also to provide
information about your compiler if it is related to the problem.
Often people find bugs in compilers and think the problem is
MySQL-related. Most compilers are under development all the time and
become better version by version. To determine whether your problem
depends on your compiler, we need to know what compiler you used.
Note that every compiling problem should be regarded as a bug and
reported accordingly.
</p>
<p>
If a program produces an error message, it is very important to
include the message in your report. If we try to search for
something from the archives, it is better that the error message
reported exactly matches the one that the program produces. (Even
the lettercase should be observed.) It is best to copy and paste the
entire error message into your report. You should never try to
reproduce the message from memory.
</p>
<p>
If you have a problem with Connector/ODBC (MyODBC), please try to
generate a trace file and send it with your report. See
<a class="ulink" href="/doc/connector-odbc/en/connector-odbc-support-bug-report.html" target="_top">
How to Report Connector/ODBC Problems or Bugs
</a>
.
</p>
<p>
If your report includes long query output lines from test cases that
you run with the
<a class="link" href="mysql.html" title="6.5.1 mysql — The MySQL Command-Line Client">
<span class="command">
<strong>
mysql
</strong>
</span>
</a>
command-line tool, you can
make the output more readable by using the
<a class="link" href="mysql-command-options.html#option_mysql_vertical">
<code class="option">
--vertical
</code>
</a>
option or the
<code class="literal">
\G
</code>
statement terminator. The
<a class="link" href="explain.html" title="15.8.2 EXPLAIN Statement">
<code class="literal">
EXPLAIN SELECT
</code>
</a>
example later in this section demonstrates the use of
<code class="literal">
\G
</code>
.
</p>
<p>
Please include the following information in your report:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
The version number of the MySQL distribution you are using (for
example, MySQL 5.7.10). You can find out which version you are
running by executing
<a class="link" href="mysqladmin.html" title="6.5.2 mysqladmin — A MySQL Server Administration Program">
<span class="command">
<strong>
mysqladmin version
</strong>
</span>
</a>
. The
<a class="link" href="mysqladmin.html" title="6.5.2 mysqladmin — A MySQL Server Administration Program">
<span class="command">
<strong>
mysqladmin
</strong>
</span>
</a>
program can be found in the
<code class="filename">
bin
</code>
directory under your MySQL installation
directory.
</p>
</li>
<li class="listitem">
<p>
The manufacturer and model of the machine on which you
experience the problem.
</p>
</li>
<li class="listitem">
<p>
The operating system name and version. If you work with Windows,
you can usually get the name and version number by
double-clicking your My Computer icon and pulling down the
<span class="quote">
“
<span class="quote">
Help/About Windows
</span>
”
</span>
menu. For most Unix-like
operating systems, you can get this information by executing the
command
<code class="literal">
uname -a
</code>
.
</p>
</li>
<li class="listitem">
<p>
Sometimes the amount of memory (real and virtual) is relevant.
If in doubt, include these values.
</p>
</li>
<li class="listitem">
<p>
The contents of the
<code class="filename">
docs/INFO_BIN
</code>
file from
your MySQL installation. This file contains information about
how MySQL was configured and compiled.
</p>
<a class="indexterm" name="idm46045333669424">
</a>
</li>
<li class="listitem">
<p>
If you are using a source distribution of the MySQL software,
include the name and version number of the compiler that you
used. If you have a binary distribution, include the
distribution name.
</p>
</li>
<li class="listitem">
<p>
If the problem occurs during compilation, include the exact
error messages and also a few lines of context around the
offending code in the file where the error occurs.
</p>
</li>
<li class="listitem">
<p>
If
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
died, you should also report the
statement that caused
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
to unexpectedly
exit. You can usually get this information by running
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
with query logging enabled, and then
looking in the log after
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
exits. See
<a class="xref" href="debugging-mysql.html" title="7.9 Debugging MySQL">
Section 7.9, “Debugging MySQL”
</a>
.
</p>
</li>
<li class="listitem">
<p>
If a database table is related to the problem, include the
output from the
<code class="literal">
SHOW CREATE TABLE
<em class="replaceable">
<code>
db_name
</code>
</em>
.
<em class="replaceable">
<code>
tbl_name
</code>
</em>
</code>
statement in the bug report. This is a very easy way to get the
definition of any table in a database. The information helps us
create a situation matching the one that you have experienced.
</p>
</li>
<li class="listitem">
<p>
The SQL mode in effect when the problem occurred can be
significant, so please report the value of the
<a class="link" href="server-system-variables.html#sysvar_sql_mode">
<code class="literal">
sql_mode
</code>
</a>
system variable. For
stored procedure, stored function, and trigger objects, the
relevant
<a class="link" href="server-system-variables.html#sysvar_sql_mode">
<code class="literal">
sql_mode
</code>
</a>
value is the
one in effect when the object was created. For a stored
procedure or function, the
<a class="link" href="show-create-procedure.html" title="15.7.7.10 SHOW CREATE PROCEDURE Statement">
<code class="literal">
SHOW CREATE
PROCEDURE
</code>
</a>
or
<a class="link" href="show-create-function.html" title="15.7.7.9 SHOW CREATE FUNCTION Statement">
<code class="literal">
SHOW CREATE
FUNCTION
</code>
</a>
statement shows the relevant SQL mode, or you
can query
<code class="literal">
INFORMATION_SCHEMA
</code>
for the
information:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa93560835"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SELECT</span> ROUTINE_SCHEMA<span class="token punctuation">,</span> ROUTINE_NAME<span class="token punctuation">,</span> SQL_MODE
<span class="token keyword">FROM</span> INFORMATION_SCHEMA<span class="token punctuation">.</span>ROUTINES<span class="token punctuation">;</span></code></pre>
</div>
<p>
For triggers, you can use this statement:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa62381075"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SELECT</span> EVENT_OBJECT_SCHEMA<span class="token punctuation">,</span> EVENT_OBJECT_TABLE<span class="token punctuation">,</span> TRIGGER_NAME<span class="token punctuation">,</span> SQL_MODE
<span class="token keyword">FROM</span> INFORMATION_SCHEMA<span class="token punctuation">.</span><span class="token keyword">TRIGGERS</span><span class="token punctuation">;</span></code></pre>
</div>
</li>
<li class="listitem">
<p>
For performance-related bugs or problems with
<a class="link" href="select.html" title="15.2.13 SELECT Statement">
<code class="literal">
SELECT
</code>
</a>
statements, you should
always include the output of
<code class="literal">
EXPLAIN SELECT
...
</code>
, and at least the number of rows that the
<a class="link" href="select.html" title="15.2.13 SELECT Statement">
<code class="literal">
SELECT
</code>
</a>
statement produces. You
should also include the output from
<code class="literal">
SHOW CREATE TABLE
<em class="replaceable">
<code>
tbl_name
</code>
</em>
</code>
for each table
that is involved. The more information you provide about your
situation, the more likely it is that someone can help you.
</p>
<p>
The following is an example of a very good bug report. The
statements are run using the
<a class="link" href="mysql.html" title="6.5.1 mysql — The MySQL Command-Line Client">
<span class="command">
<strong>
mysql
</strong>
</span>
</a>
command-line tool. Note the use of the
<code class="literal">
\G
</code>
statement terminator for statements that would otherwise provide
very long output lines that are difficult to read.
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa54150033"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SHOW</span> <span class="token keyword">VARIABLES</span><span class="token punctuation">;</span>
<span class="token prompt">mysql></span> <span class="token keyword">SHOW</span> <span class="token keyword">COLUMNS</span> <span class="token keyword">FROM</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>\G
<span class="token operator"></span><em class="replaceable"><span class="token operator"><</span>output <span class="token keyword">from</span> <span class="token keyword">SHOW</span> <span class="token keyword">COLUMNS</span><span class="token operator">></span></em><span class="token operator"></span>
<span class="token prompt">mysql></span> <span class="token keyword">EXPLAIN</span> <span class="token keyword">SELECT</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>\G
<span class="token operator"></span><em class="replaceable"><span class="token operator"><</span>output <span class="token keyword">from</span> <span class="token keyword">EXPLAIN</span><span class="token operator">></span></em><span class="token operator"></span>
<span class="token prompt">mysql></span> <span class="token keyword">FLUSH</span> <span class="token keyword">STATUS</span><span class="token punctuation">;</span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">;</span>
<span class="token operator"></span><em class="replaceable"><span class="token operator"><</span>A short version <span class="token keyword">of</span> the output <span class="token keyword">from</span> <span class="token keyword">SELECT</span><span class="token punctuation">,</span>
including the <span class="token datatype">time</span> taken <span class="token keyword">to</span> run the <span class="token keyword">query</span><span class="token operator">></span></em><span class="token operator"></span>
<span class="token prompt">mysql></span> <span class="token keyword">SHOW</span> <span class="token keyword">STATUS</span><span class="token punctuation">;</span>
<span class="token operator"></span><em class="replaceable"><span class="token operator"><</span>output <span class="token keyword">from</span> <span class="token keyword">SHOW</span> <span class="token keyword">STATUS</span><span class="token operator">></span></em><span class="token operator"></span></code></pre>
</div>
</li>
<li class="listitem">
<p>
If a bug or problem occurs while running
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
, try to provide an input script that
reproduces the anomaly. This script should include any necessary
source files. The more closely the script can reproduce your
situation, the better. If you can make a reproducible test case,
you should upload it to be attached to the bug report.
</p>
<p>
If you cannot provide a script, you should at least include the
output from
<a class="link" href="mysqladmin.html" title="6.5.2 mysqladmin — A MySQL Server Administration Program">
<span class="command">
<strong>
mysqladmin variables extended-status
processlist
</strong>
</span>
</a>
in your report to provide some information
on how your system is performing.
</p>
</li>
<li class="listitem">
<p>
If you cannot produce a test case with only a few rows, or if
the test table is too big to be included in the bug report (more
than 10 rows), you should dump your tables using
<a class="link" href="mysqldump.html" title="6.5.4 mysqldump — A Database Backup Program">
<span class="command">
<strong>
mysqldump
</strong>
</span>
</a>
and create a
<code class="filename">
README
</code>
file that describes your problem.
Create a compressed archive of your files using
<span class="command">
<strong>
tar
</strong>
</span>
and
<span class="command">
<strong>
gzip
</strong>
</span>
or
<span class="command">
<strong>
zip
</strong>
</span>
. After you initiate a bug report for our
bugs database at
<a class="ulink" href="http://bugs.mysql.com/" target="_blank">
http://bugs.mysql.com/
</a>
, click
the Files tab in the bug report for instructions on uploading
the archive to the bugs database.
</p>
</li>
<li class="listitem">
<p>
If you believe that the MySQL server produces a strange result
from a statement, include not only the result, but also your
opinion of what the result should be, and an explanation
describing the basis for your opinion.
</p>
</li>
<li class="listitem">
<p>
When you provide an example of the problem, it is better to use
the table names, variable names, and so forth that exist in your
actual situation than to come up with new names. The problem
could be related to the name of a table or variable. These cases
are rare, perhaps, but it is better to be safe than sorry. After
all, it should be easier for you to provide an example that uses
your actual situation, and it is by all means better for us. If
you have data that you do not want to be visible to others in
the bug report, you can upload it using the Files tab as
previously described. If the information is really top secret
and you do not want to show it even to us, go ahead and provide
an example using other names, but please regard this as the last
choice.
</p>
</li>
<li class="listitem">
<p>
Include all the options given to the relevant programs, if
possible. For example, indicate the options that you use when
you start the
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
server, as well as the
options that you use to run any MySQL client programs. The
options to programs such as
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
and
<a class="link" href="mysql.html" title="6.5.1 mysql — The MySQL Command-Line Client">
<span class="command">
<strong>
mysql
</strong>
</span>
</a>
, and to the
<span class="command">
<strong>
configure
</strong>
</span>
script, are often key to resolving
problems and are very relevant. It is never a bad idea to
include them. If your problem involves a program written in a
language such as Perl or PHP, please include the language
processor's version number, as well as the version for any
modules that the program uses. For example, if you have a Perl
script that uses the
<code class="literal">
DBI
</code>
and
<code class="literal">
DBD::mysql
</code>
modules, include the version
numbers for Perl,
<code class="literal">
DBI
</code>
, and
<code class="literal">
DBD::mysql
</code>
.
</p>
</li>
<li class="listitem">
<p>
If your question is related to the privilege system, please
include the output of
<a class="link" href="mysqladmin.html" title="6.5.2 mysqladmin — A MySQL Server Administration Program">
<span class="command">
<strong>
mysqladmin reload
</strong>
</span>
</a>
, and
all the error messages you get when trying to connect. When you
test your privileges, you should execute
<a class="link" href="mysqladmin.html" title="6.5.2 mysqladmin — A MySQL Server Administration Program">
<span class="command">
<strong>
mysqladmin
reload version
</strong>
</span>
</a>
and try to connect with the program
that gives you trouble.
</p>
</li>
<li class="listitem">
<p>
If you have a patch for a bug, do include it. But do not assume
that the patch is all we need, or that we can use it, if you do
not provide some necessary information such as test cases
showing the bug that your patch fixes. We might find problems
with your patch or we might not understand it at all. If so, we
cannot use it.
</p>
<p>
If we cannot verify the exact purpose of the patch, we will not
use it. Test cases help us here. Show that the patch handles all
the situations that may occur. If we find a borderline case
(even a rare one) where the patch will not work, it may be
useless.
</p>
</li>
<li class="listitem">
<p>
Guesses about what the bug is, why it occurs, or what it depends
on are usually wrong. Even the MySQL team cannot guess such
things without first using a debugger to determine the real
cause of a bug.
</p>
</li>
<li class="listitem">
<p>
Indicate in your bug report that you have checked the reference
manual and mail archive so that others know you have tried to
solve the problem yourself.
</p>
</li>
<li class="listitem">
<p>
If your data appears corrupt or you get errors when you access a
particular table, first check your tables with
<a class="link" href="check-table.html" title="15.7.3.2 CHECK TABLE Statement">
<code class="literal">
CHECK TABLE
</code>
</a>
. If that statement
reports any errors:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
The
<code class="literal">
InnoDB
</code>
crash recovery mechanism
handles cleanup when the server is restarted after being
killed, so in typical operation there is no need to
<span class="quote">
“
<span class="quote">
repair
</span>
”
</span>
tables. If you encounter an error with
<code class="literal">
InnoDB
</code>
tables, restart the server and see
whether the problem persists, or whether the error affected
only cached data in memory. If data is corrupted on disk,
consider restarting with the
<a class="link" href="innodb-parameters.html#sysvar_innodb_force_recovery">
<code class="literal">
innodb_force_recovery
</code>
</a>
option enabled so that you can dump the affected tables.
</p>
</li>
<li class="listitem">
<p>
For non-transactional tables, try to repair them with
<a class="link" href="repair-table.html" title="15.7.3.5 REPAIR TABLE Statement">
<code class="literal">
REPAIR TABLE
</code>
</a>
or with
<a class="link" href="myisamchk.html" title="6.6.4 myisamchk — MyISAM Table-Maintenance Utility">
<span class="command">
<strong>
myisamchk
</strong>
</span>
</a>
. See
<a class="xref" href="server-administration.html" title="Chapter 7 MySQL Server Administration">
Chapter 7,
<i>
MySQL Server Administration
</i>
</a>
.
</p>
</li>
</ul>
</div>
<p>
If you are running Windows, please verify the value of
<a class="link" href="server-system-variables.html#sysvar_lower_case_table_names">
<code class="literal">
lower_case_table_names
</code>
</a>
using
the
<code class="literal">
SHOW VARIABLES LIKE
'lower_case_table_names'
</code>
statement. This variable
affects how the server handles lettercase of database and table
names. Its effect for a given value should be as described in
<a class="xref" href="identifier-case-sensitivity.html" title="11.2.3 Identifier Case Sensitivity">
Section 11.2.3, “Identifier Case Sensitivity”
</a>
.
</p>
</li>
<li class="listitem">
<p>
If you often get corrupted tables, you should try to find out
when and why this happens. In this case, the error log in the
MySQL data directory may contain some information about what
happened. (This is the file with the
<code class="filename">
.err
</code>
suffix in the name.) See
<a class="xref" href="error-log.html" title="7.4.2 The Error Log">
Section 7.4.2, “The Error Log”
</a>
. Please
include any relevant information from this file in your bug
report. Normally
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
should
<span class="emphasis">
<em>
never
</em>
</span>
corrupt a table if nothing killed it
in the middle of an update. If you can find the cause of
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
dying, it is much easier for us to
provide you with a fix for the problem. See
<a class="xref" href="what-is-crashing.html" title="B.3.1 How to Determine What Is Causing a Problem">
Section B.3.1, “How to Determine What Is Causing a Problem”
</a>
.
</p>
</li>
<li class="listitem">
<p>
If possible, download and install the most recent version of
MySQL Server and check whether it solves your problem. All
versions of the MySQL software are thoroughly tested and should
work without problems. We believe in making everything as
backward-compatible as possible, and you should be able to
switch MySQL versions without difficulty. See
<a class="xref" href="which-version.html" title="2.1.2 Which MySQL Version and Distribution to Install">
Section 2.1.2, “Which MySQL Version and Distribution to Install”
</a>
.
</p>
</li>
</ul>
</div>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/mysql-enterprise-audit.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title">
<a name="mysql-enterprise-audit">
</a>
32.4 MySQL Enterprise Audit Overview
</h2>
</div>
</div>
</div>
<a class="indexterm" name="idm46045060213328">
</a>
<a class="indexterm" name="idm46045060212288">
</a>
<p>
MySQL Enterprise Edition includes MySQL Enterprise Audit, implemented using a server plugin.
MySQL Enterprise Audit uses the open MySQL Audit API to enable standard,
policy-based monitoring and logging of connection and query
activity executed on specific MySQL servers. Designed to meet the
Oracle audit specification, MySQL Enterprise Audit provides an out of box, easy
to use auditing and compliance solution for applications that are
governed by both internal and external regulatory guidelines.
</p>
<p>
When installed, the audit plugin enables MySQL Server to produce a
log file containing an audit record of server activity. The log
contents include when clients connect and disconnect, and what
actions they perform while connected, such as which databases and
tables they access.
</p>
<p>
For more information, see
<a class="xref" href="audit-log.html" title="8.4.5 MySQL Enterprise Audit">
Section 8.4.5, “MySQL Enterprise Audit”
</a>
.
</p>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/internal-temporary-tables.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a name="internal-temporary-tables">
</a>
10.4.4 Internal Temporary Table Use in MySQL
</h3>
</div>
</div>
</div>
<a class="indexterm" name="idm46045226660704">
</a>
<p>
In some cases, the server creates internal temporary tables
while processing statements. Users have no direct control over
when this occurs.
</p>
<p>
The server creates temporary tables under conditions such as
these:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
Evaluation of
<a class="link" href="union.html" title="15.2.18 UNION Clause">
<code class="literal">
UNION
</code>
</a>
statements, with some exceptions described later.
</p>
</li>
<li class="listitem">
<p>
Evaluation of some views, such those that use the
<code class="literal">
TEMPTABLE
</code>
algorithm,
<a class="link" href="union.html" title="15.2.18 UNION Clause">
<code class="literal">
UNION
</code>
</a>
, or aggregation.
</p>
</li>
<li class="listitem">
<p>
Evaluation of derived tables (see
<a class="xref" href="derived-tables.html" title="15.2.15.8 Derived Tables">
Section 15.2.15.8, “Derived Tables”
</a>
).
</p>
</li>
<li class="listitem">
<p>
Evaluation of common table expressions (see
<a class="xref" href="with.html" title="15.2.20 WITH (Common Table Expressions)">
Section 15.2.20, “WITH (Common Table Expressions)”
</a>
).
</p>
</li>
<li class="listitem">
<p>
Tables created for subquery or semijoin materialization (see
<a class="xref" href="subquery-optimization.html" title="10.2.2 Optimizing Subqueries, Derived Tables, View References, and Common Table Expressions">
Section 10.2.2, “Optimizing Subqueries, Derived Tables, View References, and Common Table
Expressions”
</a>
).
</p>
</li>
<li class="listitem">
<p>
Evaluation of statements that contain an
<code class="literal">
ORDER
BY
</code>
clause and a different
<code class="literal">
GROUP
BY
</code>
clause, or for which the
<code class="literal">
ORDER
BY
</code>
or
<code class="literal">
GROUP BY
</code>
contains columns
from tables other than the first table in the join queue.
</p>
</li>
<li class="listitem">
<p>
Evaluation of
<code class="literal">
DISTINCT
</code>
combined with
<code class="literal">
ORDER BY
</code>
may require a temporary table.
</p>
</li>
<li class="listitem">
<p>
For queries that use the
<code class="literal">
SQL_SMALL_RESULT
</code>
modifier, MySQL uses an in-memory temporary table, unless
the query also contains elements (described later) that
require on-disk storage.
</p>
</li>
<li class="listitem">
<p>
To evaluate
<a class="link" href="insert-select.html" title="15.2.7.1 INSERT ... SELECT Statement">
<code class="literal">
INSERT ...
SELECT
</code>
</a>
statements that select from and insert into
the same table, MySQL creates an internal temporary table to
hold the rows from the
<a class="link" href="select.html" title="15.2.13 SELECT Statement">
<code class="literal">
SELECT
</code>
</a>
, then inserts those
rows into the target table. See
<a class="xref" href="insert-select.html" title="15.2.7.1 INSERT ... SELECT Statement">
Section 15.2.7.1, “INSERT ... SELECT Statement”
</a>
.
</p>
</li>
<li class="listitem">
<p>
Evaluation of multiple-table
<a class="link" href="update.html" title="15.2.17 UPDATE Statement">
<code class="literal">
UPDATE
</code>
</a>
statements.
</p>
</li>
<li class="listitem">
<p>
Evaluation of
<a class="link" href="aggregate-functions.html#function_group-concat">
<code class="literal">
GROUP_CONCAT()
</code>
</a>
or
<a class="link" href="aggregate-functions.html#function_count">
<code class="literal">
COUNT(DISTINCT)
</code>
</a>
expressions.
</p>
</li>
<li class="listitem">
<p>
Evaluation of window functions (see
<a class="xref" href="window-functions.html" title="14.20 Window Functions">
Section 14.20, “Window Functions”
</a>
) uses temporary tables as
necessary.
</p>
</li>
</ul>
</div>
<p>
To determine whether a statement requires a temporary table, use
<a class="link" href="explain.html" title="15.8.2 EXPLAIN Statement">
<code class="literal">
EXPLAIN
</code>
</a>
and check the
<code class="literal">
Extra
</code>
column to see whether it says
<code class="literal">
Using temporary
</code>
(see
<a class="xref" href="using-explain.html" title="10.8.1 Optimizing Queries with EXPLAIN">
Section 10.8.1, “Optimizing Queries with EXPLAIN”
</a>
).
<code class="literal">
EXPLAIN
</code>
does not necessarily say
<code class="literal">
Using temporary
</code>
for
derived or materialized temporary tables. For statements that
use window functions,
<a class="link" href="explain.html" title="15.8.2 EXPLAIN Statement">
<code class="literal">
EXPLAIN
</code>
</a>
with
<code class="literal">
FORMAT=JSON
</code>
always provides information
about the windowing steps. If the windowing functions use
temporary tables, it is indicated for each step.
</p>
<p>
Some query conditions prevent the use of an in-memory temporary
table, in which case the server uses an on-disk table instead:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
Presence of a
<a class="link" href="blob.html" title="13.3.4 The BLOB and TEXT Types">
<code class="literal">
BLOB
</code>
</a>
or
<a class="link" href="blob.html" title="13.3.4 The BLOB and TEXT Types">
<code class="literal">
TEXT
</code>
</a>
column in the table. The
<code class="literal">
TempTable
</code>
storage engine, which is the
default storage engine for in-memory internal temporary
tables in MySQL 8.4, supports binary large
object types. See
<a class="xref" href="internal-temporary-tables.html#internal-temporary-tables-engines" title="Internal Temporary Table Storage Engine">
Internal Temporary Table Storage Engine
</a>
.
</p>
</li>
<li class="listitem">
<p>
Presence of any string column with a maximum length larger
than 512 (bytes for binary strings, characters for nonbinary
strings) in the
<a class="link" href="select.html" title="15.2.13 SELECT Statement">
<code class="literal">
SELECT
</code>
</a>
list,
if
<a class="link" href="union.html" title="15.2.18 UNION Clause">
<code class="literal">
UNION
</code>
</a>
or
<a class="link" href="union.html" title="15.2.18 UNION Clause">
<code class="literal">
UNION ALL
</code>
</a>
is used.
</p>
</li>
<li class="listitem">
<p>
The
<a class="link" href="show-columns.html" title="15.7.7.6 SHOW COLUMNS Statement">
<code class="literal">
SHOW COLUMNS
</code>
</a>
and
<a class="link" href="describe.html" title="15.8.1 DESCRIBE Statement">
<code class="literal">
DESCRIBE
</code>
</a>
statements use
<code class="literal">
BLOB
</code>
as the type for some columns, thus
the temporary table used for the results is an on-disk
table.
</p>
</li>
</ul>
</div>
<p>
The server does not use a temporary table for
<a class="link" href="union.html" title="15.2.18 UNION Clause">
<code class="literal">
UNION
</code>
</a>
statements that meet
certain qualifications. Instead, it retains from temporary table
creation only the data structures necessary to perform result
column typecasting. The table is not fully instantiated and no
rows are written to or read from it; rows are sent directly to
the client. The result is reduced memory and disk requirements,
and smaller delay before the first row is sent to the client
because the server need not wait until the last query block is
executed.
<a class="link" href="explain.html" title="15.8.2 EXPLAIN Statement">
<code class="literal">
EXPLAIN
</code>
</a>
and optimizer
trace output reflects this execution strategy: The
<code class="literal">
UNION RESULT
</code>
query block is not present
because that block corresponds to the part that reads from the
temporary table.
</p>
<p>
These conditions qualify a
<code class="literal">
UNION
</code>
for
evaluation without a temporary table:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
The union is
<code class="literal">
UNION ALL
</code>
, not
<code class="literal">
UNION
</code>
or
<code class="literal">
UNION
DISTINCT
</code>
.
</p>
</li>
<li class="listitem">
<p>
There is no global
<code class="literal">
ORDER BY
</code>
clause.
</p>
</li>
<li class="listitem">
<p>
The union is not the top-level query block of an
<code class="literal">
{INSERT | REPLACE} ... SELECT ...
</code>
statement.
</p>
</li>
</ul>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title">
<a name="internal-temporary-tables-engines">
</a>
Internal Temporary Table Storage Engine
</h4>
</div>
</div>
</div>
<p>
An internal temporary table can be held in memory and
processed by the
<code class="literal">
TempTable
</code>
or
<code class="literal">
MEMORY
</code>
storage engine, or stored on disk by
the
<code class="literal">
InnoDB
</code>
storage engine.
</p>
<h5>
<a name="idm46045226590512">
</a>
Storage Engine for In-Memory Internal Temporary Tables
</h5>
<p>
The
<a class="link" href="server-system-variables.html#sysvar_internal_tmp_mem_storage_engine">
<code class="literal">
internal_tmp_mem_storage_engine
</code>
</a>
variable defines the storage engine used for in-memory
internal temporary tables. Permitted values are
<code class="literal">
TempTable
</code>
(the default) and
<code class="literal">
MEMORY
</code>
.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
Configuring a session setting for
<a class="link" href="server-system-variables.html#sysvar_internal_tmp_mem_storage_engine">
<code class="literal">
internal_tmp_mem_storage_engine
</code>
</a>
requires the
<a class="link" href="privileges-provided.html#priv_session-variables-admin">
<code class="literal">
SESSION_VARIABLES_ADMIN
</code>
</a>
or
<a class="link" href="privileges-provided.html#priv_system-variables-admin">
<code class="literal">
SYSTEM_VARIABLES_ADMIN
</code>
</a>
privilege.
</p>
</div>
<p>
The
<code class="literal">
TempTable
</code>
storage engine provides
efficient storage for
<a class="link" href="char.html" title="13.3.2 The CHAR and VARCHAR Types">
<code class="literal">
VARCHAR
</code>
</a>
and
<a class="link" href="binary-varbinary.html" title="13.3.3 The BINARY and VARBINARY Types">
<code class="literal">
VARBINARY
</code>
</a>
columns, and
other binary large object types.
</p>
<p>
The following variables control
<code class="literal">
TempTable
</code>
storage engine limits and behavior:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<a class="link" href="server-system-variables.html#sysvar_tmp_table_size">
<code class="literal">
tmp_table_size
</code>
</a>
: Defines
the maximum size of any individual in-memory internal
temporary table created using the
<code class="literal">
TempTable
</code>
storage engine. When the
limit determined by
<a class="link" href="server-system-variables.html#sysvar_tmp_table_size">
<code class="literal">
tmp_table_size
</code>
</a>
is
reached, MySQL automatically converts the in-memory
internal temporary table to an
<code class="literal">
InnoDB
</code>
on-disk internal temporary table. The default value is
16777216 bytes (16 MiB).
</p>
<p>
The
<a class="link" href="server-system-variables.html#sysvar_tmp_table_size">
<code class="literal">
tmp_table_size
</code>
</a>
limit
is intended to prevent individual queries from consuming
an inordinate amount of global
<code class="literal">
TempTable
</code>
resources, which can affect
the performance of concurrent queries that require such
resources. Global
<code class="literal">
TempTable
</code>
resources
are controlled by
<a class="link" href="server-system-variables.html#sysvar_temptable_max_ram">
<code class="literal">
temptable_max_ram
</code>
</a>
and
<a class="link" href="server-system-variables.html#sysvar_temptable_max_mmap">
<code class="literal">
temptable_max_mmap
</code>
</a>
.
</p>
<p>
If
<a class="link" href="server-system-variables.html#sysvar_tmp_table_size">
<code class="literal">
tmp_table_size
</code>
</a>
is less
than
<a class="link" href="server-system-variables.html#sysvar_temptable_max_ram">
<code class="literal">
temptable_max_ram
</code>
</a>
,
it is not possible for an in-memory temporary table to use
more than
<a class="link" href="server-system-variables.html#sysvar_tmp_table_size">
<code class="literal">
tmp_table_size
</code>
</a>
.
If
<a class="link" href="server-system-variables.html#sysvar_tmp_table_size">
<code class="literal">
tmp_table_size
</code>
</a>
is
greater than the sum of
<a class="link" href="server-system-variables.html#sysvar_temptable_max_ram">
<code class="literal">
temptable_max_ram
</code>
</a>
and
<a class="link" href="server-system-variables.html#sysvar_temptable_max_mmap">
<code class="literal">
temptable_max_mmap
</code>
</a>
, an
in-memory temporary table cannot use more than the sum of
the
<a class="link" href="server-system-variables.html#sysvar_temptable_max_ram">
<code class="literal">
temptable_max_ram
</code>
</a>
and
<a class="link" href="server-system-variables.html#sysvar_temptable_max_mmap">
<code class="literal">
temptable_max_mmap
</code>
</a>
limits.
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="server-system-variables.html#sysvar_temptable_max_ram">
<code class="literal">
temptable_max_ram
</code>
</a>
:
Defines the maximum amount of RAM that can be used by the
<code class="literal">
TempTable
</code>
storage engine before it
starts allocating space from memory-mapped files or before
MySQL starts using
<code class="literal">
InnoDB
</code>
on-disk
internal temporary tables, depending on your
configuration. If not set explicitly, the value of
<a class="link" href="server-system-variables.html#sysvar_temptable_max_ram">
<code class="literal">
temptable_max_ram
</code>
</a>
is 3%
of the total memory available on the server, with a
minimum of 1 GB and a maximum of 4 GB.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
<a class="link" href="server-system-variables.html#sysvar_temptable_max_ram">
<code class="literal">
temptable_max_ram
</code>
</a>
does
not account for the thread-local memory block allocated
to each thread that uses the
<code class="literal">
TempTable
</code>
storage engine. The size of
the thread-local memory block depends on the size of the
thread's first memory allocation request. If the
request is less than 1MB, which it is in most cases, the
thread-local memory block size is 1MB. If the request is
greater than 1MB, the thread-local memory block is
approximately the same size as the initial memory
request. The thread-local memory block is held in
thread-local storage until thread exit.
</p>
</div>
</li>
<li class="listitem">
<p>
<a class="link" href="server-system-variables.html#sysvar_temptable_use_mmap">
<code class="literal">
temptable_use_mmap
</code>
</a>
:
Controls whether the
<code class="literal">
TempTable
</code>
storage
engine allocates space from memory-mapped files or MySQL
uses
<code class="literal">
InnoDB
</code>
on-disk internal temporary
tables when the limit determined by
<a class="link" href="server-system-variables.html#sysvar_temptable_max_ram">
<code class="literal">
temptable_max_ram
</code>
</a>
is
exceeded. The default value is
<code class="literal">
OFF
</code>
.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
<a class="link" href="server-system-variables.html#sysvar_temptable_use_mmap">
<code class="literal">
temptable_use_mmap
</code>
</a>
is
deprecated; expect support for it to be removed in a
future version of MySQL. Setting
<a class="link" href="server-system-variables.html#sysvar_temptable_max_mmap">
<code class="literal">
temptable_max_mmap=0
</code>
</a>
is
equivalent to setting
<a class="link" href="server-system-variables.html#sysvar_temptable_use_mmap">
<code class="literal">
temptable_use_mmap=OFF
</code>
</a>
.
</p>
</div>
</li>
<li class="listitem">
<p>
<a class="link" href="server-system-variables.html#sysvar_temptable_max_mmap">
<code class="literal">
temptable_max_mmap
</code>
</a>
: Sets
the maximum amount of memory the
<code class="literal">
TempTable
</code>
storage engine is permitted
to allocate from memory-mapped files before MySQL starts
using
<code class="literal">
InnoDB
</code>
on-disk internal temporary
tables. The default value is
<code class="literal">
0
</code>
(disabled). The limit is intended to address the risk of
memory mapped files using too much space in the temporary
directory (
<a class="link" href="server-system-variables.html#sysvar_tmpdir">
<code class="literal">
tmpdir
</code>
</a>
).
<code class="literal">
temptable_max_mmap = 0
</code>
disables
allocation from memory-mapped files, effectively disabling
their use, regardless of the value of
<a class="link" href="server-system-variables.html#sysvar_temptable_use_mmap">
<code class="literal">
temptable_use_mmap
</code>
</a>
.
</p>
</li>
</ul>
</div>
<p>
Use of memory-mapped files by the
<code class="literal">
TempTable
</code>
storage engine is governed by these rules:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
Temporary files are created in the directory defined by
the
<a class="link" href="server-system-variables.html#sysvar_tmpdir">
<code class="literal">
tmpdir
</code>
</a>
variable.
</p>
</li>
<li class="listitem">
<p>
Temporary files are deleted immediately after they are
created and opened, and therefore do not remain visible in
the
<a class="link" href="server-system-variables.html#sysvar_tmpdir">
<code class="literal">
tmpdir
</code>
</a>
directory. The
space occupied by temporary files is held by the operating
system while temporary files are open. The space is
reclaimed when temporary files are closed by the
<code class="literal">
TempTable
</code>
storage engine, or when the
<code class="literal">
mysqld
</code>
process is shut down.
</p>
</li>
<li class="listitem">
<p>
Data is never moved between RAM and temporary files,
within RAM, or between temporary files.
</p>
</li>
<li class="listitem">
<p>
New data is stored in RAM if space becomes available
within the limit defined by
<a class="link" href="server-system-variables.html#sysvar_temptable_max_ram">
<code class="literal">
temptable_max_ram
</code>
</a>
.
Otherwise, new data is stored in temporary files.
</p>
</li>
<li class="listitem">
<p>
If space becomes available in RAM after some of the data
for a table is written to temporary files, it is possible
for the remaining table data to be stored in RAM.
</p>
</li>
</ul>
</div>
<p>
When using the
<code class="literal">
MEMORY
</code>
storage engine for
in-memory temporary tables
(
<a class="link" href="server-system-variables.html#sysvar_internal_tmp_mem_storage_engine">
<code class="literal">
internal_tmp_mem_storage_engine=MEMORY
</code>
</a>
),
MySQL automatically converts an in-memory temporary table to
an on-disk table if it becomes too large. The maximum size of
an in-memory temporary table is defined by the
<a class="link" href="server-system-variables.html#sysvar_tmp_table_size">
<code class="literal">
tmp_table_size
</code>
</a>
or
<a class="link" href="server-system-variables.html#sysvar_max_heap_table_size">
<code class="literal">
max_heap_table_size
</code>
</a>
value,
whichever is smaller. This differs from
<code class="literal">
MEMORY
</code>
tables explicitly created with
<a class="link" href="create-table.html" title="15.1.20 CREATE TABLE Statement">
<code class="literal">
CREATE TABLE
</code>
</a>
. For such tables,
only the
<a class="link" href="server-system-variables.html#sysvar_max_heap_table_size">
<code class="literal">
max_heap_table_size
</code>
</a>
variable determines how large a table can grow, and there is
no conversion to on-disk format.
</p>
<h5>
<a name="internal-temporary-tables-engines-disk">
</a>
Storage Engine for On-Disk Internal Temporary Tables
</h5>
<p>
MySQL 8.4 uses only the
<a class="link" href="innodb-storage-engine.html" title="Chapter 17 The InnoDB Storage Engine">
<code class="literal">
InnoDB
</code>
</a>
storage engine for on-disk
internal temporary tables. (The
<a class="link" href="myisam-storage-engine.html" title="18.2 The MyISAM Storage Engine">
<code class="literal">
MYISAM
</code>
</a>
storage engine is no
longer supported for this purpose.)
</p>
<p>
<code class="literal">
InnoDB
</code>
on-disk internal temporary tables
are created in session temporary tablespaces that reside in
the data directory by default. For more information, see
<a class="xref" href="innodb-temporary-tablespace.html" title="17.6.3.5 Temporary Tablespaces">
Section 17.6.3.5, “Temporary Tablespaces”
</a>
.
</p>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title">
<a name="internal-temporary-tables-storage">
</a>
Internal Temporary Table Storage Format
</h4>
</div>
</div>
</div>
<p>
When in-memory internal temporary tables are managed by the
<code class="literal">
TempTable
</code>
storage engine, rows that include
<code class="literal">
VARCHAR
</code>
columns,
<code class="literal">
VARBINARY
</code>
columns, and other binary large
object type columns are represented in memory by an array of
cells, with each cell containing a
<code class="literal">
NULL
</code>
flag, the data length, and a data pointer. Column values are
placed in consecutive order after the array, in a single
region of memory, without padding. Each cell in the array uses
16 bytes of storage. The same storage format applies when the
<code class="literal">
TempTable
</code>
storage engine allocates space
from memory-mapped files.
</p>
<p>
When in-memory internal temporary tables are managed by the
<code class="literal">
MEMORY
</code>
storage engine, fixed-length row
format is used.
<code class="literal">
VARCHAR
</code>
and
<code class="literal">
VARBINARY
</code>
column values are padded to the
maximum column length, in effect storing them as
<code class="literal">
CHAR
</code>
and
<code class="literal">
BINARY
</code>
columns.
</p>
<p>
Internal temporary tables on disk are always managed by
<code class="literal">
InnoDB
</code>
.
</p>
<p>
When using the
<code class="literal">
MEMORY
</code>
storage engine,
statements can initially create an in-memory internal
temporary table and then convert it to an on-disk table if the
table becomes too large. In such cases, better performance
might be achieved by skipping the conversion and creating the
internal temporary table on disk to begin with. The
<a class="link" href="server-system-variables.html#sysvar_big_tables">
<code class="literal">
big_tables
</code>
</a>
variable can be
used to force disk storage of internal temporary tables.
</p>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title">
<a name="internal-temporary-tables-monitoring">
</a>
Monitoring Internal Temporary Table Creation
</h4>
</div>
</div>
</div>
<p>
When an internal temporary table is created in memory or on
disk, the server increments the
<a class="link" href="server-status-variables.html#statvar_Created_tmp_tables">
<code class="literal">
Created_tmp_tables
</code>
</a>
value.
When an internal temporary table is created on disk, the
server increments the
<a class="link" href="server-status-variables.html#statvar_Created_tmp_disk_tables">
<code class="literal">
Created_tmp_disk_tables
</code>
</a>
value. If too many internal temporary tables are created on
disk, consider adjusting the engine-specific limits described
in
<a class="xref" href="internal-temporary-tables.html#internal-temporary-tables-engines" title="Internal Temporary Table Storage Engine">
Internal Temporary Table Storage Engine
</a>
.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
Due to a known limitation,
<a class="link" href="server-status-variables.html#statvar_Created_tmp_disk_tables">
<code class="literal">
Created_tmp_disk_tables
</code>
</a>
does not count on-disk temporary tables created in
memory-mapped files. By default, the TempTable storage
engine overflow mechanism creates internal temporary tables
in memory-mapped files. See
<a class="xref" href="internal-temporary-tables.html#internal-temporary-tables-engines" title="Internal Temporary Table Storage Engine">
Internal Temporary Table Storage Engine
</a>
.
</p>
</div>
<p>
The
<code class="literal">
memory/temptable/physical_ram
</code>
and
<code class="literal">
memory/temptable/physical_disk
</code>
Performance
Schema instruments can be used to monitor
<code class="literal">
TempTable
</code>
space allocation from memory and
disk.
<code class="literal">
memory/temptable/physical_ram
</code>
reports
the amount of allocated RAM.
<code class="literal">
memory/temptable/physical_disk
</code>
reports the
amount of space allocated from disk when memory-mapped files
are used as the TempTable overflow mechanism. If the
<code class="literal">
physical_disk
</code>
instrument reports a value
other than 0 and memory-mapped files are used as the TempTable
overflow mechanism, a TempTable memory limit was reached at
some point. Data can be queried in Performance Schema memory
summary tables such as
<a class="link" href="performance-schema-memory-summary-tables.html" title="29.12.20.10 Memory Summary Tables">
<code class="literal">
memory_summary_global_by_event_name
</code>
</a>
.
See
<a class="xref" href="performance-schema-memory-summary-tables.html" title="29.12.20.10 Memory Summary Tables">
Section 29.12.20.10, “Memory Summary Tables”
</a>
.
</p>
</div>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/server-logs.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title">
<a name="server-logs">
</a>
7.4 MySQL Server Logs
</h2>
</div>
</div>
</div>
<div class="toc">
<dl class="toc">
<dt>
<span class="section">
<a href="log-destinations.html">
7.4.1 Selecting General Query Log and Slow Query Log Output Destinations
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="error-log.html">
7.4.2 The Error Log
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="query-log.html">
7.4.3 The General Query Log
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="binary-log.html">
7.4.4 The Binary Log
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="slow-query-log.html">
7.4.5 The Slow Query Log
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="log-file-maintenance.html">
7.4.6 Server Log Maintenance
</a>
</span>
</dt>
</dl>
</div>
<a class="indexterm" name="idm46045259450992">
</a>
<a class="indexterm" name="idm46045259449504">
</a>
<p>
MySQL Server has several logs that can help you find out what
activity is taking place.
</p>
<div class="informaltable">
<table summary="MySQL Server log types and the information written to each log.">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<thead>
<tr>
<th>
Log Type
</th>
<th>
Information Written to Log
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
Error log
</td>
<td>
Problems encountered starting, running, or stopping
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
</td>
</tr>
<tr>
<td>
General query log
</td>
<td>
Established client connections and statements received from clients
</td>
</tr>
<tr>
<td>
Binary log
</td>
<td>
Statements that change data (also used for replication)
</td>
</tr>
<tr>
<td>
Relay log
</td>
<td>
Data changes received from a replication source server
</td>
</tr>
<tr>
<td>
Slow query log
</td>
<td>
Queries that took more than
<a class="link" href="server-system-variables.html#sysvar_long_query_time">
<code class="literal">
long_query_time
</code>
</a>
seconds to
execute
</td>
</tr>
<tr>
<td>
DDL logs
</td>
<td>
Atomic DDL operations performed by DDL statements
</td>
</tr>
</tbody>
</table>
</div>
<p>
By default, no logs are enabled, except the error log on Windows.
For information about DDL log behavior, see
<a class="xref" href="atomic-ddl.html#atomic-ddl-view-logs" title="Viewing DDL Logs">
Viewing DDL Logs
</a>
. The following log-specific
sections provide information about the server options that enable
logging.
</p>
<a class="indexterm" name="idm46045259425232">
</a>
<p>
By default, the server writes files for all enabled logs in the data
directory. You can force the server to close and reopen the log
files (or in some cases switch to a new log file) by flushing the
logs. Log flushing occurs when you issue a
<a class="link" href="flush.html#flush-logs">
<code class="literal">
FLUSH LOGS
</code>
</a>
statement; execute
<a class="link" href="mysqladmin.html" title="6.5.2 mysqladmin — A MySQL Server Administration Program">
<span class="command">
<strong>
mysqladmin
</strong>
</span>
</a>
with a
<code class="literal">
flush-logs
</code>
or
<code class="literal">
refresh
</code>
argument; or execute
<a class="link" href="mysqldump.html" title="6.5.4 mysqldump — A Database Backup Program">
<span class="command">
<strong>
mysqldump
</strong>
</span>
</a>
with a
<a class="link" href="mysqldump.html#option_mysqldump_flush-logs">
<code class="option">
--flush-logs
</code>
</a>
option. See
<a class="xref" href="flush.html" title="15.7.8.3 FLUSH Statement">
Section 15.7.8.3, “FLUSH Statement”
</a>
,
<a class="xref" href="mysqladmin.html" title="6.5.2 mysqladmin — A MySQL Server Administration Program">
Section 6.5.2, “mysqladmin — A MySQL Server Administration Program”
</a>
, and
<a class="xref" href="mysqldump.html" title="6.5.4 mysqldump — A Database Backup Program">
Section 6.5.4, “mysqldump — A Database Backup Program”
</a>
. In addition, the binary log is flushed
when its size reaches the value of the
<a class="link" href="replication-options-binary-log.html#sysvar_max_binlog_size">
<code class="literal">
max_binlog_size
</code>
</a>
system variable.
</p>
<p>
You can control the general query and slow query logs during
runtime. You can enable or disable logging, or change the log file
name. You can tell the server to write general query and slow query
entries to log tables, log files, or both. For details, see
<a class="xref" href="log-destinations.html" title="7.4.1 Selecting General Query Log and Slow Query Log Output Destinations">
Section 7.4.1, “Selecting General Query Log and Slow Query Log Output Destinations”
</a>
,
<a class="xref" href="query-log.html" title="7.4.3 The General Query Log">
Section 7.4.3, “The General Query Log”
</a>
, and
<a class="xref" href="slow-query-log.html" title="7.4.5 The Slow Query Log">
Section 7.4.5, “The Slow Query Log”
</a>
.
</p>
<p>
The relay log is used only on replicas, to hold data changes from
the replication source server that must also be made on the replica.
For discussion of relay log contents and configuration, see
<a class="xref" href="replica-logs-relaylog.html" title="19.2.4.1 The Relay Log">
Section 19.2.4.1, “The Relay Log”
</a>
.
</p>
<p>
For information about log maintenance operations such as expiration
of old log files, see
<a class="xref" href="log-file-maintenance.html" title="7.4.6 Server Log Maintenance">
Section 7.4.6, “Server Log Maintenance”
</a>
.
</p>
<p>
For information about keeping logs secure, see
<a class="xref" href="password-logging.html" title="8.1.2.3 Passwords and Logging">
Section 8.1.2.3, “Passwords and Logging”
</a>
.
</p>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/index-preloading.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title">
<a name="index-preloading">
</a>
10.10.2.4 Index Preloading
</h4>
</div>
</div>
</div>
<p>
If there are enough blocks in a key cache to hold blocks of an
entire index, or at least the blocks corresponding to its
nonleaf nodes, it makes sense to preload the key cache with
index blocks before starting to use it. Preloading enables you
to put the table index blocks into a key cache buffer in the
most efficient way: by reading the index blocks from disk
sequentially.
</p>
<p>
Without preloading, the blocks are still placed into the key
cache as needed by queries. Although the blocks stay in the
cache, because there are enough buffers for all of them, they
are fetched from disk in random order, and not sequentially.
</p>
<p>
To preload an index into a cache, use the
<a class="link" href="load-index.html" title="15.7.8.5 LOAD INDEX INTO CACHE Statement">
<code class="literal">
LOAD INDEX INTO
CACHE
</code>
</a>
statement. For example, the following
statement preloads nodes (index blocks) of indexes of the
tables
<code class="literal">
t1
</code>
and
<code class="literal">
t2
</code>
:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa73021457"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">LOAD</span> <span class="token keyword">INDEX</span> <span class="token keyword">INTO</span> <span class="token keyword">CACHE</span> t1<span class="token punctuation">,</span> t2 <span class="token keyword">IGNORE</span> <span class="token keyword">LEAVES</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Table <span class="token punctuation">|</span> Op <span class="token punctuation">|</span> Msg_type <span class="token punctuation">|</span> Msg_text <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> test.t1 <span class="token punctuation">|</span> preload_keys <span class="token punctuation">|</span> status <span class="token punctuation">|</span> OK <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> test.t2 <span class="token punctuation">|</span> preload_keys <span class="token punctuation">|</span> status <span class="token punctuation">|</span> OK <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
<p>
The
<code class="literal">
IGNORE LEAVES
</code>
modifier causes only
blocks for the nonleaf nodes of the index to be preloaded.
Thus, the statement shown preloads all index blocks from
<code class="literal">
t1
</code>
, but only blocks for the nonleaf nodes
from
<code class="literal">
t2
</code>
.
</p>
<p>
If an index has been assigned to a key cache using a
<a class="link" href="cache-index.html" title="15.7.8.2 CACHE INDEX Statement">
<code class="literal">
CACHE INDEX
</code>
</a>
statement,
preloading places index blocks into that cache. Otherwise, the
index is loaded into the default key cache.
</p>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/drop-procedure.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a name="drop-procedure">
</a>
15.1.29 DROP PROCEDURE and DROP FUNCTION Statements
</h3>
</div>
</div>
</div>
<a class="indexterm" name="idm46045183404224">
</a>
<a class="indexterm" name="idm46045183403184">
</a>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa64271389"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">DROP</span> {<span class="token keyword">PROCEDURE</span> <span class="token operator">|</span> <span class="token keyword">FUNCTION</span>} <span class="token punctuation">[</span><span class="token keyword">IF</span> <span class="token keyword">EXISTS</span><span class="token punctuation">]</span> <em class="replaceable">sp_name</em></code></pre>
</div>
<p>
These statements are used to drop a stored routine (a stored
procedure or function). That is, the specified routine is removed
from the server. (
<code class="literal">
DROP FUNCTION
</code>
is also used to
drop loadable functions; see
<a class="xref" href="drop-function-loadable.html" title="15.7.4.2 DROP FUNCTION Statement for Loadable Functions">
Section 15.7.4.2, “DROP FUNCTION Statement for Loadable Functions”
</a>
.)
</p>
<p>
To drop a stored routine, you must have the
<a class="link" href="privileges-provided.html#priv_alter-routine">
<code class="literal">
ALTER ROUTINE
</code>
</a>
privilege for it. (If
the
<a class="link" href="server-system-variables.html#sysvar_automatic_sp_privileges">
<code class="literal">
automatic_sp_privileges
</code>
</a>
system variable is enabled, that privilege and
<a class="link" href="privileges-provided.html#priv_execute">
<code class="literal">
EXECUTE
</code>
</a>
are granted automatically
to the routine creator when the routine is created and dropped
from the creator when the routine is dropped. See
<a class="xref" href="stored-routines-privileges.html" title="27.2.2 Stored Routines and MySQL Privileges">
Section 27.2.2, “Stored Routines and MySQL Privileges”
</a>
.)
</p>
<p>
In addition, if the definer of the routine has the
<a class="link" href="privileges-provided.html#priv_system-user">
<code class="literal">
SYSTEM_USER
</code>
</a>
privilege, the user
dropping it must also have this privilege.
</p>
<p>
The
<code class="literal">
IF EXISTS
</code>
clause is a MySQL extension. It
prevents an error from occurring if the procedure or function does
not exist. A warning is produced that can be viewed with
<a class="link" href="show-warnings.html" title="15.7.7.42 SHOW WARNINGS Statement">
<code class="literal">
SHOW WARNINGS
</code>
</a>
.
</p>
<p>
<a class="link" href="drop-function.html" title="15.1.26 DROP FUNCTION Statement">
<code class="literal">
DROP FUNCTION
</code>
</a>
is also used to drop
loadable functions (see
<a class="xref" href="drop-function-loadable.html" title="15.7.4.2 DROP FUNCTION Statement for Loadable Functions">
Section 15.7.4.2, “DROP FUNCTION Statement for Loadable Functions”
</a>
).
</p>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/adding-collation-choosing-id.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a name="adding-collation-choosing-id">
</a>
12.14.2 Choosing a Collation ID
</h3>
</div>
</div>
</div>
<p>
Each collation must have a unique ID. To add a collation, you
must choose an ID value that is not currently used. MySQL
supports two-byte collation IDs. The range of IDs from 1024 to
2047 is reserved for user-defined collations.
</p>
<p>
The collation ID that you choose appears in these contexts:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
The
<code class="literal">
ID
</code>
column of the Information Schema
<a class="link" href="information-schema-collations-table.html" title="28.3.6 The INFORMATION_SCHEMA COLLATIONS Table">
<code class="literal">
COLLATIONS
</code>
</a>
table.
</p>
</li>
<li class="listitem">
<p>
The
<code class="literal">
Id
</code>
column of
<a class="link" href="show-collation.html" title="15.7.7.5 SHOW COLLATION Statement">
<code class="literal">
SHOW COLLATION
</code>
</a>
output.
</p>
</li>
<li class="listitem">
<p>
The
<code class="literal">
charsetnr
</code>
member of the
<code class="literal">
MYSQL_FIELD
</code>
C API data structure.
</p>
</li>
<li class="listitem">
<p>
The
<code class="literal">
number
</code>
member of the
<code class="literal">
MY_CHARSET_INFO
</code>
data structure returned
by the
<a class="ulink" href="/doc/c-api/8.4/en/mysql-get-character-set-info.html" target="_top">
<code class="literal">
mysql_get_character_set_info()
</code>
</a>
C API function.
</p>
</li>
</ul>
</div>
<p>
To determine the largest currently used ID, issue the following
statement:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa5019820"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> <span class="token function">MAX</span><span class="token punctuation">(</span>ID<span class="token punctuation">)</span> <span class="token keyword">FROM</span> INFORMATION_SCHEMA<span class="token punctuation">.</span>COLLATIONS<span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> MAX(ID) <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> 247 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
<p>
To display a list of all currently used IDs, issue this
statement:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa60520187"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> ID <span class="token keyword">FROM</span> INFORMATION_SCHEMA<span class="token punctuation">.</span>COLLATIONS <span class="token keyword">ORDER</span> <span class="token keyword">BY</span> ID<span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> ID <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> 1 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> 2 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> ... <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> 52 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> 53 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> 57 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> 58 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> ... <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> 98 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> 99 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> 128 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> 129 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> ... <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> 247 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Warning
</div>
<p>
Before upgrading, you should save the configuration files that
you change. If you upgrade in place, the process replaces the
modified files.
</p>
</div>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/import-table.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a name="import-table">
</a>
15.2.6 IMPORT TABLE Statement
</h3>
</div>
</div>
</div>
<a class="indexterm" name="idm46045182664576">
</a>
<a class="indexterm" name="idm46045182663504">
</a>
<a class="indexterm" name="idm46045182662464">
</a>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa60644089"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">IMPORT</span> <span class="token keyword">TABLE</span> <span class="token keyword">FROM</span> <em class="replaceable">sdi_file</em> <span class="token punctuation">[</span><span class="token punctuation">,</span> <em class="replaceable">sdi_file</em><span class="token punctuation">]</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span></code></pre>
</div>
<p>
The
<a class="link" href="import-table.html" title="15.2.6 IMPORT TABLE Statement">
<code class="literal">
IMPORT TABLE
</code>
</a>
statement imports
<code class="literal">
MyISAM
</code>
tables based on information contained in
<code class="filename">
.sdi
</code>
(serialized dictionary information)
metadata files.
<a class="link" href="import-table.html" title="15.2.6 IMPORT TABLE Statement">
<code class="literal">
IMPORT TABLE
</code>
</a>
requires the
<a class="link" href="privileges-provided.html#priv_file">
<code class="literal">
FILE
</code>
</a>
privilege to read
the
<code class="filename">
.sdi
</code>
and table content files, and the
<a class="link" href="privileges-provided.html#priv_create">
<code class="literal">
CREATE
</code>
</a>
privilege for the table to
be created.
</p>
<p>
Tables can be exported from one server using
<a class="link" href="mysqldump.html" title="6.5.4 mysqldump — A Database Backup Program">
<span class="command">
<strong>
mysqldump
</strong>
</span>
</a>
to write a file of SQL statements and
imported into another server using
<a class="link" href="mysql.html" title="6.5.1 mysql — The MySQL Command-Line Client">
<span class="command">
<strong>
mysql
</strong>
</span>
</a>
to
process the dump file.
<a class="link" href="import-table.html" title="15.2.6 IMPORT TABLE Statement">
<code class="literal">
IMPORT TABLE
</code>
</a>
provides a faster alternative using the
<span class="quote">
“
<span class="quote">
raw
</span>
”
</span>
table
files.
</p>
<p>
Prior to import, the files that provide the table content must be
placed in the appropriate schema directory for the import server,
and the
<code class="filename">
.sdi
</code>
file must be located in a
directory accessible to the server. For example, the
<code class="filename">
.sdi
</code>
file can be placed in the directory
named by the
<a class="link" href="server-system-variables.html#sysvar_secure_file_priv">
<code class="literal">
secure_file_priv
</code>
</a>
system variable, or (if
<a class="link" href="server-system-variables.html#sysvar_secure_file_priv">
<code class="literal">
secure_file_priv
</code>
</a>
is empty) in a
directory under the server data directory.
</p>
<p>
The following example describes how to export
<code class="literal">
MyISAM
</code>
tables named
<code class="literal">
employees
</code>
and
<code class="literal">
managers
</code>
from
the
<code class="literal">
hr
</code>
schema of one server and import them
into the
<code class="literal">
hr
</code>
schema of another server. The
example uses these assumptions (to perform a similar operation on
your own system, modify the path names as appropriate):
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
For the export server,
<em class="replaceable">
<code>
export_basedir
</code>
</em>
represents its base
directory, and its data directory is
<code class="filename">
<em class="replaceable">
<code>
export_basedir
</code>
</em>
/data
</code>
.
</p>
</li>
<li class="listitem">
<p>
For the import server,
<em class="replaceable">
<code>
import_basedir
</code>
</em>
represents its base
directory, and its data directory is
<code class="filename">
<em class="replaceable">
<code>
import_basedir
</code>
</em>
/data
</code>
.
</p>
</li>
<li class="listitem">
<p>
Table files are exported from the export server into the
<code class="filename">
/tmp/export
</code>
directory and this directory
is secure (not accessible to other users).
</p>
</li>
<li class="listitem">
<p>
The import server uses
<code class="filename">
/tmp/mysql-files
</code>
as the directory named by its
<a class="link" href="server-system-variables.html#sysvar_secure_file_priv">
<code class="literal">
secure_file_priv
</code>
</a>
system
variable.
</p>
</li>
</ul>
</div>
<p>
To export tables from the export server, use this procedure:
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1">
<li class="listitem">
<p>
Ensure a consistent snapshot by executing this statement to
lock the tables so that they cannot be modified during export:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa94764866"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">FLUSH</span> <span class="token keyword">TABLES</span> hr<span class="token punctuation">.</span>employees<span class="token punctuation">,</span> hr<span class="token punctuation">.</span>managers <span class="token keyword">WITH</span> <span class="token keyword">READ</span> <span class="token keyword">LOCK</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
While the lock is in effect, the tables can still be used, but
only for read access.
</p>
</li>
<li class="listitem">
<p>
At the file system level, copy the
<code class="filename">
.sdi
</code>
and table content files from the
<code class="literal">
hr
</code>
schema
directory to the secure export directory:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
The
<code class="literal">
.sdi
</code>
file is located in the
<code class="literal">
hr
</code>
schema directory, but might not have
exactly the same basename as the table name. For example,
the
<code class="filename">
.sdi
</code>
files for the
<code class="literal">
employees
</code>
and
<code class="literal">
managers
</code>
tables might be named
<code class="filename">
employees_125.sdi
</code>
and
<code class="filename">
managers_238.sdi
</code>
.
</p>
</li>
<li class="listitem">
<p>
For a
<code class="literal">
MyISAM
</code>
table, the content files
are its
<code class="filename">
.MYD
</code>
data file and
<code class="filename">
.MYI
</code>
index file.
</p>
</li>
</ul>
</div>
<p>
Given those file names, the copy commands look like this:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-terminal"><div class="docs-select-all right" id="sa37222222"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal"><span class="token prompt">$> </span><span class="token command">cd</span> <em class="replaceable">export_basedir</em>/data/hr
<span class="token prompt">$> </span><span class="token command">cp</span> employees_125<span class="token punctuation">.</span>sdi /tmp/export
<span class="token prompt">$> </span><span class="token command">cp</span> managers_238<span class="token punctuation">.</span>sdi /tmp/export
<span class="token prompt">$> </span><span class="token command">cp</span> employees<span class="token punctuation">.</span><span class="token punctuation">{</span>MYD<span class="token punctuation">,</span>MYI<span class="token punctuation">}</span> /tmp/export
<span class="token prompt">$> </span><span class="token command">cp</span> managers<span class="token punctuation">.</span><span class="token punctuation">{</span>MYD<span class="token punctuation">,</span>MYI<span class="token punctuation">}</span> /tmp/export</code></pre>
</div>
</li>
<li class="listitem">
<p>
Unlock the tables:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa27656817"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">UNLOCK</span> <span class="token keyword">TABLES</span><span class="token punctuation">;</span></code></pre>
</div>
</li>
</ol>
</div>
<p>
To import tables into the import server, use this procedure:
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1">
<li class="listitem">
<p>
The import schema must exist. If necessary, execute this
statement to create it:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa7289220"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">CREATE</span> <span class="token keyword">SCHEMA</span> hr<span class="token punctuation">;</span></code></pre>
</div>
</li>
<li class="listitem">
<p>
At the file system level, copy the
<code class="filename">
.sdi
</code>
files to the import server
<a class="link" href="server-system-variables.html#sysvar_secure_file_priv">
<code class="literal">
secure_file_priv
</code>
</a>
directory,
<code class="filename">
/tmp/mysql-files
</code>
. Also, copy the table
content files to the
<code class="literal">
hr
</code>
schema directory:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-terminal"><div class="docs-select-all right" id="sa46325102"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal"><span class="token prompt">$> </span><span class="token command">cd</span> /tmp/export
<span class="token prompt">$> </span><span class="token command">cp</span> employees_125<span class="token punctuation">.</span>sdi /tmp/mysql-files
<span class="token prompt">$> </span><span class="token command">cp</span> managers_238<span class="token punctuation">.</span>sdi /tmp/mysql-files
<span class="token prompt">$> </span><span class="token command">cp</span> employees<span class="token punctuation">.</span><span class="token punctuation">{</span>MYD<span class="token punctuation">,</span>MYI<span class="token punctuation">}</span> <em class="replaceable">import_basedir</em>/data/hr
<span class="token prompt">$> </span><span class="token command">cp</span> managers<span class="token punctuation">.</span><span class="token punctuation">{</span>MYD<span class="token punctuation">,</span>MYI<span class="token punctuation">}</span> <em class="replaceable">import_basedir</em>/data/hr</code></pre>
</div>
</li>
<li class="listitem">
<p>
Import the tables by executing an
<a class="link" href="import-table.html" title="15.2.6 IMPORT TABLE Statement">
<code class="literal">
IMPORT
TABLE
</code>
</a>
statement that names the
<code class="filename">
.sdi
</code>
files:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa90053315"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">IMPORT</span> <span class="token keyword">TABLE</span> <span class="token keyword">FROM</span>
<span class="token string">'/tmp/mysql-files/employees.sdi'</span><span class="token punctuation">,</span>
<span class="token string">'/tmp/mysql-files/managers.sdi'</span><span class="token punctuation">;</span></code></pre>
</div>
</li>
</ol>
</div>
<p>
The
<code class="filename">
.sdi
</code>
file need not be placed in the
import server directory named by the
<a class="link" href="server-system-variables.html#sysvar_secure_file_priv">
<code class="literal">
secure_file_priv
</code>
</a>
system variable
if that variable is empty; it can be in any directory accessible
to the server, including the schema directory for the imported
table. If the
<code class="filename">
.sdi
</code>
file is placed in that
directory, however, it may be rewritten; the import operation
creates a new
<code class="filename">
.sdi
</code>
file for the table, which
overwrites the old
<code class="filename">
.sdi
</code>
file if the operation
uses the same file name for the new file.
</p>
<p>
Each
<em class="replaceable">
<code>
sdi_file
</code>
</em>
value must be a string
literal that names the
<code class="filename">
.sdi
</code>
file for a table
or is a pattern that matches
<code class="filename">
.sdi
</code>
files. If
the string is a pattern, any leading directory path and the
<code class="filename">
.sdi
</code>
file name suffix must be given
literally. Pattern characters are permitted only in the base name
part of the file name:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<code class="literal">
?
</code>
matches any single character
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
*
</code>
matches any sequence of characters,
including no characters
</p>
</li>
</ul>
</div>
<p>
Using a pattern, the previous
<a class="link" href="import-table.html" title="15.2.6 IMPORT TABLE Statement">
<code class="literal">
IMPORT
TABLE
</code>
</a>
statement could have been written like this
(assuming that the
<code class="filename">
/tmp/mysql-files
</code>
directory
contains no other
<code class="filename">
.sdi
</code>
files matching the
pattern):
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa89745063"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">IMPORT</span> <span class="token keyword">TABLE</span> <span class="token keyword">FROM</span> <span class="token string">'/tmp/mysql-files/*.sdi'</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
To interpret the location of
<code class="filename">
.sdi
</code>
file path
names, the server uses the same rules for
<a class="link" href="import-table.html" title="15.2.6 IMPORT TABLE Statement">
<code class="literal">
IMPORT TABLE
</code>
</a>
as the server-side
rules for
<a class="link" href="load-data.html" title="15.2.9 LOAD DATA Statement">
<code class="literal">
LOAD DATA
</code>
</a>
(that is, the
non-
<code class="literal">
LOCAL
</code>
rules). See
<a class="xref" href="load-data.html" title="15.2.9 LOAD DATA Statement">
Section 15.2.9, “LOAD DATA Statement”
</a>
, paying particular attention to the
rules used to interpret relative path names.
</p>
<p>
<a class="link" href="import-table.html" title="15.2.6 IMPORT TABLE Statement">
<code class="literal">
IMPORT TABLE
</code>
</a>
fails if the
<code class="literal">
.sdi
</code>
or table files cannot be located. After
importing a table, the server attempts to open it and reports as
warnings any problems detected. To attempt a repair to correct any
reported issues, use
<a class="link" href="repair-table.html" title="15.7.3.5 REPAIR TABLE Statement">
<code class="literal">
REPAIR TABLE
</code>
</a>
.
</p>
<p>
<a class="link" href="import-table.html" title="15.2.6 IMPORT TABLE Statement">
<code class="literal">
IMPORT TABLE
</code>
</a>
is not written to the
binary log.
</p>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title">
<a name="import-table-restrictions">
</a>
Restrictions and Limitations
</h4>
</div>
</div>
</div>
<p>
<a class="link" href="import-table.html" title="15.2.6 IMPORT TABLE Statement">
<code class="literal">
IMPORT TABLE
</code>
</a>
applies only to
non-
<code class="literal">
TEMPORARY
</code>
<code class="literal">
MyISAM
</code>
tables. It does not apply to tables created with a transactional
storage engine, tables created with
<a class="link" href="create-table.html" title="15.1.20 CREATE TABLE Statement">
<code class="literal">
CREATE TEMPORARY
TABLE
</code>
</a>
, or views.
</p>
<p>
An
<code class="filename">
.sdi
</code>
file used in an import operation
must be generated on a server with the same data dictionary
version and sdi version as the import server. The version
information of the generating server is found in the
<code class="filename">
.sdi
</code>
file:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-json"><div class="docs-select-all right" id="sa90261876"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-json"><span class="token punctuation">{</span>
<span class="token property">"mysqld_version_id"</span><span class="token operator">:</span><span class="token number">80019</span><span class="token punctuation">,</span>
<span class="token property">"dd_version"</span><span class="token operator">:</span><span class="token number">80017</span><span class="token punctuation">,</span>
<span class="token property">"sdi_version"</span><span class="token operator">:</span><span class="token number">80016</span><span class="token punctuation">,</span>
...
<span class="token punctuation">}</span></code></pre>
</div>
<p>
To determine the data dictionary and sdi version of the import
server, you can check the
<code class="filename">
.sdi
</code>
file of a
recently created table on the import server.
</p>
<p>
The table data and index files must be placed in the schema
directory for the import server prior to the import operation,
unless the table as defined on the export server uses the
<code class="literal">
DATA DIRECTORY
</code>
or
<code class="literal">
INDEX
DIRECTORY
</code>
table options. In that case, modify the
import procedure using one of these alternatives before
executing the
<a class="link" href="import-table.html" title="15.2.6 IMPORT TABLE Statement">
<code class="literal">
IMPORT TABLE
</code>
</a>
statement:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
Put the data and index files into the same directory on the
import server host as on the export server host, and create
symlinks in the import server schema directory to those
files.
</p>
</li>
<li class="listitem">
<p>
Put the data and index files into an import server host
directory different from that on the export server host, and
create symlinks in the import server schema directory to
those files. In addition, modify the
<code class="filename">
.sdi
</code>
file to reflect the different file
locations.
</p>
</li>
<li class="listitem">
<p>
Put the data and index files into the schema directory on
the import server host, and modify the
<code class="filename">
.sdi
</code>
file to remove the data and index
directory table options.
</p>
</li>
</ul>
</div>
<p>
Any collation IDs stored in the
<code class="filename">
.sdi
</code>
file
must refer to the same collations on the export and import
servers.
</p>
<p>
Trigger information for a table is not serialized into the table
<code class="filename">
.sdi
</code>
file, so triggers are not restored by
the import operation.
</p>
<p>
Some edits to an
<code class="filename">
.sdi
</code>
file are permissible
prior to executing the
<a class="link" href="import-table.html" title="15.2.6 IMPORT TABLE Statement">
<code class="literal">
IMPORT
TABLE
</code>
</a>
statement, whereas others are problematic or may
even cause the import operation to fail:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
Changing the data directory and index directory table
options is required if the locations of the data and index
files differ between the export and import servers.
</p>
</li>
<li class="listitem">
<p>
Changing the schema name is required to import the table
into a different schema on the import server than on the
export server.
</p>
</li>
<li class="listitem">
<p>
Changing schema and table names may be required to
accommodate differences between file system case-sensitivity
semantics on the export and import servers or differences in
<a class="link" href="server-system-variables.html#sysvar_lower_case_table_names">
<code class="literal">
lower_case_table_names
</code>
</a>
settings. Changing the table names in the
<code class="filename">
.sdi
</code>
file may require renaming the
table files as well.
</p>
</li>
<li class="listitem">
<p>
In some cases, changes to column definitions are permitted.
Changing data types is likely to cause problems.
</p>
</li>
</ul>
</div>
</div>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/information-schema-role-table-grants-table.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a name="information-schema-role-table-grants-table">
</a>
28.3.29 The INFORMATION_SCHEMA ROLE_TABLE_GRANTS Table
</h3>
</div>
</div>
</div>
<a class="indexterm" name="idm46045078919696">
</a>
<p>
The
<a class="link" href="information-schema-role-table-grants-table.html" title="28.3.29 The INFORMATION_SCHEMA ROLE_TABLE_GRANTS Table">
<code class="literal">
ROLE_TABLE_GRANTS
</code>
</a>
table provides
information about the table privileges for roles that are
available to or granted by the currently enabled roles.
</p>
<p>
The
<a class="link" href="information-schema-role-table-grants-table.html" title="28.3.29 The INFORMATION_SCHEMA ROLE_TABLE_GRANTS Table">
<code class="literal">
ROLE_TABLE_GRANTS
</code>
</a>
table has these
columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<code class="literal">
GRANTOR
</code>
</p>
<p>
The user name part of the account that granted the role.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
GRANTOR_HOST
</code>
</p>
<p>
The host name part of the account that granted the role.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
GRANTEE
</code>
</p>
<p>
The user name part of the account to which the role is
granted.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
GRANTEE_HOST
</code>
</p>
<p>
The host name part of the account to which the role is
granted.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
TABLE_CATALOG
</code>
</p>
<p>
The name of the catalog to which the role applies. This value
is always
<code class="literal">
def
</code>
.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
TABLE_SCHEMA
</code>
</p>
<p>
The name of the schema (database) to which the role applies.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
TABLE_NAME
</code>
</p>
<p>
The name of the table to which the role applies.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
PRIVILEGE_TYPE
</code>
</p>
<p>
The privilege granted. The value can be any privilege that can
be granted at the table level; see
<a class="xref" href="grant.html" title="15.7.1.6 GRANT Statement">
Section 15.7.1.6, “GRANT Statement”
</a>
.
Each row lists a single privilege, so there is one row per
column privilege held by the grantee.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
IS_GRANTABLE
</code>
</p>
<p>
<code class="literal">
YES
</code>
or
<code class="literal">
NO
</code>
, depending on
whether the role is grantable to other accounts.
</p>
</li>
</ul>
</div>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/optimizing-innodb-diskio.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a name="optimizing-innodb-diskio">
</a>
10.5.8 Optimizing InnoDB Disk I/O
</h3>
</div>
</div>
</div>
<a class="indexterm" name="idm46045226026784">
</a>
<a class="indexterm" name="idm46045226025296">
</a>
<a class="indexterm" name="idm46045226024224">
</a>
<a class="indexterm" name="idm46045226023152">
</a>
<p>
If you follow best practices for database design and tuning
techniques for SQL operations, but your database is still slow
due to heavy disk I/O activity, consider these disk I/O
optimizations. If the Unix
<code class="filename">
top
</code>
tool or the
Windows Task Manager shows that the CPU usage percentage with
your workload is less than 70%, your workload is probably
disk-bound.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
Increase buffer pool size
</p>
<p>
When table data is cached in the
<code class="literal">
InnoDB
</code>
buffer pool, it can be accessed repeatedly by queries
without requiring any disk I/O. Specify the size of the
buffer pool with the
<a class="link" href="innodb-parameters.html#sysvar_innodb_buffer_pool_size">
<code class="literal">
innodb_buffer_pool_size
</code>
</a>
option. This memory area is important enough that it is
typically recommended that
<a class="link" href="innodb-parameters.html#sysvar_innodb_buffer_pool_size">
<code class="literal">
innodb_buffer_pool_size
</code>
</a>
is
configured to 50 to 75 percent of system memory. For more
information see,
<a class="xref" href="memory-use.html" title="10.12.3.1 How MySQL Uses Memory">
Section 10.12.3.1, “How MySQL Uses Memory”
</a>
.
</p>
</li>
<li class="listitem">
<p>
Adjust the flush method
</p>
<p>
In some versions of GNU/Linux and Unix, flushing files to
disk with the Unix
<code class="literal">
fsync()
</code>
call and
similar methods is surprisingly slow. If database write
performance is an issue, conduct benchmarks with the
<a class="link" href="innodb-parameters.html#sysvar_innodb_flush_method">
<code class="literal">
innodb_flush_method
</code>
</a>
parameter set to
<code class="literal">
O_DSYNC
</code>
.
</p>
</li>
<li class="listitem">
<p>
Configure a threshold for operating system flushes
</p>
<p>
By default, when
<code class="literal">
InnoDB
</code>
creates a new
data file, such as a new log file or tablespace file, the
file is fully written to the operating system cache before
it is flushed to disk, which can cause a large amount of
disk write activity to occur at once. To force smaller,
periodic flushes of data from the operating system cache,
you can use the
<a class="link" href="innodb-parameters.html#sysvar_innodb_fsync_threshold">
<code class="literal">
innodb_fsync_threshold
</code>
</a>
variable to define a threshold value, in bytes. When the
byte threshold is reached, the contents of the operating
system cache are flushed to disk. The default value of 0
forces the default behavior, which is to flush data to disk
only after a file is fully written to the cache.
</p>
<p>
Specifying a threshold to force smaller, periodic flushes
may be beneficial in cases where multiple MySQL instances
use the same storage devices. For example, creating a new
MySQL instance and its associated data files could cause
large surges of disk write activity, impeding the
performance of other MySQL instances that use the same
storage devices. Configuring a threshold helps avoid such
surges in write activity.
</p>
</li>
<li class="listitem">
<p>
Use fdatasync() instead of fsync()
</p>
<p>
On platforms that support
<code class="literal">
fdatasync()
</code>
system calls, the
<a class="link" href="innodb-parameters.html#sysvar_innodb_use_fdatasync">
<code class="literal">
innodb_use_fdatasync
</code>
</a>
variable permits using
<code class="literal">
fdatasync()
</code>
instead of
<code class="literal">
fsync()
</code>
for operating system
flushes. An
<code class="literal">
fdatasync()
</code>
system call does
not flush changes to file metadata unless required for
subsequent data retrieval, providing a potential performance
benefit.
</p>
<p>
A subset of
<a class="link" href="innodb-parameters.html#sysvar_innodb_flush_method">
<code class="literal">
innodb_flush_method
</code>
</a>
settings such as
<code class="literal">
fsync
</code>
,
<code class="literal">
O_DSYNC
</code>
, and
<code class="literal">
O_DIRECT
</code>
use
<code class="literal">
fsync()
</code>
system calls. The
<a class="link" href="innodb-parameters.html#sysvar_innodb_use_fdatasync">
<code class="literal">
innodb_use_fdatasync
</code>
</a>
variable is applicable when using those settings.
</p>
</li>
<li class="listitem">
<p>
Use a noop or deadline I/O scheduler with native AIO on
Linux
</p>
<p>
<code class="literal">
InnoDB
</code>
uses the asynchronous I/O
subsystem (native AIO) on Linux to perform read-ahead and
write requests for data file pages. This behavior is
controlled by the
<a class="link" href="innodb-parameters.html#sysvar_innodb_use_native_aio">
<code class="literal">
innodb_use_native_aio
</code>
</a>
configuration option, which is enabled by default. With
native AIO, the type of I/O scheduler has greater influence
on I/O performance. Generally, noop and deadline I/O
schedulers are recommended. Conduct benchmarks to determine
which I/O scheduler provides the best results for your
workload and environment. For more information, see
<a class="xref" href="innodb-linux-native-aio.html" title="17.8.6 Using Asynchronous I/O on Linux">
Section 17.8.6, “Using Asynchronous I/O on Linux”
</a>
.
</p>
</li>
<li class="listitem">
<p>
Use direct I/O on Solaris 10 for x86_64 architecture
</p>
<p>
When using the
<code class="literal">
InnoDB
</code>
storage engine on
Solaris 10 for x86_64 architecture (AMD Opteron), use direct
I/O for
<code class="literal">
InnoDB
</code>
-related files to avoid
degradation of
<code class="literal">
InnoDB
</code>
performance. To use
direct I/O for an entire UFS file system used for storing
<code class="literal">
InnoDB
</code>
-related files, mount it with the
<code class="literal">
forcedirectio
</code>
option; see
<code class="literal">
mount_ufs(1M)
</code>
. (The default on Solaris
10/x86_64 is
<span class="emphasis">
<em>
not
</em>
</span>
to use this option.)
To apply direct I/O only to
<code class="literal">
InnoDB
</code>
file
operations rather than the whole file system, set
<a class="link" href="innodb-parameters.html#sysvar_innodb_flush_method">
<code class="literal">
innodb_flush_method =
O_DIRECT
</code>
</a>
. With this setting,
<code class="literal">
InnoDB
</code>
calls
<code class="literal">
directio()
</code>
instead of
<code class="literal">
fcntl()
</code>
for I/O to data files (not for
I/O to log files).
</p>
</li>
<li class="listitem">
<p>
Use raw storage for data and log files with Solaris 2.6 or
later
</p>
<p>
When using the
<code class="literal">
InnoDB
</code>
storage engine with
a large
<a class="link" href="innodb-parameters.html#sysvar_innodb_buffer_pool_size">
<code class="literal">
innodb_buffer_pool_size
</code>
</a>
value on any release of Solaris 2.6 and up and any platform
(sparc/x86/x64/amd64), conduct benchmarks with
<code class="literal">
InnoDB
</code>
data files and log files on raw
devices or on a separate direct I/O UFS file system, using
the
<code class="literal">
forcedirectio
</code>
mount option as
described previously. (It is necessary to use the mount
option rather than setting
<a class="link" href="innodb-parameters.html#sysvar_innodb_flush_method">
<code class="literal">
innodb_flush_method
</code>
</a>
if you
want direct I/O for the log files.) Users of the Veritas
file system VxFS should use the
<code class="literal">
convosync=direct
</code>
mount option.
</p>
<p>
Do not place other MySQL data files, such as those for
<code class="literal">
MyISAM
</code>
tables, on a direct I/O file
system. Executables or libraries
<span class="emphasis">
<em>
must
not
</em>
</span>
be placed on a direct I/O file system.
</p>
</li>
<li class="listitem">
<p>
Use additional storage devices
</p>
<p>
Additional storage devices could be used to set up a RAID
configuration. For related information, see
<a class="xref" href="disk-issues.html" title="10.12.1 Optimizing Disk I/O">
Section 10.12.1, “Optimizing Disk I/O”
</a>
.
</p>
<p>
Alternatively,
<code class="literal">
InnoDB
</code>
tablespace data
files and log files can be placed on different physical
disks. For more information, refer to the following
sections:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
<a class="xref" href="innodb-init-startup-configuration.html" title="17.8.1 InnoDB Startup Configuration">
Section 17.8.1, “InnoDB Startup Configuration”
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="xref" href="innodb-create-table-external.html" title="17.6.1.2 Creating Tables Externally">
Section 17.6.1.2, “Creating Tables Externally”
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="xref" href="general-tablespaces.html#general-tablespaces-creating" title="Creating a General Tablespace">
Creating a General Tablespace
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="xref" href="innodb-migration.html" title="17.6.1.4 Moving or Copying InnoDB Tables">
Section 17.6.1.4, “Moving or Copying InnoDB Tables”
</a>
</p>
</li>
</ul>
</div>
</li>
<li class="listitem">
<p>
Consider non-rotational storage
</p>
<p>
Non-rotational storage generally provides better performance
for random I/O operations; and rotational storage for
sequential I/O operations. When distributing data and log
files across rotational and non-rotational storage devices,
consider the type of I/O operations that are predominantly
performed on each file.
</p>
<p>
Random I/O-oriented files typically include
<a class="link" href="glossary.html#glos_file_per_table" title="file-per-table">
file-per-table
</a>
and
<a class="link" href="glossary.html#glos_general_tablespace" title="general tablespace">
general
tablespace
</a>
data files,
<a class="link" href="glossary.html#glos_undo_tablespace" title="undo tablespace">
undo tablespace
</a>
files, and
<a class="link" href="glossary.html#glos_temporary_tablespace" title="temporary tablespace">
temporary
tablespace
</a>
files. Sequential I/O-oriented files
include
<code class="literal">
InnoDB
</code>
<a class="link" href="glossary.html#glos_system_tablespace" title="system tablespace">
system
tablespace
</a>
files, doublewrite files, and log files
such as
<a class="link" href="glossary.html#glos_binary_log" title="binary log">
binary log
</a>
files and
<a class="link" href="glossary.html#glos_redo_log" title="redo log">
redo log
</a>
files.
</p>
<p>
Review settings for the following configuration options when
using non-rotational storage:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
<a class="link" href="innodb-parameters.html#sysvar_innodb_checksum_algorithm">
<code class="literal">
innodb_checksum_algorithm
</code>
</a>
</p>
<p>
The
<code class="literal">
crc32
</code>
option uses a faster
checksum algorithm and is recommended for fast storage
systems.
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="innodb-parameters.html#sysvar_innodb_flush_neighbors">
<code class="literal">
innodb_flush_neighbors
</code>
</a>
</p>
<p>
Optimizes I/O for rotational storage devices. Disable it
for non-rotational storage or a mix of rotational and
non-rotational storage. It is disabled by default.
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="innodb-parameters.html#sysvar_innodb_idle_flush_pct">
<code class="literal">
innodb_idle_flush_pct
</code>
</a>
</p>
<p>
Permits placing a limit on page flushing during idle
periods, which can help extend the life of
non-rotational storage devices.
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="innodb-parameters.html#sysvar_innodb_io_capacity">
<code class="literal">
innodb_io_capacity
</code>
</a>
</p>
<p>
The default setting of 10000 is generally sufficient.
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="innodb-parameters.html#sysvar_innodb_io_capacity_max">
<code class="literal">
innodb_io_capacity_max
</code>
</a>
</p>
<p>
The default value of (2 *
<a class="link" href="innodb-parameters.html#sysvar_innodb_io_capacity">
<code class="literal">
innodb_io_capacity
</code>
</a>
) is
intended for most workloads.
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="innodb-parameters.html#sysvar_innodb_log_compressed_pages">
<code class="literal">
innodb_log_compressed_pages
</code>
</a>
</p>
<p>
If redo logs are on non-rotational storage, consider
disabling this option to reduce logging. See
<a class="link" href="optimizing-innodb-diskio.html#innodb-disable-log-compressed-pages">
Disable
logging of compressed pages
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="innodb-parameters.html#sysvar_innodb_log_file_size">
<code class="literal">
innodb_log_file_size
</code>
</a>
(deprecated)
</p>
<p>
If redo logs are on non-rotational storage, configure
this option to maximize caching and write combining.
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="innodb-parameters.html#sysvar_innodb_redo_log_capacity">
<code class="literal">
innodb_redo_log_capacity
</code>
</a>
</p>
<p>
If redo logs are on non-rotational storage, configure
this option to maximize caching and write combining.
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="innodb-parameters.html#sysvar_innodb_page_size">
<code class="literal">
innodb_page_size
</code>
</a>
</p>
<p>
Consider using a page size that matches the internal
sector size of the disk. Early-generation SSD devices
often have a 4KB sector size. Some newer devices have a
16KB sector size. The default
<code class="literal">
InnoDB
</code>
page size is 16KB. Keeping the page size close to the
storage device block size minimizes the amount of
unchanged data that is rewritten to disk.
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="replication-options-binary-log.html#sysvar_binlog_row_image">
<code class="literal">
binlog_row_image
</code>
</a>
</p>
<p>
If binary logs are on non-rotational storage and all
tables have primary keys, consider setting this option
to
<code class="literal">
minimal
</code>
to reduce logging.
</p>
</li>
</ul>
</div>
<p>
Ensure that TRIM support is enabled for your operating
system. It is typically enabled by default.
</p>
</li>
<li class="listitem">
<p>
Increase I/O capacity to avoid backlogs
</p>
<p>
If throughput drops periodically because of
<code class="literal">
InnoDB
</code>
<a class="link" href="glossary.html#glos_checkpoint" title="checkpoint">
checkpoint
</a>
operations, consider increasing the value of the
<a class="link" href="innodb-parameters.html#sysvar_innodb_io_capacity">
<code class="literal">
innodb_io_capacity
</code>
</a>
configuration option. Higher values cause more frequent
<a class="link" href="glossary.html#glos_flush" title="flush">
flushing
</a>
, avoiding the
backlog of work that can cause dips in throughput.
</p>
</li>
<li class="listitem">
<p>
Lower I/O capacity if flushing does not fall behind
</p>
<p>
If the system is not falling behind with
<code class="literal">
InnoDB
</code>
<a class="link" href="glossary.html#glos_flush" title="flush">
flushing
</a>
operations,
consider lowering the value of the
<a class="link" href="innodb-parameters.html#sysvar_innodb_io_capacity">
<code class="literal">
innodb_io_capacity
</code>
</a>
configuration option. Typically, you keep this option value
as low as practical, but not so low that it causes periodic
drops in throughput as mentioned in the preceding bullet. In
a typical scenario where you could lower the option value,
you might see a combination like this in the output from
<a class="link" href="show-engine.html" title="15.7.7.16 SHOW ENGINE Statement">
<code class="literal">
SHOW ENGINE
INNODB STATUS
</code>
</a>
:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
History list length low, below a few thousand.
</p>
</li>
<li class="listitem">
<p>
Insert buffer merges close to rows inserted.
</p>
</li>
<li class="listitem">
<p>
Modified pages in buffer pool consistently well below
<a class="link" href="innodb-parameters.html#sysvar_innodb_max_dirty_pages_pct">
<code class="literal">
innodb_max_dirty_pages_pct
</code>
</a>
of the buffer pool. (Measure at a time when the server
is not doing bulk inserts; it is normal during bulk
inserts for the modified pages percentage to rise
significantly.)
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
Log sequence number - Last checkpoint
</code>
is at less than 7/8 or ideally less than 6/8 of the
total size of the
<code class="literal">
InnoDB
</code>
<a class="link" href="glossary.html#glos_log_file" title="log file">
log files
</a>
.
</p>
</li>
</ul>
</div>
</li>
<li class="listitem">
<p>
Store system tablespace files on Fusion-io devices
</p>
<p>
You can take advantage of a doublewrite buffer-related I/O
optimization by storing the files that contain the
doublewrite storage area on Fusion-io devices that support
atomic writes. (The doublewrite buffer storage area resides
in doublewrite files. See
<a class="xref" href="innodb-doublewrite-buffer.html" title="17.6.4 Doublewrite Buffer">
Section 17.6.4, “Doublewrite Buffer”
</a>
.) When
doublewrite storage area files are placed on Fusion-io
devices that support atomic writes, the doublewrite buffer
is automatically disabled and Fusion-io atomic writes are
used for all data files. This feature is only supported on
Fusion-io hardware and is only enabled for Fusion-io NVMFS
on Linux. To take full advantage of this feature, an
<a class="link" href="innodb-parameters.html#sysvar_innodb_flush_method">
<code class="literal">
innodb_flush_method
</code>
</a>
setting
of
<code class="literal">
O_DIRECT
</code>
is recommended.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
Because the doublewrite buffer setting is global, the
doublewrite buffer is also disabled for data files that do
not reside on Fusion-io hardware.
</p>
</div>
</li>
<li class="listitem">
<p>
<a name="innodb-disable-log-compressed-pages">
</a>
Disable logging of compressed pages
</p>
<p>
When using the
<code class="literal">
InnoDB
</code>
table
<a class="link" href="glossary.html#glos_compression" title="compression">
compression
</a>
feature,
images of re-compressed
<a class="link" href="glossary.html#glos_page" title="page">
pages
</a>
are written to the
<a class="link" href="glossary.html#glos_redo_log" title="redo log">
redo log
</a>
when changes
are made to compressed data. This behavior is controlled by
<a class="link" href="innodb-parameters.html#sysvar_innodb_log_compressed_pages">
<code class="literal">
innodb_log_compressed_pages
</code>
</a>
,
which is enabled by default to prevent corruption that can
occur if a different version of the
<code class="literal">
zlib
</code>
compression algorithm is used during recovery. If you are
certain that the
<code class="literal">
zlib
</code>
version is not
subject to change, disable
<a class="link" href="innodb-parameters.html#sysvar_innodb_log_compressed_pages">
<code class="literal">
innodb_log_compressed_pages
</code>
</a>
to reduce redo log generation for workloads that modify
compressed data.
</p>
</li>
</ul>
</div>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/programs-client.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title">
<a name="programs-client">
</a>
6.5 Client Programs
</h2>
</div>
</div>
</div>
<div class="toc">
<dl class="toc">
<dt>
<span class="section">
<a href="mysql.html">
6.5.1 mysql — The MySQL Command-Line Client
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysqladmin.html">
6.5.2 mysqladmin — A MySQL Server Administration Program
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysqlcheck.html">
6.5.3 mysqlcheck — A Table Maintenance Program
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysqldump.html">
6.5.4 mysqldump — A Database Backup Program
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysqlimport.html">
6.5.5 mysqlimport — A Data Import Program
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysqlshow.html">
6.5.6 mysqlshow — Display Database, Table, and Column Information
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="mysqlslap.html">
6.5.7 mysqlslap — A Load Emulation Client
</a>
</span>
</dt>
</dl>
</div>
<p>
This section describes client programs that connect to the MySQL
server.
</p>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/performance-schema-clone-progress-table.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title">
<a name="performance-schema-clone-progress-table">
</a>
29.12.19.2 The clone_progress Table
</h4>
</div>
</div>
</div>
<a class="indexterm" name="idm46045069417264">
</a>
<a class="indexterm" name="idm46045069415776">
</a>
<p>
The
<code class="literal">
clone_progress
</code>
table shows progress
information for the current or last executed cloning operation
only.
</p>
<p>
The stages of a cloning operation include
<code class="literal">
DROP
DATA
</code>
,
<code class="literal">
FILE COPY
</code>
,
<code class="literal">
PAGE_COPY
</code>
,
<code class="literal">
REDO_COPY
</code>
,
<code class="literal">
FILE_SYNC
</code>
,
<code class="literal">
RESTART
</code>
, and
<code class="literal">
RECOVERY
</code>
. A cloning operation produces a
record for each stage. The table therefore only ever contains
seven rows of data, or is empty.
</p>
<p>
The
<code class="literal">
clone_progress
</code>
table has these columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<code class="literal">
ID
</code>
</p>
<p>
A unique cloning operation identifier in the current MySQL
server instance.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
STAGE
</code>
</p>
<p>
The name of the current cloning stage. Stages include
<code class="literal">
DROP DATA
</code>
,
<code class="literal">
FILE
COPY
</code>
,
<code class="literal">
PAGE_COPY
</code>
,
<code class="literal">
REDO_COPY
</code>
,
<code class="literal">
FILE_SYNC
</code>
,
<code class="literal">
RESTART
</code>
,
and
<code class="literal">
RECOVERY
</code>
.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
STATE
</code>
</p>
<p>
The current state of the cloning stage. States include
<code class="literal">
Not Started
</code>
,
<code class="literal">
In
Progress
</code>
, and
<code class="literal">
Completed
</code>
.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
BEGIN_TIME
</code>
</p>
<p>
A timestamp in
<code class="literal">
'
<em class="replaceable">
<code>
YYYY-MM-DD
hh:mm:ss
</code>
</em>
[.
<em class="replaceable">
<code>
fraction
</code>
</em>
]'
</code>
format that shows when the cloning stage started. Reports
NULL if the stage has not started.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
END_TIME
</code>
</p>
<p>
A timestamp in
<code class="literal">
'
<em class="replaceable">
<code>
YYYY-MM-DD
hh:mm:ss
</code>
</em>
[.
<em class="replaceable">
<code>
fraction
</code>
</em>
]'
</code>
format that shows when the cloning stage finished. Reports
NULL if the stage has not ended.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
THREADS
</code>
</p>
<p>
The number of concurrent threads used in the stage.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
ESTIMATE
</code>
</p>
<p>
The estimated amount of data for the current stage, in
bytes.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
DATA
</code>
</p>
<p>
The amount of data transferred in current state, in bytes.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
NETWORK
</code>
</p>
<p>
The amount of network data transferred in the current
state, in bytes.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
DATA_SPEED
</code>
</p>
<p>
The current actual speed of data transfer, in bytes per
second. This value may differ from the requested maximum
data transfer rate defined by
<a class="link" href="clone-plugin-options-variables.html#sysvar_clone_max_data_bandwidth">
<code class="literal">
clone_max_data_bandwidth
</code>
</a>
.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
NETWORK_SPEED
</code>
</p>
<p>
The current speed of network transfer in bytes per second.
</p>
</li>
</ul>
</div>
<p>
The
<code class="literal">
clone_progress
</code>
table is read-only. DDL,
including
<a class="link" href="truncate-table.html" title="15.1.37 TRUNCATE TABLE Statement">
<code class="literal">
TRUNCATE TABLE
</code>
</a>
, is
not permitted.
</p>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/sys-version-major.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title">
<a name="sys-version-major">
</a>
30.4.5.20 The version_major() Function
</h4>
</div>
</div>
</div>
<a class="indexterm" name="idm46045060655504">
</a>
<a class="indexterm" name="idm46045060654032">
</a>
<p>
This function returns the major version of the MySQL server.
</p>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h5 class="title">
<a name="sys-version-major-parameters">
</a>
Parameters
</h5>
</div>
</div>
</div>
<p>
None.
</p>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h5 class="title">
<a name="sys-version-major-return-value">
</a>
Return Value
</h5>
</div>
</div>
</div>
<p>
A
<code class="literal">
TINYINT UNSIGNED
</code>
value.
</p>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h5 class="title">
<a name="sys-version-major-example">
</a>
Example
</h5>
</div>
</div>
</div>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa12222345"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> <span class="token function">VERSION</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">,</span> sys<span class="token punctuation">.</span>version_major<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> VERSION() <span class="token punctuation">|</span> sys.version_major() <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> 8.4.0<span class="token punctuation">-</span>tr <span class="token punctuation">|</span> 8 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
</div>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/storage-engine-setting.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title">
<a name="storage-engine-setting">
</a>
18.1 Setting the Storage Engine
</h2>
</div>
</div>
</div>
<p>
When you create a new table, you can specify which storage engine
to use by adding an
<code class="literal">
ENGINE
</code>
table option to the
<a class="link" href="create-table.html" title="15.1.20 CREATE TABLE Statement">
<code class="literal">
CREATE TABLE
</code>
</a>
statement:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa42581440"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token comment" spellcheck="true">-- ENGINE=INNODB not needed unless you have set a different</span>
<span class="token comment" spellcheck="true">-- default storage engine.</span>
<span class="token keyword">CREATE</span> <span class="token keyword">TABLE</span> t1 <span class="token punctuation">(</span>i <span class="token datatype">INT</span><span class="token punctuation">)</span> <span class="token keyword">ENGINE</span> <span class="token operator">=</span> INNODB<span class="token punctuation">;</span>
<span class="token comment" spellcheck="true">-- Simple table definitions can be switched from one to another.</span>
<span class="token keyword">CREATE</span> <span class="token keyword">TABLE</span> t2 <span class="token punctuation">(</span>i <span class="token datatype">INT</span><span class="token punctuation">)</span> <span class="token keyword">ENGINE</span> <span class="token operator">=</span> CSV<span class="token punctuation">;</span>
<span class="token keyword">CREATE</span> <span class="token keyword">TABLE</span> t3 <span class="token punctuation">(</span>i <span class="token datatype">INT</span><span class="token punctuation">)</span> <span class="token keyword">ENGINE</span> <span class="token operator">=</span> <span class="token keyword">MEMORY</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
When you omit the
<code class="literal">
ENGINE
</code>
option, the default
storage engine is used. The default engine is
<a class="link" href="innodb-storage-engine.html" title="Chapter 17 The InnoDB Storage Engine">
<code class="literal">
InnoDB
</code>
</a>
in MySQL 8.4. You
can specify the default engine by using the
<a class="link" href="server-system-variables.html#sysvar_default_storage_engine">
<code class="literal">
--default-storage-engine
</code>
</a>
server
startup option, or by setting the
<a class="link" href="server-system-variables.html#sysvar_default_storage_engine">
<code class="literal">
default-storage-engine
</code>
</a>
option in
the
<code class="filename">
my.cnf
</code>
configuration file.
</p>
<p>
You can set the default storage engine for the current session by
setting the
<a class="link" href="server-system-variables.html#sysvar_default_storage_engine">
<code class="literal">
default_storage_engine
</code>
</a>
variable:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa1268972"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SET</span> default_storage_engine<span class="token operator">=</span><span class="token keyword">NDBCLUSTER</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
The storage engine for
<code class="literal">
TEMPORARY
</code>
tables created
with
<a class="link" href="create-table.html" title="15.1.20 CREATE TABLE Statement">
<code class="literal">
CREATE
TEMPORARY TABLE
</code>
</a>
can be set separately from the engine
for permanent tables by setting the
<a class="link" href="server-system-variables.html#sysvar_default_tmp_storage_engine">
<code class="literal">
default_tmp_storage_engine
</code>
</a>
,
either at startup or at runtime.
</p>
<p>
To convert a table from one storage engine to another, use an
<a class="link" href="alter-table.html" title="15.1.9 ALTER TABLE Statement">
<code class="literal">
ALTER TABLE
</code>
</a>
statement that
indicates the new engine:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa3874200"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">ALTER</span> <span class="token keyword">TABLE</span> t <span class="token keyword">ENGINE</span> <span class="token operator">=</span> InnoDB<span class="token punctuation">;</span></code></pre>
</div>
<p>
See
<a class="xref" href="create-table.html" title="15.1.20 CREATE TABLE Statement">
Section 15.1.20, “CREATE TABLE Statement”
</a>
, and
<a class="xref" href="alter-table.html" title="15.1.9 ALTER TABLE Statement">
Section 15.1.9, “ALTER TABLE Statement”
</a>
.
</p>
<p>
If you try to use a storage engine that is not compiled in or that
is compiled in but deactivated, MySQL instead creates a table
using the default storage engine. For example, in a replication
setup, perhaps your source server uses
<code class="literal">
InnoDB
</code>
tables for maximum safety, but the replica servers use other
storage engines for speed at the expense of durability or
concurrency.
</p>
<p>
By default, a warning is generated whenever
<a class="link" href="create-table.html" title="15.1.20 CREATE TABLE Statement">
<code class="literal">
CREATE TABLE
</code>
</a>
or
<a class="link" href="alter-table.html" title="15.1.9 ALTER TABLE Statement">
<code class="literal">
ALTER TABLE
</code>
</a>
cannot use the default
storage engine. To prevent confusing, unintended behavior if the
desired engine is unavailable, enable the
<a class="link" href="sql-mode.html#sqlmode_no_engine_substitution">
<code class="literal">
NO_ENGINE_SUBSTITUTION
</code>
</a>
SQL mode.
If the desired engine is unavailable, this setting produces an
error instead of a warning, and the table is not created or
altered. See
<a class="xref" href="sql-mode.html" title="7.1.11 Server SQL Modes">
Section 7.1.11, “Server SQL Modes”
</a>
.
</p>
<p>
MySQL may store a table's index and data in one or more other
files, depending on the storage engine. Table and column
definitions are stored in the MySQL data dictionary. Individual
storage engines create any additional files required for the
tables that they manage. If a table name contains special
characters, the names for the table files contain encoded versions
of those characters as described in
<a class="xref" href="identifier-mapping.html" title="11.2.4 Mapping of Identifiers to File Names">
Section 11.2.4, “Mapping of Identifiers to File Names”
</a>
.
</p>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/faqs-replication.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title">
<a name="faqs-replication">
</a>
A.14 MySQL 8.4 FAQ: Replication
</h2>
</div>
</div>
</div>
<a class="indexterm" name="idm46045055045008">
</a>
<p>
In the following section, we provide answers to questions that are
most frequently asked about MySQL Replication.
</p>
<div class="qandaset">
<a name="idm46045055043024">
</a>
<dl>
<dt>
A.14.1.
<a href="faqs-replication.html#faq-replication-have-connected-replica">
Must the replica be connected to the source all the time?
</a>
</dt>
<dt>
A.14.2.
<a href="faqs-replication.html#faq-replication-have-enable-networking">
Must I enable networking on my source and replica to enable
replication?
</a>
</dt>
<dt>
A.14.3.
<a href="faqs-replication.html#faq-replication-how-compare-replica-date">
How do I know how late a replica is compared to the source? In
other words, how do I know the date of the last statement
replicated by the replica?
</a>
</dt>
<dt>
A.14.4.
<a href="faqs-replication.html#faq-replication-how-block-updates">
How do I force the source to block updates until the replica
catches up?
</a>
</dt>
<dt>
A.14.5.
<a href="faqs-replication.html#faq-replication-how-two-way-problems">
What issues should I be aware of when setting up two-way
replication?
</a>
</dt>
<dt>
A.14.6.
<a href="faqs-replication.html#faq-replication-how-improves-performance">
How can I use replication to improve performance of my system?
</a>
</dt>
<dt>
A.14.7.
<a href="faqs-replication.html#faq-replication-how-prepare-for-replication">
What should I do to prepare client code in my own applications
to use performance-enhancing replication?
</a>
</dt>
<dt>
A.14.8.
<a href="faqs-replication.html#faq-replication-how-benefits-me">
When and how much can MySQL replication improve the performance
of my system?
</a>
</dt>
<dt>
A.14.9.
<a href="faqs-replication.html#faq-replication-how-high-availability">
How can I use replication to provide redundancy or high
availability?
</a>
</dt>
<dt>
A.14.10.
<a href="faqs-replication.html#faq-replication-how-know-log-format">
How do I tell whether a replication source server is using
statement-based or row-based binary logging format?
</a>
</dt>
<dt>
A.14.11.
<a href="faqs-replication.html#faq-replication-how-use-row-based">
How do I tell a replica to use row-based replication?
</a>
</dt>
<dt>
A.14.12.
<a href="faqs-replication.html#faq-replication-how-prevent-grant-revoke">
How do I prevent GRANT and
REVOKE statements from
replicating to replica machines?
</a>
</dt>
<dt>
A.14.13.
<a href="faqs-replication.html#faq-replication-can-mix-os">
Does replication work on mixed operating systems (for example,
the source runs on Linux while replicas run on macOS and
Windows)?
</a>
</dt>
<dt>
A.14.14.
<a href="faqs-replication.html#faq-replication-can-mix-arch">
Does replication work on mixed hardware architectures (for
example, the source runs on a 64-bit machine while replicas run
on 32-bit machines)?
</a>
</dt>
</dl>
<table border="0" style="width: 100%;">
<colgroup>
<col align="left" width="1%"/>
<col/>
</colgroup>
<tbody>
<tr class="question">
<td align="left" valign="top">
<a name="faq-replication-have-connected-replica">
</a>
<a name="idm46045055042208">
</a>
<p>
<b>
A.14.1.
</b>
</p>
</td>
<td align="left" valign="top">
<p>
Must the replica be connected to the source all the time?
</p>
</td>
</tr>
<tr class="answer">
<td align="left" valign="top">
</td>
<td align="left" valign="top">
<p>
No, it does not. The replica can go down or stay disconnected
for hours or even days, and then reconnect and catch up on
updates. For example, you can set up a source/replica
relationship over a dial-up link where the link is up only
sporadically and for short periods of time. The implication of
this is that, at any given time, the replica is not guaranteed
to be in synchrony with the source unless you take some special
measures.
</p>
<p>
To ensure that catchup can occur for a replica that has been
disconnected, you must not remove binary log files from the
source that contain information that has not yet been replicated
to the replicas. Asynchronous replication can work only if the
replica is able to continue reading the binary log from the
point where it last read events.
</p>
</td>
</tr>
<tr class="question">
<td align="left" valign="top">
<a name="faq-replication-have-enable-networking">
</a>
<a name="idm46045055038928">
</a>
<p>
<b>
A.14.2.
</b>
</p>
</td>
<td align="left" valign="top">
<p>
Must I enable networking on my source and replica to enable
replication?
</p>
</td>
</tr>
<tr class="answer">
<td align="left" valign="top">
</td>
<td align="left" valign="top">
<p>
Yes, networking must be enabled on the source and replica. If
networking is not enabled, the replica cannot connect to the
source and transfer the binary log. Verify that the
<a class="link" href="server-system-variables.html#sysvar_skip_networking">
<code class="literal">
skip_networking
</code>
</a>
system variable
has not been enabled in the configuration file for either
server.
</p>
</td>
</tr>
<tr class="question">
<td align="left" valign="top">
<a name="faq-replication-how-compare-replica-date">
</a>
<a name="idm46045055035360">
</a>
<p>
<b>
A.14.3.
</b>
</p>
</td>
<td align="left" valign="top">
<p>
How do I know how late a replica is compared to the source? In
other words, how do I know the date of the last statement
replicated by the replica?
</p>
</td>
</tr>
<tr class="answer">
<td align="left" valign="top">
</td>
<td align="left" valign="top">
<p>
Check the
<code class="literal">
Seconds_Behind_Master
</code>
column in the
output from
<a class="link" href="show-replica-status.html" title="15.7.7.35 SHOW REPLICA STATUS Statement">
<code class="literal">
SHOW
REPLICA | SLAVE STATUS
</code>
</a>
. See
<a class="xref" href="replication-administration-status.html" title="19.1.7.1 Checking Replication Status">
Section 19.1.7.1, “Checking Replication Status”
</a>
.
</p>
<p>
When the replication SQL thread executes an event read from the
source, it modifies its own time to the event timestamp. (This
is why
<a class="link" href="datetime.html" title="13.2.2 The DATE, DATETIME, and TIMESTAMP Types">
<code class="literal">
TIMESTAMP
</code>
</a>
is well
replicated.) In the
<code class="literal">
Time
</code>
column in the output
of
<a class="link" href="show-processlist.html" title="15.7.7.31 SHOW PROCESSLIST Statement">
<code class="literal">
SHOW PROCESSLIST
</code>
</a>
, the number
of seconds displayed for the replication SQL thread is the
number of seconds between the timestamp of the last replicated
event and the real time of the replica machine. You can use this
to determine the date of the last replicated event. Note that if
your replica has been disconnected from the source for one hour,
and then reconnects, you may immediately see large
<code class="literal">
Time
</code>
values such as 3600 for the replication
SQL thread in
<a class="link" href="show-processlist.html" title="15.7.7.31 SHOW PROCESSLIST Statement">
<code class="literal">
SHOW PROCESSLIST
</code>
</a>
.
This is because the replica is executing statements that are one
hour old. See
<a class="xref" href="replication-threads.html" title="19.2.3 Replication Threads">
Section 19.2.3, “Replication Threads”
</a>
.
</p>
</td>
</tr>
<tr class="question">
<td align="left" valign="top">
<a name="faq-replication-how-block-updates">
</a>
<a name="idm46045055023584">
</a>
<p>
<b>
A.14.4.
</b>
</p>
</td>
<td align="left" valign="top">
<p>
How do I force the source to block updates until the replica
catches up?
</p>
</td>
</tr>
<tr class="answer">
<td align="left" valign="top">
</td>
<td align="left" valign="top">
<p>
Use the following procedure:
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1">
<li class="listitem">
<p>
On the source, execute these statements:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa14692673"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">FLUSH</span> <span class="token keyword">TABLES</span> <span class="token keyword">WITH</span> <span class="token keyword">READ</span> <span class="token keyword">LOCK</span><span class="token punctuation">;</span>
<span class="token prompt">mysql></span> <span class="token keyword">SHOW</span> <span class="token keyword">MASTER</span> <span class="token keyword">STATUS</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
Record the replication coordinates (the current binary log
file name and position) from the output of the
<a class="link" href="show.html" title="15.7.7 SHOW Statements">
<code class="literal">
SHOW
</code>
</a>
statement.
</p>
</li>
<li class="listitem">
<p>
On the replica, issue the following statement, where the
arguments to the
<a class="link" href="replication-functions-synchronization.html#function_source-pos-wait">
<code class="literal">
SOURCE_POS_WAIT()
</code>
</a>
or
<a class="link" href="replication-functions-synchronization.html#function_master-pos-wait">
<code class="literal">
MASTER_POS_WAIT()
</code>
</a>
function
are the replication coordinate values obtained in the
previous step:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa40706899"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> <span class="token function">MASTER_POS_WAIT</span><span class="token punctuation">(</span><span class="token string">'<em class="replaceable">log_name</em>'</span><span class="token punctuation">,</span> <em class="replaceable">log_pos</em><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token operator">Or</span> <span class="token keyword">from</span> MySQL <span class="token number">8.0</span><span class="token punctuation">.</span><span class="token number">26</span>:
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> SOURCE_POS_WAIT<span class="token punctuation">(</span><span class="token string">'<em class="replaceable">log_name</em>'</span><span class="token punctuation">,</span> <em class="replaceable">log_pos</em><span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
The
<a class="link" href="select.html" title="15.2.13 SELECT Statement">
<code class="literal">
SELECT
</code>
</a>
statement blocks
until the replica reaches the specified log file and
position. At that point, the replica is in synchrony with
the source and the statement returns.
</p>
</li>
<li class="listitem">
<p>
On the source, issue the following statement to enable the
source to begin processing updates again:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa79255468"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">UNLOCK</span> <span class="token keyword">TABLES</span><span class="token punctuation">;</span></code></pre>
</div>
</li>
</ol>
</div>
</td>
</tr>
<tr class="question">
<td align="left" valign="top">
<a name="faq-replication-how-two-way-problems">
</a>
<a name="idm46045055003552">
</a>
<p>
<b>
A.14.5.
</b>
</p>
</td>
<td align="left" valign="top">
<p>
What issues should I be aware of when setting up two-way
replication?
</p>
</td>
</tr>
<tr class="answer">
<td align="left" valign="top">
</td>
<td align="left" valign="top">
<p>
MySQL replication currently does not support any locking
protocol between source and replica to guarantee the atomicity
of a distributed (cross-server) update. In other words, it is
possible for client A to make an update to co-source 1, and in
the meantime, before it propagates to co-source 2, client B
could make an update to co-source 2 that makes the update of
client A work differently than it did on co-source 1. Thus, when
the update of client A makes it to co-source 2, it produces
tables that are different from what you have on co-source 1,
even after all the updates from co-source 2 have also
propagated. This means that you should not chain two servers
together in a two-way replication relationship unless you are
sure that your updates can safely happen in any order, or unless
you take care of mis-ordered updates somehow in the client code.
</p>
<p>
You should also realize that two-way replication actually does
not improve performance very much (if at all) as far as updates
are concerned. Each server must do the same number of updates,
just as you would have a single server do. The only difference
is that there is a little less lock contention because the
updates originating on another server are serialized in one
replication thread. Even this benefit might be offset by network
delays.
</p>
</td>
</tr>
<tr class="question">
<td align="left" valign="top">
<a name="faq-replication-how-improves-performance">
</a>
<a name="idm46045054999040">
</a>
<p>
<b>
A.14.6.
</b>
</p>
</td>
<td align="left" valign="top">
<p>
How can I use replication to improve performance of my system?
</p>
</td>
</tr>
<tr class="answer">
<td align="left" valign="top">
</td>
<td align="left" valign="top">
<p>
Set up one server as the source and direct all writes to it.
Then configure as many replicas as you have the budget and
rackspace for, and distribute the reads among the source and the
replicas. You can also start the replicas with the
<a class="ulink" href="/doc/refman/8.0/en/innodb-parameters.html#option_mysqld_innodb" target="_top">
<code class="option">
--skip-innodb
</code>
</a>
option, enable the
<a class="link" href="server-system-variables.html#sysvar_low_priority_updates">
<code class="literal">
low_priority_updates
</code>
</a>
system
variable, and set the
<a class="link" href="server-system-variables.html#sysvar_delay_key_write">
<code class="literal">
delay_key_write
</code>
</a>
system variable
to
<code class="literal">
ALL
</code>
to get speed improvements on the
replica end. In this case, the replica uses nontransactional
<code class="literal">
MyISAM
</code>
tables instead of
<code class="literal">
InnoDB
</code>
tables to get more speed by
eliminating transactional overhead.
</p>
</td>
</tr>
<tr class="question">
<td align="left" valign="top">
<a name="faq-replication-how-prepare-for-replication">
</a>
<a name="idm46045054990928">
</a>
<p>
<b>
A.14.7.
</b>
</p>
</td>
<td align="left" valign="top">
<p>
What should I do to prepare client code in my own applications
to use performance-enhancing replication?
</p>
</td>
</tr>
<tr class="answer">
<td align="left" valign="top">
</td>
<td align="left" valign="top">
<p>
See the guide to using replication as a scale-out solution,
<a class="xref" href="replication-solutions-scaleout.html" title="19.4.5 Using Replication for Scale-Out">
Section 19.4.5, “Using Replication for Scale-Out”
</a>
.
</p>
</td>
</tr>
<tr class="question">
<td align="left" valign="top">
<a name="faq-replication-how-benefits-me">
</a>
<a name="idm46045054988080">
</a>
<p>
<b>
A.14.8.
</b>
</p>
</td>
<td align="left" valign="top">
<p>
When and how much can MySQL replication improve the performance
of my system?
</p>
</td>
</tr>
<tr class="answer">
<td align="left" valign="top">
</td>
<td align="left" valign="top">
<p>
MySQL replication is most beneficial for a system that processes
frequent reads and infrequent writes. In theory, by using a
single-source/multiple-replica setup, you can scale the system
by adding more replicas until you either run out of network
bandwidth, or your update load grows to the point that the
source cannot handle it.
</p>
<p>
To determine how many replicas you can use before the added
benefits begin to level out, and how much you can improve
performance of your site, you must know your query patterns, and
determine empirically by benchmarking the relationship between
the throughput for reads and writes on a typical source and a
typical replica. The example here shows a rather simplified
calculation of what you can get with replication for a
hypothetical system. Let
<code class="literal">
reads
</code>
and
<code class="literal">
writes
</code>
denote the number of reads and writes
per second, respectively.
</p>
<p>
Let's say that system load consists of 10% writes and 90% reads,
and we have determined by benchmarking that
<code class="literal">
reads
</code>
is 1200 - 2 *
<code class="literal">
writes
</code>
. In other words, the system can do
1,200 reads per second with no writes, the average write is
twice as slow as the average read, and the relationship is
linear. Suppose that the source and each replica have the same
capacity, and that we have one source and
<em class="replaceable">
<code>
N
</code>
</em>
replicas. Then we have for each
server (source or replica):
</p>
<p>
<code class="literal">
reads
</code>
= 1200 - 2 *
<code class="literal">
writes
</code>
</p>
<p>
<code class="literal">
reads
</code>
= 9 *
<code class="literal">
writes
</code>
/
(
<em class="replaceable">
<code>
N
</code>
</em>
+ 1) (reads are split, but writes
replicated to all replicas)
</p>
<p>
9 *
<code class="literal">
writes
</code>
/ (
<em class="replaceable">
<code>
N
</code>
</em>
+
1) + 2 *
<code class="literal">
writes
</code>
= 1200
</p>
<p>
<code class="literal">
writes
</code>
= 1200 / (2 +
9/(
<em class="replaceable">
<code>
N
</code>
</em>
+ 1))
</p>
<p>
The last equation indicates the maximum number of writes for
<em class="replaceable">
<code>
N
</code>
</em>
replicas, given a maximum possible
read rate of 1,200 per second and a ratio of nine reads per
write.
</p>
<p>
This analysis yields the following conclusions:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
If
<em class="replaceable">
<code>
N
</code>
</em>
= 0 (which means we have no
replication), our system can handle about 1200/11 = 109
writes per second.
</p>
</li>
<li class="listitem">
<p>
If
<em class="replaceable">
<code>
N
</code>
</em>
= 1, we get up to 184 writes
per second.
</p>
</li>
<li class="listitem">
<p>
If
<em class="replaceable">
<code>
N
</code>
</em>
= 8, we get up to 400 writes
per second.
</p>
</li>
<li class="listitem">
<p>
If
<em class="replaceable">
<code>
N
</code>
</em>
= 17, we get up to 480
writes per second.
</p>
</li>
<li class="listitem">
<p>
Eventually, as
<em class="replaceable">
<code>
N
</code>
</em>
approaches
infinity (and our budget negative infinity), we can get very
close to 600 writes per second, increasing system throughput
about 5.5 times. However, with only eight servers, we
increase it nearly four times.
</p>
</li>
</ul>
</div>
<p>
These computations assume infinite network bandwidth and neglect
several other factors that could be significant on your system.
In many cases, you may not be able to perform a computation
similar to the one just shown that accurately predicts what
happens on your system if you add
<em class="replaceable">
<code>
N
</code>
</em>
replicas. However, answering the following questions should help
you decide whether and by how much replication may improve the
performance of your system:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
What is the read/write ratio on your system?
</p>
</li>
<li class="listitem">
<p>
How much more write load can one server handle if you reduce
the reads?
</p>
</li>
<li class="listitem">
<p>
For how many replicas do you have bandwidth available on
your network?
</p>
</li>
</ul>
</div>
</td>
</tr>
<tr class="question">
<td align="left" valign="top">
<a name="faq-replication-how-high-availability">
</a>
<a name="idm46045054959776">
</a>
<p>
<b>
A.14.9.
</b>
</p>
</td>
<td align="left" valign="top">
<p>
How can I use replication to provide redundancy or high
availability?
</p>
</td>
</tr>
<tr class="answer">
<td align="left" valign="top">
</td>
<td align="left" valign="top">
<p>
How you implement redundancy is entirely dependent on your
application and circumstances. High-availability solutions (with
automatic failover) require active monitoring and either custom
scripts or third party tools to provide the failover support
from the original MySQL server to the replica.
</p>
<p>
To handle the process manually, you should be able to switch
from a failed source to a pre-configured replica by altering
your application to talk to the new server or by adjusting the
DNS for the MySQL server from the failed server to the new
server.
</p>
<p>
For more information and some example solutions, see
<a class="xref" href="replication-solutions-switch.html" title="19.4.8 Switching Sources During Failover">
Section 19.4.8, “Switching Sources During Failover”
</a>
.
</p>
</td>
</tr>
<tr class="question">
<td align="left" valign="top">
<a name="faq-replication-how-know-log-format">
</a>
<a name="idm46045054955520">
</a>
<p>
<b>
A.14.10.
</b>
</p>
</td>
<td align="left" valign="top">
<p>
How do I tell whether a replication source server is using
statement-based or row-based binary logging format?
</p>
</td>
</tr>
<tr class="answer">
<td align="left" valign="top">
</td>
<td align="left" valign="top">
<p>
Check the value of the
<a class="link" href="replication-options-binary-log.html#sysvar_binlog_format">
<code class="literal">
binlog_format
</code>
</a>
system variable:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa66007210"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SHOW</span> <span class="token keyword">VARIABLES</span> <span class="token operator">LIKE</span> <span class="token string">'binlog_format'</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
The value shown is always one of
<code class="literal">
STATEMENT
</code>
,
<code class="literal">
ROW
</code>
, or
<code class="literal">
MIXED
</code>
. For
<code class="literal">
MIXED
</code>
mode, statement-based logging is used
by default but replication switches automatically to row-based
logging under certain conditions, such as unsafe statements. For
information about when this may occur, see
<a class="xref" href="binary-log-mixed.html" title="7.4.4.3 Mixed Binary Logging Format">
Section 7.4.4.3, “Mixed Binary Logging Format”
</a>
.
</p>
</td>
</tr>
<tr class="question">
<td align="left" valign="top">
<a name="faq-replication-how-use-row-based">
</a>
<a name="idm46045054946384">
</a>
<p>
<b>
A.14.11.
</b>
</p>
</td>
<td align="left" valign="top">
<p>
How do I tell a replica to use row-based replication?
</p>
</td>
</tr>
<tr class="answer">
<td align="left" valign="top">
</td>
<td align="left" valign="top">
<p>
Replicas automatically know which format to use.
</p>
</td>
</tr>
<tr class="question">
<td align="left" valign="top">
<a name="faq-replication-how-prevent-grant-revoke">
</a>
<a name="idm46045054944256">
</a>
<p>
<b>
A.14.12.
</b>
</p>
</td>
<td align="left" valign="top">
<p>
How do I prevent
<a class="link" href="grant.html" title="15.7.1.6 GRANT Statement">
<code class="literal">
GRANT
</code>
</a>
and
<a class="link" href="revoke.html" title="15.7.1.8 REVOKE Statement">
<code class="literal">
REVOKE
</code>
</a>
statements from
replicating to replica machines?
</p>
</td>
</tr>
<tr class="answer">
<td align="left" valign="top">
</td>
<td align="left" valign="top">
<p>
Start the server with the
<a class="link" href="replication-options-replica.html#option_mysqld_replicate-wild-ignore-table">
<code class="option">
--replicate-wild-ignore-table=mysql.%
</code>
</a>
option to ignore replication for tables in the
<code class="literal">
mysql
</code>
database.
</p>
</td>
</tr>
<tr class="question">
<td align="left" valign="top">
<a name="faq-replication-can-mix-os">
</a>
<a name="idm46045054937984">
</a>
<p>
<b>
A.14.13.
</b>
</p>
</td>
<td align="left" valign="top">
<p>
Does replication work on mixed operating systems (for example,
the source runs on Linux while replicas run on macOS and
Windows)?
</p>
</td>
</tr>
<tr class="answer">
<td align="left" valign="top">
</td>
<td align="left" valign="top">
<p>
Yes.
</p>
</td>
</tr>
<tr class="question">
<td align="left" valign="top">
<a name="faq-replication-can-mix-arch">
</a>
<a name="idm46045054935856">
</a>
<p>
<b>
A.14.14.
</b>
</p>
</td>
<td align="left" valign="top">
<p>
Does replication work on mixed hardware architectures (for
example, the source runs on a 64-bit machine while replicas run
on 32-bit machines)?
</p>
</td>
</tr>
<tr class="answer">
<td align="left" valign="top">
</td>
<td align="left" valign="top">
<p>
Yes.
</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/innodb-information-schema-innodb_cmpmem.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title">
<a name="innodb-information-schema-innodb_cmpmem">
</a>
17.15.1.2 INNODB_CMPMEM and INNODB_CMPMEM_RESET
</h4>
</div>
</div>
</div>
<a class="indexterm" name="idm46045151387904">
</a>
<a class="indexterm" name="idm46045151386512">
</a>
<a class="indexterm" name="idm46045151385120">
</a>
<p>
The
<a class="link" href="information-schema-innodb-cmpmem-table.html" title="28.4.7 The INFORMATION_SCHEMA INNODB_CMPMEM and INNODB_CMPMEM_RESET Tables">
<code class="literal">
INNODB_CMPMEM
</code>
</a>
and
<a class="link" href="information-schema-innodb-cmpmem-table.html" title="28.4.7 The INFORMATION_SCHEMA INNODB_CMPMEM and INNODB_CMPMEM_RESET Tables">
<code class="literal">
INNODB_CMPMEM_RESET
</code>
</a>
tables provide
status information about compressed pages that reside in the
buffer pool. Please consult
<a class="xref" href="innodb-compression.html" title="17.9 InnoDB Table and Page Compression">
Section 17.9, “InnoDB Table and Page Compression”
</a>
for further information on compressed tables and the use of the
buffer pool. The
<a class="link" href="information-schema-innodb-cmp-table.html" title="28.4.6 The INFORMATION_SCHEMA INNODB_CMP and INNODB_CMP_RESET Tables">
<code class="literal">
INNODB_CMP
</code>
</a>
and
<a class="link" href="information-schema-innodb-cmp-table.html" title="28.4.6 The INFORMATION_SCHEMA INNODB_CMP and INNODB_CMP_RESET Tables">
<code class="literal">
INNODB_CMP_RESET
</code>
</a>
tables should
provide more useful statistics on compression.
</p>
<h5>
<a name="idm46045151378912">
</a>
Internal Details
</h5>
<p>
<code class="literal">
InnoDB
</code>
uses a
<a class="link" href="glossary.html#glos_buddy_allocator" title="buddy allocator">
buddy allocator
</a>
system to manage memory allocated to
<a class="link" href="glossary.html#glos_page_size" title="page size">
pages of various sizes
</a>
,
from 1KB to 16KB. Each row of the two tables described here
corresponds to a single page size.
</p>
<p>
The
<a class="link" href="information-schema-innodb-cmpmem-table.html" title="28.4.7 The INFORMATION_SCHEMA INNODB_CMPMEM and INNODB_CMPMEM_RESET Tables">
<code class="literal">
INNODB_CMPMEM
</code>
</a>
and
<a class="link" href="information-schema-innodb-cmpmem-table.html" title="28.4.7 The INFORMATION_SCHEMA INNODB_CMPMEM and INNODB_CMPMEM_RESET Tables">
<code class="literal">
INNODB_CMPMEM_RESET
</code>
</a>
tables have
identical contents, but reading from
<a class="link" href="information-schema-innodb-cmpmem-table.html" title="28.4.7 The INFORMATION_SCHEMA INNODB_CMPMEM and INNODB_CMPMEM_RESET Tables">
<code class="literal">
INNODB_CMPMEM_RESET
</code>
</a>
resets the
statistics on relocation operations. For example, if every 60
minutes you archived the output of
<a class="link" href="information-schema-innodb-cmpmem-table.html" title="28.4.7 The INFORMATION_SCHEMA INNODB_CMPMEM and INNODB_CMPMEM_RESET Tables">
<code class="literal">
INNODB_CMPMEM_RESET
</code>
</a>
, it would show
the hourly statistics. If you never read
<a class="link" href="information-schema-innodb-cmpmem-table.html" title="28.4.7 The INFORMATION_SCHEMA INNODB_CMPMEM and INNODB_CMPMEM_RESET Tables">
<code class="literal">
INNODB_CMPMEM_RESET
</code>
</a>
and monitored
the output of
<a class="link" href="information-schema-innodb-cmpmem-table.html" title="28.4.7 The INFORMATION_SCHEMA INNODB_CMPMEM and INNODB_CMPMEM_RESET Tables">
<code class="literal">
INNODB_CMPMEM
</code>
</a>
instead, it would show the cumulative statistics since
<code class="literal">
InnoDB
</code>
was started.
</p>
<p>
For the table definition, see
<a class="xref" href="information-schema-innodb-cmpmem-table.html" title="28.4.7 The INFORMATION_SCHEMA INNODB_CMPMEM and INNODB_CMPMEM_RESET Tables">
Section 28.4.7, “The INFORMATION_SCHEMA INNODB_CMPMEM and INNODB_CMPMEM_RESET Tables”
</a>
.
</p>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/data-dictionary-schema.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title">
<a name="data-dictionary-schema">
</a>
16.1 Data Dictionary Schema
</h2>
</div>
</div>
</div>
<a class="indexterm" name="idm46045167802432">
</a>
<p>
Data dictionary tables are protected and may only be accessed in
debug builds of MySQL. However, MySQL supports access to data
stored in data dictionary tables through
<a class="link" href="information-schema.html" title="Chapter 28 INFORMATION_SCHEMA Tables">
<code class="literal">
INFORMATION_SCHEMA
</code>
</a>
tables and
<a class="link" href="show.html" title="15.7.7 SHOW Statements">
<code class="literal">
SHOW
</code>
</a>
statements. For an overview of
the tables that comprise the data dictionary, see
<a class="xref" href="system-schema.html#system-schema-data-dictionary-tables" title="Data Dictionary Tables">
Data Dictionary Tables
</a>
.
</p>
<p>
MySQL system tables still exist in MySQL 8.4 and can
be viewed by issuing a
<a class="link" href="show-tables.html" title="15.7.7.39 SHOW TABLES Statement">
<code class="literal">
SHOW TABLES
</code>
</a>
statement on the
<code class="literal">
mysql
</code>
system database.
Generally, the difference between MySQL data dictionary tables and
system tables is that data dictionary tables contain metadata
required to execute SQL queries, whereas system tables contain
auxiliary data such as time zone and help information. MySQL
system tables and data dictionary tables also differ in how they
are upgraded. The MySQL server manages data dictionary upgrades.
See
<a class="xref" href="data-dictionary-schema.html#data-dictionary-upgrade" title="How the Data Dictionary is Upgraded">
How the Data Dictionary is Upgraded
</a>
. Upgrading MySQL
system tables requires running the full MySQL upgrade procedure.
See
<a class="xref" href="upgrading-what-is-upgraded.html" title="3.4 What the MySQL Upgrade Process Upgrades">
Section 3.4, “What the MySQL Upgrade Process Upgrades”
</a>
.
</p>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h3 class="title">
<a name="data-dictionary-upgrade">
</a>
How the Data Dictionary is Upgraded
</h3>
</div>
</div>
</div>
<p>
New versions of MySQL may include changes to data dictionary
table definitions. Such changes are present in newly installed
versions of MySQL, but when performing an in-place upgrade of
MySQL binaries, changes are applied when the MySQL server is
restarted using the new binaries. At startup, the data
dictionary version of the server is compared to the version
information stored in the data dictionary to determine if data
dictionary tables should be upgraded. If an upgrade is necessary
and supported, the server creates data dictionary tables with
updated definitions, copies persisted metadata to the new
tables, atomically replaces the old tables with the new ones,
and reinitializes the data dictionary. If an upgrade is not
necessary, startup continues without updating the data
dictionary tables.
</p>
<p>
Upgrade of data dictionary tables is an atomic operation, which
means that all of the data dictionary tables are upgraded as
necessary or the operation fails. If the upgrade operation
fails, server startup fails with an error. In this case, the old
server binaries can be used with the old data directory to start
the server. When the new server binaries are used again to start
the server, the data dictionary upgrade is reattempted.
</p>
<p>
Generally, after data dictionary tables are successfully
upgraded, it is not possible to restart the server using the old
server binaries. As a result, downgrading MySQL server binaries
to a previous MySQL version is not supported after data
dictionary tables are upgraded.
</p>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h3 class="title">
<a name="viewing-data-dictionary-tables">
</a>
Viewing Data Dictionary Tables Using a Debug Build of MySQL
</h3>
</div>
</div>
</div>
<p>
Data dictionary tables are protected by default but can be
accessed by compiling MySQL with debugging support (using the
<a class="link" href="source-configuration-options.html#option_cmake_with_debug">
<code class="option">
-DWITH_DEBUG=1
</code>
</a>
<span class="command">
<strong>
CMake
</strong>
</span>
option) and specifying the
<code class="literal">
+d,skip_dd_table_access_check
</code>
<a class="link" href="server-options.html#option_mysqld_debug">
<code class="option">
debug
</code>
</a>
option and modifier. For
information about compiling debug builds, see
<a class="xref" href="compiling-for-debugging.html" title="7.9.1.1 Compiling MySQL for Debugging">
Section 7.9.1.1, “Compiling MySQL for Debugging”
</a>
.
</p>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Warning
</div>
<p>
Modifying or writing to data dictionary tables directly is not
recommended and may render your MySQL instance inoperable.
</p>
</div>
<p>
After compiling MySQL with debugging support, use this
<a class="link" href="set.html" title="13.3.6 The SET Type">
<code class="literal">
SET
</code>
</a>
statement to make data
dictionary tables visible to the
<a class="link" href="mysql.html" title="6.5.1 mysql — The MySQL Command-Line Client">
<span class="command">
<strong>
mysql
</strong>
</span>
</a>
client
session:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa40740751"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SET</span> <span class="token keyword">SESSION</span> debug<span class="token operator">=</span><span class="token string">'+d,skip_dd_table_access_check'</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
Use this query to retrieve a list of data dictionary tables:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa20269483"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> <span class="token keyword">name</span><span class="token punctuation">,</span> schema_id<span class="token punctuation">,</span> hidden<span class="token punctuation">,</span> <span class="token keyword">type</span> <span class="token keyword">FROM</span> mysql<span class="token punctuation">.</span><span class="token keyword">tables</span> <span class="token keyword">where</span> schema_id<span class="token operator">=</span><span class="token number">1</span> <span class="token operator">AND</span> hidden<span class="token operator">=</span><span class="token string">'System'</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
Use
<a class="link" href="show-create-table.html" title="15.7.7.11 SHOW CREATE TABLE Statement">
<code class="literal">
SHOW CREATE TABLE
</code>
</a>
to view
data dictionary table definitions. For example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa92260262"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SHOW</span> <span class="token keyword">CREATE</span> <span class="token keyword">TABLE</span> mysql<span class="token punctuation">.</span>catalogs\G</code></pre>
</div>
</div>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/windows-pluggable-authentication.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title">
<a name="windows-pluggable-authentication">
</a>
8.4.1.6 Windows Pluggable Authentication
</h4>
</div>
</div>
</div>
<a class="indexterm" name="idm46045245574624">
</a>
<a class="indexterm" name="idm46045245573520">
</a>
<a class="indexterm" name="idm46045245572032">
</a>
<a class="indexterm" name="idm46045245570928">
</a>
<a class="indexterm" name="idm46045245569424">
</a>
<a class="indexterm" name="idm46045245567920">
</a>
<a class="indexterm" name="idm46045245566416">
</a>
<a class="indexterm" name="idm46045245565328">
</a>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
Windows pluggable authentication is an extension included in
MySQL Enterprise Edition, a commercial product. To learn more about commercial
products, see
<a class="ulink" href="https://www.mysql.com/products/" target="_blank">
https://www.mysql.com/products/
</a>
.
</p>
</div>
<p>
MySQL Enterprise Edition for Windows supports an authentication method that
performs external authentication on Windows, enabling MySQL
Server to use native Windows services to authenticate client
connections. Users who have logged in to Windows can connect
from MySQL client programs to the server based on the
information in their environment without specifying an
additional password.
</p>
<p>
The client and server exchange data packets in the
authentication handshake. As a result of this exchange, the
server creates a security context object that represents the
identity of the client in the Windows OS. This identity includes
the name of the client account. Windows pluggable authentication
uses the identity of the client to check whether it is a given
account or a member of a group. By default, negotiation uses
Kerberos to authenticate, then NTLM if Kerberos is unavailable.
</p>
<p>
Windows pluggable authentication provides these capabilities:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
External authentication: Windows authentication enables
MySQL Server to accept connections from users defined
outside the MySQL grant tables who have logged in to
Windows.
</p>
</li>
<li class="listitem">
<p>
Proxy user support: Windows authentication can return to
MySQL a user name different from the external user name
passed by the client program. This means that the plugin can
return the MySQL user that defines the privileges the
external Windows-authenticated user should have. For
example, a Windows user named
<code class="literal">
joe
</code>
can
connect and have the privileges of a MySQL user named
<code class="literal">
developer
</code>
.
</p>
</li>
</ul>
</div>
<p>
The following table shows the plugin and library file names. The
file must be located in the directory named by the
<a class="link" href="server-system-variables.html#sysvar_plugin_dir">
<code class="literal">
plugin_dir
</code>
</a>
system variable.
</p>
<div class="table">
<a name="idm46045245553776">
</a>
<p class="title">
<b>
Table 8.19 Plugin and Library Names for Windows Authentication
</b>
</p>
<div class="table-contents">
<table summary="Names for the plugins and library file used for Windows password authentication.">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<thead>
<tr>
<th>
Plugin or File
</th>
<th>
Plugin or File Name
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
Server-side plugin
</td>
<td>
<code class="literal">
authentication_windows
</code>
</td>
</tr>
<tr>
<td>
Client-side plugin
</td>
<td>
<code class="literal">
authentication_windows_client
</code>
</td>
</tr>
<tr>
<td>
Library file
</td>
<td>
<code class="filename">
authentication_windows.dll
</code>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<br class="table-break"/>
<p>
The library file includes only the server-side plugin. The
client-side plugin is built into the
<code class="literal">
libmysqlclient
</code>
client library.
</p>
<p>
The server-side Windows authentication plugin is included only
in MySQL Enterprise Edition. It is not included in MySQL community distributions.
The client-side plugin is included in all distributions,
including community distributions. This enables clients from any
distribution to connect to a server that has the server-side
plugin loaded.
</p>
<p>
The following sections provide installation and usage
information specific to Windows pluggable authentication:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<a class="xref" href="windows-pluggable-authentication.html#windows-pluggable-authentication-installation" title="Installing Windows Pluggable Authentication">
Installing Windows Pluggable Authentication
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="xref" href="windows-pluggable-authentication.html#windows-pluggable-authentication-uninstallation" title="Uninstalling Windows Pluggable Authentication">
Uninstalling Windows Pluggable Authentication
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="xref" href="windows-pluggable-authentication.html#windows-pluggable-authentication-usage" title="Using Windows Pluggable Authentication">
Using Windows Pluggable Authentication
</a>
</p>
</li>
</ul>
</div>
<p>
For general information about pluggable authentication in MySQL,
see
<a class="xref" href="pluggable-authentication.html" title="8.2.17 Pluggable Authentication">
Section 8.2.17, “Pluggable Authentication”
</a>
. For proxy user
information, see
<a class="xref" href="proxy-users.html" title="8.2.19 Proxy Users">
Section 8.2.19, “Proxy Users”
</a>
.
</p>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h5 class="title">
<a name="windows-pluggable-authentication-installation">
</a>
Installing Windows Pluggable Authentication
</h5>
</div>
</div>
</div>
<p>
This section describes how to install the server-side Windows
authentication plugin. For general information about
installing plugins, see
<a class="xref" href="plugin-loading.html" title="7.6.1 Installing and Uninstalling Plugins">
Section 7.6.1, “Installing and Uninstalling Plugins”
</a>
.
</p>
<p>
To be usable by the server, the plugin library file must be
located in the MySQL plugin directory (the directory named by
the
<a class="link" href="server-system-variables.html#sysvar_plugin_dir">
<code class="literal">
plugin_dir
</code>
</a>
system
variable). If necessary, configure the plugin directory
location by setting the value of
<a class="link" href="server-system-variables.html#sysvar_plugin_dir">
<code class="literal">
plugin_dir
</code>
</a>
at server startup.
</p>
<p>
To load the plugin at server startup, use the
<a class="link" href="server-options.html#option_mysqld_plugin-load-add">
<code class="option">
--plugin-load-add
</code>
</a>
option to
name the library file that contains it. With this
plugin-loading method, the option must be given each time the
server starts. For example, put these lines in the server
<code class="filename">
my.cnf
</code>
file:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-ini"><div class="docs-select-all right" id="sa83972065"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-ini"><span class="token selector">[mysqld]</span>
<span class="token constant">plugin-load-add</span><span class="token attr-value"><span class="token punctuation">=</span>authentication_windows.dll</span></code></pre>
</div>
<p>
After modifying
<code class="filename">
my.cnf
</code>
, restart the
server to cause the new settings to take effect.
</p>
<p>
Alternatively, to load the plugin at runtime, use this
statement:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa45653661"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">INSTALL</span> <span class="token keyword">PLUGIN</span> authentication_windows <span class="token keyword">SONAME</span> <span class="token string">'authentication_windows.dll'</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
<a class="link" href="install-plugin.html" title="15.7.4.4 INSTALL PLUGIN Statement">
<code class="literal">
INSTALL PLUGIN
</code>
</a>
loads the plugin
immediately, and also registers it in the
<code class="literal">
mysql.plugins
</code>
system table to cause the
server to load it for each subsequent normal startup without
the need for
<a class="link" href="server-options.html#option_mysqld_plugin-load-add">
<code class="option">
--plugin-load-add
</code>
</a>
.
</p>
<p>
To verify plugin installation, examine the Information Schema
<a class="link" href="information-schema-plugins-table.html" title="28.3.22 The INFORMATION_SCHEMA PLUGINS Table">
<code class="literal">
PLUGINS
</code>
</a>
table or use the
<a class="link" href="show-plugins.html" title="15.7.7.27 SHOW PLUGINS Statement">
<code class="literal">
SHOW PLUGINS
</code>
</a>
statement (see
<a class="xref" href="obtaining-plugin-information.html" title="7.6.2 Obtaining Server Plugin Information">
Section 7.6.2, “Obtaining Server Plugin Information”
</a>
). For example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa53459838"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> PLUGIN_NAME<span class="token punctuation">,</span> PLUGIN_STATUS
<span class="token keyword">FROM</span> INFORMATION_SCHEMA<span class="token punctuation">.</span><span class="token keyword">PLUGINS</span>
<span class="token keyword">WHERE</span> PLUGIN_NAME <span class="token operator">LIKE</span> <span class="token string">'%windows%'</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> PLUGIN_NAME <span class="token punctuation">|</span> PLUGIN_STATUS <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> authentication_windows <span class="token punctuation">|</span> ACTIVE <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
<p>
If the plugin fails to initialize, check the server error log
for diagnostic messages.
</p>
<p>
To associate MySQL accounts with the Windows authentication
plugin, see
<a class="xref" href="windows-pluggable-authentication.html#windows-pluggable-authentication-usage" title="Using Windows Pluggable Authentication">
Using Windows Pluggable Authentication
</a>
.
Additional plugin control is provided by the
<a class="link" href="server-system-variables.html#sysvar_authentication_windows_use_principal_name">
<code class="literal">
authentication_windows_use_principal_name
</code>
</a>
and
<a class="link" href="server-system-variables.html#sysvar_authentication_windows_log_level">
<code class="literal">
authentication_windows_log_level
</code>
</a>
system variables. See
<a class="xref" href="server-system-variables.html" title="7.1.8 Server System Variables">
Section 7.1.8, “Server System Variables”
</a>
.
</p>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h5 class="title">
<a name="windows-pluggable-authentication-uninstallation">
</a>
Uninstalling Windows Pluggable Authentication
</h5>
</div>
</div>
</div>
<p>
The method used to uninstall the Windows authentication plugin
depends on how you installed it:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
If you installed the plugin at server startup using a
<a class="link" href="server-options.html#option_mysqld_plugin-load-add">
<code class="option">
--plugin-load-add
</code>
</a>
option,
restart the server without the option.
</p>
</li>
<li class="listitem">
<p>
If you installed the plugin at runtime using an
<a class="link" href="install-plugin.html" title="15.7.4.4 INSTALL PLUGIN Statement">
<code class="literal">
INSTALL PLUGIN
</code>
</a>
statement,
it remains installed across server restarts. To uninstall
it, use
<a class="link" href="uninstall-plugin.html" title="15.7.4.6 UNINSTALL PLUGIN Statement">
<code class="literal">
UNINSTALL PLUGIN
</code>
</a>
:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa1579213"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">UNINSTALL</span> <span class="token keyword">PLUGIN</span> authentication_windows<span class="token punctuation">;</span></code></pre>
</div>
</li>
</ul>
</div>
<p>
In addition, remove any startup options that set Windows
plugin-related system variables.
</p>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h5 class="title">
<a name="windows-pluggable-authentication-usage">
</a>
Using Windows Pluggable Authentication
</h5>
</div>
</div>
</div>
<p>
The Windows authentication plugin supports the use of MySQL
accounts such that users who have logged in to Windows can
connect to the MySQL server without having to specify an
additional password. It is assumed that the server is running
with the server-side plugin enabled, as described in
<a class="xref" href="windows-pluggable-authentication.html#windows-pluggable-authentication-installation" title="Installing Windows Pluggable Authentication">
Installing Windows Pluggable Authentication
</a>
.
Once the DBA has enabled the server-side plugin and set up
accounts to use it, clients can connect using those accounts
with no other setup required on their part.
</p>
<p>
To refer to the Windows authentication plugin in the
<code class="literal">
IDENTIFIED WITH
</code>
clause of a
<a class="link" href="create-user.html" title="15.7.1.3 CREATE USER Statement">
<code class="literal">
CREATE USER
</code>
</a>
statement, use the
name
<code class="literal">
authentication_windows
</code>
. Suppose that
the Windows users
<code class="literal">
Rafal
</code>
and
<code class="literal">
Tasha
</code>
should be permitted to connect to
MySQL, as well as any users in the
<code class="literal">
Administrators
</code>
or
<code class="literal">
Power
Users
</code>
group. To set this up, create a MySQL account
named
<code class="literal">
sql_admin
</code>
that uses the Windows
plugin for authentication:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa92977302"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">CREATE</span> <span class="token keyword">USER</span> sql_admin
<span class="token keyword">IDENTIFIED</span> <span class="token keyword">WITH</span> authentication_windows
<span class="token keyword">AS</span> <span class="token string">'Rafal, Tasha, Administrators, "Power Users"'</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
The plugin name is
<code class="literal">
authentication_windows
</code>
.
The string following the
<code class="literal">
AS
</code>
keyword is the
authentication string. It specifies that the Windows users
named
<code class="literal">
Rafal
</code>
or
<code class="literal">
Tasha
</code>
are
permitted to authenticate to the server as the MySQL user
<code class="literal">
sql_admin
</code>
, as are any Windows users in the
<code class="literal">
Administrators
</code>
or
<code class="literal">
Power
Users
</code>
group. The latter group name contains a space,
so it must be quoted with double quote characters.
</p>
<p>
After you create the
<code class="literal">
sql_admin
</code>
account, a
user who has logged in to Windows can attempt to connect to
the server using that account:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa58688516"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal"><span class="token prompt">C:\></span><span class="token command"> mysql</span> <span class="token constant">--user</span><span class="token attr-value"><span class="token punctuation">=</span>sql_admin</span></code></pre>
</div>
<p>
No password is required here. The
<code class="literal">
authentication_windows
</code>
plugin uses the
Windows security API to check which Windows user is
connecting. If that user is named
<code class="literal">
Rafal
</code>
or
<code class="literal">
Tasha
</code>
, or is a member of the
<code class="literal">
Administrators
</code>
or
<code class="literal">
Power
Users
</code>
group, the server grants access and the client
is authenticated as
<code class="literal">
sql_admin
</code>
and has
whatever privileges are granted to the
<code class="literal">
sql_admin
</code>
account. Otherwise, the server
denies access.
</p>
<p>
Authentication string syntax for the Windows authentication
plugin follows these rules:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
The string consists of one or more user mappings separated
by commas.
</p>
</li>
<li class="listitem">
<p>
Each user mapping associates a Windows user or group name
with a MySQL user name:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-none"><div class="docs-select-all right" id="sa60209893"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-none"><em class="replaceable">win_user_or_group_name=mysql_user_name</em>
<em class="replaceable">win_user_or_group_name</em></code></pre>
</div>
<p>
For the latter syntax, with no
<em class="replaceable">
<code>
mysql_user_name
</code>
</em>
value given,
the implicit value is the MySQL user created by the
<a class="link" href="create-user.html" title="15.7.1.3 CREATE USER Statement">
<code class="literal">
CREATE USER
</code>
</a>
statement.
Thus, these statements are equivalent:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa91619157"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">CREATE</span> <span class="token keyword">USER</span> sql_admin
<span class="token keyword">IDENTIFIED</span> <span class="token keyword">WITH</span> authentication_windows
<span class="token keyword">AS</span> <span class="token string">'Rafal, Tasha, Administrators, "Power Users"'</span><span class="token punctuation">;</span>
<span class="token keyword">CREATE</span> <span class="token keyword">USER</span> sql_admin
<span class="token keyword">IDENTIFIED</span> <span class="token keyword">WITH</span> authentication_windows
<span class="token keyword">AS</span> <span class="token string">'Rafal=sql_admin, Tasha=sql_admin, Administrators=sql_admin,
"Power Users"=sql_admin'</span><span class="token punctuation">;</span></code></pre>
</div>
</li>
<li class="listitem">
<p>
Each backslash character (
<code class="literal">
\
</code>
) in a value
must be doubled because backslash is the escape character
in MySQL strings.
</p>
</li>
<li class="listitem">
<p>
Leading and trailing spaces not inside double quotation
marks are ignored.
</p>
</li>
<li class="listitem">
<p>
Unquoted
<em class="replaceable">
<code>
win_user_or_group_name
</code>
</em>
and
<em class="replaceable">
<code>
mysql_user_name
</code>
</em>
values can
contain anything except equal sign, comma, or space.
</p>
</li>
<li class="listitem">
<p>
If a
<em class="replaceable">
<code>
win_user_or_group_name
</code>
</em>
and
or
<em class="replaceable">
<code>
mysql_user_name
</code>
</em>
value is
quoted with double quotation marks, everything between the
quotation marks is part of the value. This is necessary,
for example, if the name contains space characters. All
characters within double quotes are legal except double
quotation mark and backslash. To include either character,
escape it with a backslash.
</p>
</li>
<li class="listitem">
<p>
<em class="replaceable">
<code>
win_user_or_group_name
</code>
</em>
values
use conventional syntax for Windows principals, either
local or in a domain. Examples (note the doubling of
backslashes):
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-none"><div class="docs-select-all right" id="sa30346814"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-none">domain\\user
.\\user
domain\\group
.\\group
BUILTIN\\WellKnownGroup</code></pre>
</div>
</li>
</ul>
</div>
<p>
When invoked by the server to authenticate a client, the
plugin scans the authentication string left to right for a
user or group match to the Windows user. If there is a match,
the plugin returns the corresponding
<em class="replaceable">
<code>
mysql_user_name
</code>
</em>
to the MySQL
server. If there is no match, authentication fails.
</p>
<p>
A user name match takes preference over a group name match.
Suppose that the Windows user named
<code class="literal">
win_user
</code>
is a member of
<code class="literal">
win_group
</code>
and the authentication string
looks like this:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-none"><div class="docs-select-all right" id="sa54754236"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-none">'win_group = sql_user1, win_user = sql_user2'</code></pre>
</div>
<p>
When
<code class="literal">
win_user
</code>
connects to the MySQL server,
there is a match both to
<code class="literal">
win_group
</code>
and to
<code class="literal">
win_user
</code>
. The plugin authenticates the user
as
<code class="literal">
sql_user2
</code>
because the more-specific user
match takes precedence over the group match, even though the
group is listed first in the authentication string.
</p>
<p>
Windows authentication always works for connections from the
same computer on which the server is running. For
cross-computer connections, both computers must be registered
with Microsoft Active Directory. If they are in the same
Windows domain, it is unnecessary to specify a domain name. It
is also possible to permit connections from a different
domain, as in this example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa1346192"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">CREATE</span> <span class="token keyword">USER</span> sql_accounting
<span class="token keyword">IDENTIFIED</span> <span class="token keyword">WITH</span> authentication_windows
<span class="token keyword">AS</span> <span class="token string">'SomeDomain\\Accounting'</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
Here
<code class="literal">
SomeDomain
</code>
is the name of the other
domain. The backslash character is doubled because it is the
MySQL escape character within strings.
</p>
<a class="indexterm" name="idm46045245443232">
</a>
<p>
MySQL supports the concept of proxy users whereby a client can
connect and authenticate to the MySQL server using one account
but while connected has the privileges of another account (see
<a class="xref" href="proxy-users.html" title="8.2.19 Proxy Users">
Section 8.2.19, “Proxy Users”
</a>
). Suppose that you want Windows
users to connect using a single user name but be mapped based
on their Windows user and group names onto specific MySQL
accounts as follows:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
The
<code class="literal">
local_user
</code>
and
<code class="literal">
MyDomain\domain_user
</code>
local and domain
Windows users should map to the
<code class="literal">
local_wlad
</code>
MySQL account.
</p>
</li>
<li class="listitem">
<p>
Users in the
<code class="literal">
MyDomain\Developers
</code>
domain
group should map to the
<code class="literal">
local_dev
</code>
MySQL
account.
</p>
</li>
<li class="listitem">
<p>
Local machine administrators should map to the
<code class="literal">
local_admin
</code>
MySQL account.
</p>
</li>
</ul>
</div>
<p>
To set this up, create a proxy account for Windows users to
connect to, and configure this account so that users and
groups map to the appropriate MySQL accounts
(
<code class="literal">
local_wlad
</code>
,
<code class="literal">
local_dev
</code>
,
<code class="literal">
local_admin
</code>
). In addition, grant the MySQL
accounts the privileges appropriate to the operations they
need to perform. The following instructions use
<code class="literal">
win_proxy
</code>
as the proxy account, and
<code class="literal">
local_wlad
</code>
,
<code class="literal">
local_dev
</code>
,
and
<code class="literal">
local_admin
</code>
as the proxied accounts.
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1">
<li class="listitem">
<p>
Create the proxy MySQL account:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa2039857"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">CREATE</span> <span class="token keyword">USER</span> win_proxy
<span class="token keyword">IDENTIFIED</span> <span class="token keyword">WITH</span> authentication_windows
<span class="token keyword">AS</span> <span class="token string">'local_user = local_wlad,
MyDomain\\domain_user = local_wlad,
MyDomain\\Developers = local_dev,
BUILTIN\\Administrators = local_admin'</span><span class="token punctuation">;</span></code></pre>
</div>
</li>
<li class="listitem">
<p>
For proxying to work, the proxied accounts must exist, so
create them:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa12070801"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">CREATE</span> <span class="token keyword">USER</span> local_wlad
<span class="token keyword">IDENTIFIED</span> <span class="token keyword">WITH</span> mysql_no_login<span class="token punctuation">;</span>
<span class="token keyword">CREATE</span> <span class="token keyword">USER</span> local_dev
<span class="token keyword">IDENTIFIED</span> <span class="token keyword">WITH</span> mysql_no_login<span class="token punctuation">;</span>
<span class="token keyword">CREATE</span> <span class="token keyword">USER</span> local_admin
<span class="token keyword">IDENTIFIED</span> <span class="token keyword">WITH</span> mysql_no_login<span class="token punctuation">;</span></code></pre>
</div>
<p>
The proxied accounts use the
<code class="literal">
mysql_no_login
</code>
authentication plugin to
prevent clients from using the accounts to log in directly
to the MySQL server. Instead, users who authenticate using
Windows are expected to use the
<code class="literal">
win_proxy
</code>
proxy account. (This assumes
that the plugin is installed. For instructions, see
<a class="xref" href="no-login-pluggable-authentication.html" title="8.4.1.9 No-Login Pluggable Authentication">
Section 8.4.1.9, “No-Login Pluggable Authentication”
</a>
.) For
alternative methods of protecting proxied accounts against
direct use, see
<a class="xref" href="proxy-users.html#preventing-proxied-account-direct-login" title="Preventing Direct Login to Proxied Accounts">
Preventing Direct Login to Proxied Accounts
</a>
.
</p>
<p>
You should also execute
<a class="link" href="grant.html" title="15.7.1.6 GRANT Statement">
<code class="literal">
GRANT
</code>
</a>
statements (not
shown) that grant each proxied account the privileges
required for MySQL access.
</p>
</li>
<li class="listitem">
<p>
Grant to the proxy account the
<a class="link" href="privileges-provided.html#priv_proxy">
<code class="literal">
PROXY
</code>
</a>
privilege for each
proxied account:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa17073479"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">GRANT</span> <span class="token keyword">PROXY</span> <span class="token keyword">ON</span> local_wlad <span class="token keyword">TO</span> win_proxy<span class="token punctuation">;</span>
<span class="token keyword">GRANT</span> <span class="token keyword">PROXY</span> <span class="token keyword">ON</span> local_dev <span class="token keyword">TO</span> win_proxy<span class="token punctuation">;</span>
<span class="token keyword">GRANT</span> <span class="token keyword">PROXY</span> <span class="token keyword">ON</span> local_admin <span class="token keyword">TO</span> win_proxy<span class="token punctuation">;</span></code></pre>
</div>
</li>
</ol>
</div>
<p>
Now the Windows users
<code class="literal">
local_user
</code>
and
<code class="literal">
MyDomain\domain_user
</code>
can connect to the
MySQL server as
<code class="literal">
win_proxy
</code>
and when
authenticated have the privileges of the account given in the
authentication string (in this case,
<code class="literal">
local_wlad
</code>
). A user in the
<code class="literal">
MyDomain\Developers
</code>
group who connects as
<code class="literal">
win_proxy
</code>
has the privileges of the
<code class="literal">
local_dev
</code>
account. A user in the
<code class="literal">
BUILTIN\Administrators
</code>
group has the
privileges of the
<code class="literal">
local_admin
</code>
account.
</p>
<p>
To configure authentication so that all Windows users who do
not have their own MySQL account go through a proxy account,
substitute the default proxy account
(
<code class="literal">
''@''
</code>
) for
<code class="literal">
win_proxy
</code>
in
the preceding instructions. For information about default
proxy accounts, see
<a class="xref" href="proxy-users.html" title="8.2.19 Proxy Users">
Section 8.2.19, “Proxy Users”
</a>
.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
If your MySQL installation has anonymous users, they might
conflict with the default proxy user. For more information
about this issue, and ways of dealing with it, see
<a class="xref" href="proxy-users.html#proxy-users-conflicts" title="Default Proxy User and Anonymous User Conflicts">
Default Proxy User and Anonymous User Conflicts
</a>
.
</p>
</div>
<p>
To use the Windows authentication plugin with Connector/NET
connection strings in Connector/NET 8.4 and higher, see
<a class="ulink" href="/doc/connector-net/en/connector-net-authentication.html" target="_top">
Connector/NET Authentication
</a>
.
</p>
</div>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/innodb-information-schema-temp-table-info.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a name="innodb-information-schema-temp-table-info">
</a>
17.15.7 InnoDB INFORMATION_SCHEMA Temporary Table Info Table
</h3>
</div>
</div>
</div>
<p>
<a class="link" href="information-schema-innodb-temp-table-info-table.html" title="28.4.27 The INFORMATION_SCHEMA INNODB_TEMP_TABLE_INFO Table">
<code class="literal">
INNODB_TEMP_TABLE_INFO
</code>
</a>
provides
information about user-created
<code class="literal">
InnoDB
</code>
temporary
tables that are active in the
<code class="literal">
InnoDB
</code>
instance.
It does not provide information about internal
<code class="literal">
InnoDB
</code>
temporary tables used by the optimizer.
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa25148507"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SHOW</span> <span class="token keyword">TABLES</span> <span class="token keyword">FROM</span> INFORMATION_SCHEMA <span class="token operator">LIKE</span> <span class="token string">'INNODB_TEMP%'</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Tables_in_INFORMATION_SCHEMA (INNODB_TEMP%) <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> INNODB_TEMP_TABLE_INFO <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
<p>
For the table definition, see
<a class="xref" href="information-schema-innodb-temp-table-info-table.html" title="28.4.27 The INFORMATION_SCHEMA INNODB_TEMP_TABLE_INFO Table">
Section 28.4.27, “The INFORMATION_SCHEMA INNODB_TEMP_TABLE_INFO Table”
</a>
.
</p>
<div class="example">
<a name="innodb-information-schema-temp-table-info-example">
</a>
<p class="title">
<b>
Example 17.12 INNODB_TEMP_TABLE_INFO
</b>
</p>
<div class="example-contents">
<p>
This example demonstrates characteristics of the
<a class="link" href="information-schema-innodb-temp-table-info-table.html" title="28.4.27 The INFORMATION_SCHEMA INNODB_TEMP_TABLE_INFO Table">
<code class="literal">
INNODB_TEMP_TABLE_INFO
</code>
</a>
table.
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1">
<li class="listitem">
<p>
Create a simple
<code class="literal">
InnoDB
</code>
temporary table:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa20324115"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">CREATE</span> <span class="token keyword">TEMPORARY</span> <span class="token keyword">TABLE</span> t1 <span class="token punctuation">(</span>c1 <span class="token datatype">INT</span> <span class="token keyword">PRIMARY</span> <span class="token keyword">KEY</span><span class="token punctuation">)</span> <span class="token keyword">ENGINE</span><span class="token operator">=</span>INNODB<span class="token punctuation">;</span></code></pre>
</div>
</li>
<li class="listitem">
<p>
Query
<a class="link" href="information-schema-innodb-temp-table-info-table.html" title="28.4.27 The INFORMATION_SCHEMA INNODB_TEMP_TABLE_INFO Table">
<code class="literal">
INNODB_TEMP_TABLE_INFO
</code>
</a>
to
view the temporary table metadata.
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa17172592"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> <span class="token operator">*</span> <span class="token keyword">FROM</span> INFORMATION_SCHEMA<span class="token punctuation">.</span>INNODB_TEMP_TABLE_INFO\G
<span class="token output"><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 1. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
TABLE_ID<span class="token punctuation">:</span> 194
NAME<span class="token punctuation">:</span> #sql7a79_1_0
N_COLS<span class="token punctuation">:</span> 4
SPACE<span class="token punctuation">:</span> 182</span></code></pre>
</div>
<p>
The
<code class="literal">
TABLE_ID
</code>
is a unique identifier for
the temporary table. The
<code class="literal">
NAME
</code>
column
displays the system-generated name for the temporary table,
which is prefixed with
<span class="quote">
“
<span class="quote">
#sql
</span>
”
</span>
. The number of
columns (
<code class="literal">
N_COLS
</code>
) is 4 rather than 1
because
<code class="literal">
InnoDB
</code>
always creates three
hidden table columns (
<code class="literal">
DB_ROW_ID
</code>
,
<code class="literal">
DB_TRX_ID
</code>
, and
<code class="literal">
DB_ROLL_PTR
</code>
).
</p>
</li>
<li class="listitem">
<p>
Restart MySQL and query
<a class="link" href="information-schema-innodb-temp-table-info-table.html" title="28.4.27 The INFORMATION_SCHEMA INNODB_TEMP_TABLE_INFO Table">
<code class="literal">
INNODB_TEMP_TABLE_INFO
</code>
</a>
.
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa46310824"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> <span class="token operator">*</span> <span class="token keyword">FROM</span> INFORMATION_SCHEMA<span class="token punctuation">.</span>INNODB_TEMP_TABLE_INFO\G</code></pre>
</div>
<p>
An empty set is returned because
<a class="link" href="information-schema-innodb-temp-table-info-table.html" title="28.4.27 The INFORMATION_SCHEMA INNODB_TEMP_TABLE_INFO Table">
<code class="literal">
INNODB_TEMP_TABLE_INFO
</code>
</a>
and its
data are not persisted to disk when the server is shut down.
</p>
</li>
<li class="listitem">
<p>
Create a new temporary table.
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa69949400"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">CREATE</span> <span class="token keyword">TEMPORARY</span> <span class="token keyword">TABLE</span> t1 <span class="token punctuation">(</span>c1 <span class="token datatype">INT</span> <span class="token keyword">PRIMARY</span> <span class="token keyword">KEY</span><span class="token punctuation">)</span> <span class="token keyword">ENGINE</span><span class="token operator">=</span>INNODB<span class="token punctuation">;</span></code></pre>
</div>
</li>
<li class="listitem">
<p>
Query
<a class="link" href="information-schema-innodb-temp-table-info-table.html" title="28.4.27 The INFORMATION_SCHEMA INNODB_TEMP_TABLE_INFO Table">
<code class="literal">
INNODB_TEMP_TABLE_INFO
</code>
</a>
to
view the temporary table metadata.
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa14724969"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> <span class="token operator">*</span> <span class="token keyword">FROM</span> INFORMATION_SCHEMA<span class="token punctuation">.</span>INNODB_TEMP_TABLE_INFO\G
<span class="token output"><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 1. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
TABLE_ID<span class="token punctuation">:</span> 196
NAME<span class="token punctuation">:</span> #sql7b0e_1_0
N_COLS<span class="token punctuation">:</span> 4
SPACE<span class="token punctuation">:</span> 184</span></code></pre>
</div>
<p>
The
<code class="literal">
SPACE
</code>
ID may be different because it
is dynamically generated when the server is started.
</p>
</li>
</ol>
</div>
</div>
</div>
<br class="example-break"/>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/innodb-optimize-tablespace-page-allocation.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title">
<a name="innodb-optimize-tablespace-page-allocation">
</a>
17.6.3.8 Optimizing Tablespace Space Allocation on Linux
</h4>
</div>
</div>
</div>
<a class="indexterm" name="idm46045165001664">
</a>
<p>
You can optimize how
<code class="literal">
InnoDB
</code>
allocates space to
file-per-table and general tablespaces on Linux. By default, when
additional space is required,
<code class="literal">
InnoDB
</code>
allocates
pages to the tablespace and physically writes NULLs to those
pages. This behavior can affect performance if new pages are
allocated frequently. You can disable
<a class="link" href="innodb-parameters.html#sysvar_innodb_extend_and_initialize">
<code class="literal">
innodb_extend_and_initialize
</code>
</a>
on
Linux systems to avoid physically writing NULLs to newly allocated
tablespace pages. When
<a class="link" href="innodb-parameters.html#sysvar_innodb_extend_and_initialize">
<code class="literal">
innodb_extend_and_initialize
</code>
</a>
is
disabled, space is allocated to tablespace files using
<code class="literal">
posix_fallocate()
</code>
calls, which reserve space
without physically writing NULLs.
</p>
<p>
When pages are allocated using
<code class="literal">
posix_fallocate()
</code>
calls, the extension size is
small by default and pages are often allocated only a few at a
time, which can cause fragmentation and increase random I/O. To
avoid this issue, increase the tablespace extension size when
enabling
<code class="literal">
posix_fallocate()
</code>
calls. Tablespace
extension size can be increased up to 4GB using the
<code class="literal">
AUTOEXTEND_SIZE
</code>
option. For more information,
see
<a class="xref" href="innodb-tablespace-autoextend-size.html" title="17.6.3.9 Tablespace AUTOEXTEND_SIZE Configuration">
Section 17.6.3.9, “Tablespace AUTOEXTEND_SIZE Configuration”
</a>
.
</p>
<p>
<code class="literal">
InnoDB
</code>
writes a redo log record before
allocating a new tablespace page. If a page allocation operation
is interrupted, the operation is replayed from the redo log record
during recovery. (A page allocation operation replayed from a redo
log record physically writes NULLs to the newly allocated page.) A
redo log record is written before allocating a page regardless of
the
<a class="link" href="innodb-parameters.html#sysvar_innodb_extend_and_initialize">
<code class="literal">
innodb_extend_and_initialize
</code>
</a>
setting.
</p>
<p>
On non-Linux systems and Windows,
<code class="literal">
InnoDB
</code>
allocates new pages to the tablespace and physically writes NULLs
to those pages, which is the default behavior. Attempting to
disable
<a class="link" href="innodb-parameters.html#sysvar_innodb_extend_and_initialize">
<code class="literal">
innodb_extend_and_initialize
</code>
</a>
on
those systems returns the following error:
</p>
<p>
<span class="errortext">
Changing innodb_extend_and_initialize not supported on
this platform. Falling back to the default.
</span>
</p>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/group-replication-status-variables.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a name="group-replication-status-variables">
</a>
20.9.2 Group Replication Status Variables
</h3>
</div>
</div>
</div>
<a class="indexterm" name="idm46045128446736">
</a>
<a class="indexterm" name="idm46045128445248">
</a>
<p>
This section describes the status variables providing information
about Group Replication.
</p>
<p>
The status variables and their meanings are listed here:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<a name="statvar_Gr_all_consensus_proposals_count">
</a>
<a class="link" href="group-replication-status-variables.html#statvar_Gr_all_consensus_proposals_count">
<code class="literal">
Gr_all_consensus_proposals_count
</code>
</a>
</p>
<a class="indexterm" name="idm46045128440048">
</a>
<a class="indexterm" name="idm46045128439008">
</a>
<p>
Sum of all proposals that were initiated and terminated on
this node.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Gr_all_consensus_time_sum">
</a>
<a class="link" href="group-replication-status-variables.html#statvar_Gr_all_consensus_time_sum">
<code class="literal">
Gr_all_consensus_time_sum
</code>
</a>
</p>
<a class="indexterm" name="idm46045128434592">
</a>
<a class="indexterm" name="idm46045128433488">
</a>
<p>
The total elapsed time for all consensus rounds started and
finished on this node. By comparing this value with
<a class="link" href="group-replication-status-variables.html#statvar_Gr_all_consensus_proposals_count">
<code class="literal">
Gr_all_consensus_proposals_count
</code>
</a>
,
we can determine whether a given consensus time has an upward
trend, which may signal a problem.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Gr_certification_garbage_collector_count">
</a>
<a class="link" href="group-replication-status-variables.html#statvar_Gr_certification_garbage_collector_count">
<code class="literal">
Gr_certification_garbage_collector_count
</code>
</a>
</p>
<a class="indexterm" name="idm46045128427520">
</a>
<a class="indexterm" name="idm46045128426400">
</a>
<p>
The number of times certification garbage collection has been
run.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Gr_certification_garbage_collector_time_sum">
</a>
<a class="link" href="group-replication-status-variables.html#statvar_Gr_certification_garbage_collector_time_sum">
<code class="literal">
Gr_certification_garbage_collector_time_sum
</code>
</a>
</p>
<a class="indexterm" name="idm46045128421888">
</a>
<a class="indexterm" name="idm46045128420768">
</a>
<p>
Sum of the times in microseconds taken by certification
garbage collection.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Gr_consensus_bytes_received_sum">
</a>
<a class="link" href="group-replication-status-variables.html#statvar_Gr_consensus_bytes_received_sum">
<code class="literal">
Gr_consensus_bytes_received_sum
</code>
</a>
</p>
<a class="indexterm" name="idm46045128416256">
</a>
<a class="indexterm" name="idm46045128415152">
</a>
<p>
The sum of all socket-level bytes received from group nodes
having this node as a destination.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Gr_consensus_bytes_sent_sum">
</a>
<a class="link" href="group-replication-status-variables.html#statvar_Gr_consensus_bytes_sent_sum">
<code class="literal">
Gr_consensus_bytes_sent_sum
</code>
</a>
</p>
<a class="indexterm" name="idm46045128410704">
</a>
<a class="indexterm" name="idm46045128409600">
</a>
<p>
Sum of all socket-level bytes originating on this node that
were sent to all (other) group nodes. More data is reported
here than for sent messages, since they are multiplexed and
sent to each member.
</p>
<p>
For example, if we have a group with three members and we send
a 100-byte message, this value accounts for 300 bytes, since
we send 100 bytes to each node.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Gr_control_messages_sent_count">
</a>
<a class="link" href="group-replication-status-variables.html#statvar_Gr_control_messages_sent_count">
<code class="literal">
Gr_control_messages_sent_count
</code>
</a>
</p>
<a class="indexterm" name="idm46045128404368">
</a>
<a class="indexterm" name="idm46045128403264">
</a>
<p>
Number of control messages sent by this member.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Gr_control_messages_sent_bytes_sum">
</a>
<a class="link" href="group-replication-status-variables.html#statvar_Gr_control_messages_sent_bytes_sum">
<code class="literal">
Gr_control_messages_sent_bytes_sum
</code>
</a>
</p>
<a class="indexterm" name="idm46045128398688">
</a>
<a class="indexterm" name="idm46045128397648">
</a>
<p>
Sum of the number of bytes used in control messages sent by
this member; this is the on-the-wire size.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Gr_control_messages_sent_roundtrip_time_sum">
</a>
<a class="link" href="group-replication-status-variables.html#statvar_Gr_control_messages_sent_roundtrip_time_sum">
<code class="literal">
Gr_control_messages_sent_roundtrip_time_sum
</code>
</a>
</p>
<a class="indexterm" name="idm46045128393120">
</a>
<a class="indexterm" name="idm46045128392000">
</a>
<p>
Sum of the round-trip times in microseconds for control
messages sent by this member; a round trip is measured between
the sending and the delivery of the message on the sender.
This should provide the time between sending and delivery of
control messages for the majority of the members of the group,
including the sender.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Gr_data_messages_sent_bytes_sum">
</a>
<a class="link" href="group-replication-status-variables.html#statvar_Gr_data_messages_sent_bytes_sum">
<code class="literal">
Gr_data_messages_sent_bytes_sum
</code>
</a>
</p>
<a class="indexterm" name="idm46045128387200">
</a>
<a class="indexterm" name="idm46045128386096">
</a>
<p>
Sum in bytes used by data messages sent by this member; this
is the on-the-wire size.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Gr_data_messages_sent_count">
</a>
<a class="link" href="group-replication-status-variables.html#statvar_Gr_data_messages_sent_count">
<code class="literal">
Gr_data_messages_sent_count
</code>
</a>
</p>
<a class="indexterm" name="idm46045128381600">
</a>
<a class="indexterm" name="idm46045128380496">
</a>
<p>
This is the nmber of transaction data messages sent by this
member.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Gr_data_messages_sent_roundtrip_time_sum">
</a>
<a class="link" href="group-replication-status-variables.html#statvar_Gr_data_messages_sent_roundtrip_time_sum">
<code class="literal">
Gr_data_messages_sent_roundtrip_time_sum
</code>
</a>
</p>
<a class="indexterm" name="idm46045128376000">
</a>
<a class="indexterm" name="idm46045128374880">
</a>
<p>
Sum of the round-trip times in microseconds for data messages
sent by this member; a round trip is measured between the
sending and the delivery of the message on the sender. This
should provide the time between sending and delivery of data
messages for the majority of the members of the group,
including the sender.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Gr_empty_consensus_proposals_count">
</a>
<a class="link" href="group-replication-status-variables.html#statvar_Gr_empty_consensus_proposals_count">
<code class="literal">
Gr_empty_consensus_proposals_count
</code>
</a>
</p>
<a class="indexterm" name="idm46045128369968">
</a>
<a class="indexterm" name="idm46045128368928">
</a>
<p>
Sum of all empty proposal rounds that were initiated and
terminated on this node.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Gr_extended_consensus_count">
</a>
<a class="link" href="group-replication-status-variables.html#statvar_Gr_extended_consensus_count">
<code class="literal">
Gr_extended_consensus_count
</code>
</a>
</p>
<a class="indexterm" name="idm46045128364496">
</a>
<a class="indexterm" name="idm46045128363392">
</a>
<p>
The number of full 3-phase rounds that this node has
initiated. If this number grows over time, it means that at
least one node is having problems answering to proposals,
either due to something it to run slowly, or to network
issues. Use this value together with the
<code class="literal">
count_member_failure_suspicions
</code>
column of
the Performance Schema
<a class="link" href="performance-schema-replication-group-communication-information-table.html" title="29.12.11.10 The replication_group_communication_information Table">
<code class="literal">
replication_group_communication_information
</code>
</a>
table when diagnosing such issues.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Gr_last_consensus_end_timestamp">
</a>
<a class="link" href="group-replication-status-variables.html#statvar_Gr_last_consensus_end_timestamp">
<code class="literal">
Gr_last_consensus_end_timestamp
</code>
</a>
</p>
<a class="indexterm" name="idm46045128356496">
</a>
<a class="indexterm" name="idm46045128355392">
</a>
<p>
The time when the last consensus proposal was approved, in a
timestamp format. This can be an indicator whether the group
is making slow progress, or has halted.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Gr_total_messages_sent_count">
</a>
<a class="link" href="group-replication-status-variables.html#statvar_Gr_total_messages_sent_count">
<code class="literal">
Gr_total_messages_sent_count
</code>
</a>
</p>
<a class="indexterm" name="idm46045128350864">
</a>
<a class="indexterm" name="idm46045128349760">
</a>
<p>
The number of high-level messages sent by this node to the
group. These are the messages received from the API for
proposing to the group. The XCom batching mechanism batches
these messages and proposes them all together. The value shown
for this variable reflects the number of messages prior to
batching.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Gr_transactions_consistency_after_sync_count">
</a>
<a class="link" href="group-replication-status-variables.html#statvar_Gr_transactions_consistency_after_sync_count">
<code class="literal">
Gr_transactions_consistency_after_sync_count
</code>
</a>
</p>
<a class="indexterm" name="idm46045128344976">
</a>
<a class="indexterm" name="idm46045128343936">
</a>
<p>
Number of transactions on secondaries that waited to start,
while waiting for transactions from the primary with
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_consistency">
<code class="literal">
group_replication_consistency
</code>
</a>
equal to
<code class="literal">
AFTER
</code>
or
<code class="literal">
BEFORE_AND_AFTER
</code>
to be committed.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Gr_transactions_consistency_after_sync_time_sum">
</a>
<a class="link" href="group-replication-status-variables.html#statvar_Gr_transactions_consistency_after_sync_time_sum">
<code class="literal">
Gr_transactions_consistency_after_sync_time_sum
</code>
</a>
</p>
<a class="indexterm" name="idm46045128336576">
</a>
<a class="indexterm" name="idm46045128335456">
</a>
<p>
Sum of the times in microseconds that transactions on
secondaries waited on transactions from the primary with
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_consistency">
<code class="literal">
group_replication_consistency
</code>
</a>
equal to
<code class="literal">
AFTER
</code>
or
<code class="literal">
BEFORE_AND_AFTER
</code>
to be committed, before
starting.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Gr_transactions_consistency_after_termination_count">
</a>
<a class="link" href="group-replication-status-variables.html#statvar_Gr_transactions_consistency_after_termination_count">
<code class="literal">
Gr_transactions_consistency_after_termination_count
</code>
</a>
</p>
<a class="indexterm" name="idm46045128328000">
</a>
<a class="indexterm" name="idm46045128326960">
</a>
<p>
The number of transactions executed with
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_consistency">
<code class="literal">
group_replication_consistency
</code>
</a>
equal to
<code class="literal">
AFTER
</code>
or
<code class="literal">
BEFORE_AND_AFTER
</code>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Gr_transactions_consistency_after_termination_time_sum">
</a>
<a class="link" href="group-replication-status-variables.html#statvar_Gr_transactions_consistency_after_termination_time_sum">
<code class="literal">
Gr_transactions_consistency_after_termination_time_sum
</code>
</a>
</p>
<a class="indexterm" name="idm46045128319616">
</a>
<a class="indexterm" name="idm46045128318576">
</a>
<p>
Sum of the time in microseconds between delivery of the
transaction executed with
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_consistency">
<code class="literal">
group_replication_consistency
</code>
</a>
equal to
<code class="literal">
AFTER
</code>
or
<code class="literal">
BEFORE_AND_AFTER
</code>
, and acknowledgement by
the other group members that the transaction is prepared.
</p>
<p>
This value does not include transaction send roundtrip time.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Gr_transactions_consistency_before_begin_count">
</a>
<a class="link" href="group-replication-status-variables.html#statvar_Gr_transactions_consistency_before_begin_count">
<code class="literal">
Gr_transactions_consistency_before_begin_count
</code>
</a>
</p>
<a class="indexterm" name="idm46045128310704">
</a>
<a class="indexterm" name="idm46045128309584">
</a>
<p>
Number of transactions executed with
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_consistency">
<code class="literal">
group_replication_consistency
</code>
</a>
equal to
<code class="literal">
BEFORE
</code>
or
<code class="literal">
BEFORE_AND_AFTER
</code>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Gr_transactions_consistency_before_begin_time_sum">
</a>
<a class="link" href="group-replication-status-variables.html#statvar_Gr_transactions_consistency_before_begin_time_sum">
<code class="literal">
Gr_transactions_consistency_before_begin_time_sum
</code>
</a>
</p>
<a class="indexterm" name="idm46045128302240">
</a>
<a class="indexterm" name="idm46045128301200">
</a>
<p>
Sum of the time in microseconds that the member waited until
its group replication applier channel was consumed before
executing the transaction with
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_consistency">
<code class="literal">
group_replication_consistency
</code>
</a>
equal to
<code class="literal">
BEFORE
</code>
or
<code class="literal">
BEFORE_AND_AFTER
</code>
.
</p>
</li>
</ul>
</div>
<p>
These status variables all have member scope since they reflect
what the local member observes. They are reset on group bootstrap,
joining of a new member, automatic rejoin of an existing member,
and server restart.
</p>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/union.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a name="union">
</a>
15.2.18 UNION Clause
</h3>
</div>
</div>
</div>
<a class="indexterm" name="idm46045179336688">
</a>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa26876814"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><em class="replaceable">query_expression_body</em> <span class="token keyword">UNION</span> <span class="token punctuation">[</span><span class="token keyword">ALL</span> <span class="token operator">|</span> <span class="token keyword">DISTINCT</span><span class="token punctuation">]</span> <em class="replaceable">query_block</em>
<span class="token punctuation">[</span><span class="token keyword">UNION</span> <span class="token punctuation">[</span><span class="token keyword">ALL</span> <span class="token operator">|</span> <span class="token keyword">DISTINCT</span><span class="token punctuation">]</span> <em class="replaceable">query_expression_body</em><span class="token punctuation">]</span>
<span class="token punctuation">[</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">]</span>
<em class="replaceable">query_expression_body</em>:
<em>See Section <span class="token number">15.2</span><span class="token punctuation">.</span><span class="token number">14</span><span class="token punctuation">,</span> “<span class="token keyword">Set</span> Operations <span class="token keyword">with</span> <span class="token keyword">UNION</span><span class="token punctuation">,</span> <span class="token keyword">INTERSECT</span><span class="token punctuation">,</span> <span class="token operator">and</span> <span class="token keyword">EXCEPT</span>”</em></code></pre>
</div>
<p>
<a class="link" href="union.html" title="15.2.18 UNION Clause">
<code class="literal">
UNION
</code>
</a>
combines the result from
multiple query blocks into a single result set. This example uses
<code class="literal">
SELECT
</code>
statements:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa28417788"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> 1 <span class="token punctuation">|</span> 2 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> 1 <span class="token punctuation">|</span> 2 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> <span class="token string">'a'</span><span class="token punctuation">,</span> <span class="token string">'b'</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> a <span class="token punctuation">|</span> b <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> a <span class="token punctuation">|</span> b <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> <span class="token number">1</span><span class="token punctuation">,</span> <span class="token number">2</span> <span class="token keyword">UNION</span> <span class="token keyword">SELECT</span> <span class="token string">'a'</span><span class="token punctuation">,</span> <span class="token string">'b'</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> 1 <span class="token punctuation">|</span> 2 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> 1 <span class="token punctuation">|</span> 2 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> a <span class="token punctuation">|</span> b <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/out-of-range-and-overflow.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a name="out-of-range-and-overflow">
</a>
13.1.7 Out-of-Range and Overflow Handling
</h3>
</div>
</div>
</div>
<a class="indexterm" name="idm46045213927504">
</a>
<a class="indexterm" name="idm46045213926432">
</a>
<p>
When MySQL stores a value in a numeric column that is outside
the permissible range of the column data type, the result
depends on the SQL mode in effect at the time:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
If strict SQL mode is enabled, MySQL rejects the
out-of-range value with an error, and the insert fails, in
accordance with the SQL standard.
</p>
</li>
<li class="listitem">
<p>
If no restrictive modes are enabled, MySQL clips the value
to the appropriate endpoint of the column data type range
and stores the resulting value instead.
</p>
<p>
When an out-of-range value is assigned to an integer column,
MySQL stores the value representing the corresponding
endpoint of the column data type range.
</p>
<p>
When a floating-point or fixed-point column is assigned a
value that exceeds the range implied by the specified (or
default) precision and scale, MySQL stores the value
representing the corresponding endpoint of that range.
</p>
</li>
</ul>
</div>
<p>
Suppose that a table
<code class="literal">
t1
</code>
has this definition:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa6072906"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">CREATE</span> <span class="token keyword">TABLE</span> t1 <span class="token punctuation">(</span>i1 <span class="token datatype">TINYINT</span><span class="token punctuation">,</span> i2 <span class="token datatype">TINYINT</span> <span class="token keyword">UNSIGNED</span><span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
With strict SQL mode enabled, an out of range error occurs:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa95746037"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SET</span> sql_mode <span class="token operator">=</span> <span class="token string">'TRADITIONAL'</span><span class="token punctuation">;</span>
<span class="token prompt">mysql></span> <span class="token keyword">INSERT</span> <span class="token keyword">INTO</span> t1 <span class="token punctuation">(</span>i1<span class="token punctuation">,</span> i2<span class="token punctuation">)</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token number">256</span><span class="token punctuation">,</span> <span class="token number">256</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output">ERROR 1264 (22003)<span class="token punctuation">:</span> Out of range value for column 'i1' at row 1</span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> <span class="token operator">*</span> <span class="token keyword">FROM</span> t1<span class="token punctuation">;</span>
<span class="token output">Empty set (0.00 sec)</span></code></pre>
</div>
<p>
With strict SQL mode not enabled, clipping with warnings occurs:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa35400816"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SET</span> sql_mode <span class="token operator">=</span> <span class="token string">''</span><span class="token punctuation">;</span>
<span class="token prompt">mysql></span> <span class="token keyword">INSERT</span> <span class="token keyword">INTO</span> t1 <span class="token punctuation">(</span>i1<span class="token punctuation">,</span> i2<span class="token punctuation">)</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token number">256</span><span class="token punctuation">,</span> <span class="token number">256</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token prompt">mysql></span> <span class="token keyword">SHOW</span> <span class="token keyword">WARNINGS</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Level <span class="token punctuation">|</span> Code <span class="token punctuation">|</span> Message <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Warning <span class="token punctuation">|</span> 1264 <span class="token punctuation">|</span> Out of range value for column 'i1' at row 1 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> Warning <span class="token punctuation">|</span> 1264 <span class="token punctuation">|</span> Out of range value for column 'i2' at row 1 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> <span class="token operator">*</span> <span class="token keyword">FROM</span> t1<span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> i1 <span class="token punctuation">|</span> i2 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> 127 <span class="token punctuation">|</span> 255 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
<p>
When strict SQL mode is not enabled, column-assignment
conversions that occur due to clipping are reported as warnings
for
<a class="link" href="alter-table.html" title="15.1.9 ALTER TABLE Statement">
<code class="literal">
ALTER TABLE
</code>
</a>
,
<a class="link" href="load-data.html" title="15.2.9 LOAD DATA Statement">
<code class="literal">
LOAD DATA
</code>
</a>
,
<a class="link" href="update.html" title="15.2.17 UPDATE Statement">
<code class="literal">
UPDATE
</code>
</a>
, and multiple-row
<a class="link" href="insert.html" title="15.2.7 INSERT Statement">
<code class="literal">
INSERT
</code>
</a>
statements. In strict
mode, these statements fail, and some or all the values are not
inserted or changed, depending on whether the table is a
transactional table and other factors. For details, see
<a class="xref" href="sql-mode.html" title="7.1.11 Server SQL Modes">
Section 7.1.11, “Server SQL Modes”
</a>
.
</p>
<p>
Overflow during numeric expression evaluation results in an
error. For example, the largest signed
<a class="link" href="integer-types.html" title="13.1.2 Integer Types (Exact Value) - INTEGER, INT, SMALLINT, TINYINT, MEDIUMINT, BIGINT">
<code class="literal">
BIGINT
</code>
</a>
value is
9223372036854775807, so the following expression produces an
error:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa65084911"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> <span class="token number">9223372036854775807</span> <span class="token operator">+</span> <span class="token number">1</span><span class="token punctuation">;</span>
<span class="token output">ERROR 1690 (22003)<span class="token punctuation">:</span> BIGINT value is out of range in '(9223372036854775807 + 1)'</span></code></pre>
</div>
<p>
To enable the operation to succeed in this case, convert the
value to unsigned;
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa48830766"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> <span class="token function">CAST</span><span class="token punctuation">(</span><span class="token number">9223372036854775807</span> <span class="token keyword">AS</span> <span class="token keyword">UNSIGNED</span><span class="token punctuation">)</span> <span class="token operator">+</span> <span class="token number">1</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> CAST(9223372036854775807 AS UNSIGNED) <span class="token punctuation">+</span> 1 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> 9223372036854775808 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
<p>
Whether overflow occurs depends on the range of the operands, so
another way to handle the preceding expression is to use
exact-value arithmetic because
<a class="link" href="fixed-point-types.html" title="13.1.3 Fixed-Point Types (Exact Value) - DECIMAL, NUMERIC">
<code class="literal">
DECIMAL
</code>
</a>
values have a larger
range than integers:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa83011342"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> <span class="token number">9223372036854775807.0</span> <span class="token operator">+</span> <span class="token number">1</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> 9223372036854775807.0 <span class="token punctuation">+</span> 1 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> 9223372036854775808.0 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
<p>
Subtraction between integer values, where one is of type
<code class="literal">
UNSIGNED
</code>
, produces an unsigned result by
default. If the result would otherwise have been negative, an
error results:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa9159539"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SET</span> sql_mode <span class="token operator">=</span> <span class="token string">''</span><span class="token punctuation">;</span>
<span class="token output">Query OK, 0 rows affected (0.00 sec)</span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> <span class="token function">CAST</span><span class="token punctuation">(</span><span class="token number">0</span> <span class="token keyword">AS</span> <span class="token keyword">UNSIGNED</span><span class="token punctuation">)</span> <span class="token operator">-</span> <span class="token number">1</span><span class="token punctuation">;</span>
<span class="token output">ERROR 1690 (22003)<span class="token punctuation">:</span> BIGINT UNSIGNED value is out of range in '(cast(0 as unsigned) - 1)'</span></code></pre>
</div>
<p>
If the
<a class="link" href="sql-mode.html#sqlmode_no_unsigned_subtraction">
<code class="literal">
NO_UNSIGNED_SUBTRACTION
</code>
</a>
SQL mode is enabled, the result is negative:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa81995739"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SET</span> sql_mode <span class="token operator">=</span> <span class="token string">'NO_UNSIGNED_SUBTRACTION'</span><span class="token punctuation">;</span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> <span class="token function">CAST</span><span class="token punctuation">(</span><span class="token number">0</span> <span class="token keyword">AS</span> <span class="token keyword">UNSIGNED</span><span class="token punctuation">)</span> <span class="token operator">-</span> <span class="token number">1</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> CAST(0 AS UNSIGNED) <span class="token punctuation">-</span> 1 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> <span class="token punctuation">-</span>1 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
<p>
If the result of such an operation is used to update an
<code class="literal">
UNSIGNED
</code>
integer column, the result is
clipped to the maximum value for the column type, or clipped to
0 if
<a class="link" href="sql-mode.html#sqlmode_no_unsigned_subtraction">
<code class="literal">
NO_UNSIGNED_SUBTRACTION
</code>
</a>
is enabled. If strict SQL mode is enabled, an error occurs and
the column remains unchanged.
</p>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/mysql-cluster-ndbinfo-server-locks.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title">
<a name="mysql-cluster-ndbinfo-server-locks">
</a>
25.6.17.54 The ndbinfo server_locks Table
</h4>
</div>
</div>
</div>
<a class="indexterm" name="idm46045088016256">
</a>
<p>
The
<code class="literal">
server_locks
</code>
table is similar in
structure to the
<code class="literal">
cluster_locks
</code>
table, and
provides a subset of the information found in the latter table,
but which is specific to the SQL node (MySQL server) where it
resides. (The
<code class="literal">
cluster_locks
</code>
table provides
information about all locks in the cluster.) More precisely,
<code class="literal">
server_locks
</code>
contains information about locks
requested by threads belonging to the current
<a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
<span class="command">
<strong>
mysqld
</strong>
</span>
</a>
instance, and serves as a companion
table to
<a class="link" href="mysql-cluster-ndbinfo-server-operations.html" title="25.6.17.55 The ndbinfo server_operations Table">
<code class="literal">
server_operations
</code>
</a>
.
This may be useful for correlating locking patterns with
specific MySQL user sessions, queries, or use cases.
</p>
<p>
The
<code class="literal">
server_locks
</code>
table contains the following
columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<code class="literal">
mysql_connection_id
</code>
</p>
<p>
MySQL connection ID
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
node_id
</code>
</p>
<p>
ID of reporting node
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
block_instance
</code>
</p>
<p>
ID of reporting LDM instance
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
tableid
</code>
</p>
<p>
ID of table containing this row
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
fragmentid
</code>
</p>
<p>
ID of fragment containing locked row
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
rowid
</code>
</p>
<p>
ID of locked row
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
transid
</code>
</p>
<p>
Transaction ID
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
mode
</code>
</p>
<p>
Lock request mode
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
state
</code>
</p>
<p>
Lock state
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
detail
</code>
</p>
<p>
Whether this is first holding lock in row lock queue
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
op
</code>
</p>
<p>
Operation type
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
duration_millis
</code>
</p>
<p>
Milliseconds spent waiting or holding lock
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
lock_num
</code>
</p>
<p>
ID of lock object
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
waiting_for
</code>
</p>
<p>
Waiting for lock with this ID
</p>
</li>
</ul>
</div>
<h5>
<a name="idm46045087980288">
</a>
Notes
</h5>
<p>
The
<code class="literal">
mysql_connection_id
</code>
column shows the
MySQL connection or thread ID as shown by
<a class="link" href="show-processlist.html" title="15.7.7.31 SHOW PROCESSLIST Statement">
<code class="literal">
SHOW PROCESSLIST
</code>
</a>
.
</p>
<p>
<code class="literal">
block_instance
</code>
refers to an instance of a
kernel block. Together with the block name, this number can be
used to look up a given instance in the
<a class="link" href="mysql-cluster-ndbinfo-threadblocks.html" title="25.6.17.62 The ndbinfo threadblocks Table">
<code class="literal">
threadblocks
</code>
</a>
table.
</p>
<p>
The
<code class="literal">
tableid
</code>
is assigned to the table by
<code class="literal">
NDB
</code>
; the same ID is used for this table in
other
<code class="literal">
ndbinfo
</code>
tables, as well as in the
output of
<a class="link" href="mysql-cluster-programs-ndb-show-tables.html" title="25.5.27 ndb_show_tables — Display List of NDB Tables">
<span class="command">
<strong>
ndb_show_tables
</strong>
</span>
</a>
.
</p>
<p>
The transaction ID shown in the
<code class="literal">
transid
</code>
column is the identifier generated by the NDB API for the
transaction requesting or holding the current lock.
</p>
<p>
The
<code class="literal">
mode
</code>
column shows the lock mode, which is
always one of
<code class="literal">
S
</code>
(shared lock) or
<code class="literal">
X
</code>
(exclusive lock). If a transaction has an
exclusive lock on a given row, all other locks on that row have
the same transaction ID.
</p>
<p>
The
<code class="literal">
state
</code>
column shows the lock state. Its
value is always one of
<code class="literal">
H
</code>
(holding) or
<code class="literal">
W
</code>
(waiting). A waiting lock request waits for
a lock held by a different transaction.
</p>
<p>
The
<code class="literal">
detail
</code>
column indicates whether this lock
is the first holding lock in the affected row's lock queue,
in which case it contains a
<code class="literal">
*
</code>
(asterisk
character); otherwise, this column is empty. This information
can be used to help identify the unique entries in a list of
lock requests.
</p>
<p>
The
<code class="literal">
op
</code>
column shows the type of operation
requesting the lock. This is always one of the values
<code class="literal">
READ
</code>
,
<code class="literal">
INSERT
</code>
,
<code class="literal">
UPDATE
</code>
,
<code class="literal">
DELETE
</code>
,
<code class="literal">
SCAN
</code>
, or
<code class="literal">
REFRESH
</code>
.
</p>
<p>
The
<code class="literal">
duration_millis
</code>
column shows the number
of milliseconds for which this lock request has been waiting or
holding the lock. This is reset to 0 when a lock is granted for
a waiting request.
</p>
<p>
The lock ID (
<code class="literal">
lockid
</code>
column) is unique to this
node and block instance.
</p>
<p>
If the
<code class="literal">
lock_state
</code>
column's value is
<code class="literal">
W
</code>
, this lock is waiting to be granted, and
the
<code class="literal">
waiting_for
</code>
column shows the lock ID of
the lock object this request is waiting for. Otherwise,
<code class="literal">
waiting_for
</code>
is empty.
<code class="literal">
waiting_for
</code>
can refer only to locks on the
same row (as identified by
<code class="literal">
node_id
</code>
,
<code class="literal">
block_instance
</code>
,
<code class="literal">
tableid
</code>
,
<code class="literal">
fragmentid
</code>
, and
<code class="literal">
rowid
</code>
).
</p>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/create-server.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a name="create-server">
</a>
15.1.18 CREATE SERVER Statement
</h3>
</div>
</div>
</div>
<a class="indexterm" name="idm46045187044400">
</a>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa7591098"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">CREATE</span> <span class="token keyword">SERVER</span> <em class="replaceable">server_name</em>
<span class="token keyword">FOREIGN</span> <span class="token keyword">DATA</span> <span class="token keyword">WRAPPER</span> <em class="replaceable">wrapper_name</em>
<span class="token keyword">OPTIONS</span> <span class="token punctuation">(</span><span class="token keyword"><em class="replaceable">option</em></span> <span class="token punctuation">[</span><span class="token punctuation">,</span> <span class="token keyword"><em class="replaceable">option</em></span><span class="token punctuation">]</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">)</span>
<span class="token keyword"><em class="replaceable">option</em></span>: {
<span class="token keyword">HOST</span> <span class="token keyword"></span><em class="replaceable"><span class="token keyword">character</span><span class="token operator">-</span>literal</em>
<span class="token operator">|</span> <span class="token keyword">DATABASE</span> <span class="token keyword"></span><em class="replaceable"><span class="token keyword">character</span><span class="token operator">-</span>literal</em>
<span class="token operator">|</span> <span class="token keyword">USER</span> <span class="token keyword"></span><em class="replaceable"><span class="token keyword">character</span><span class="token operator">-</span>literal</em>
<span class="token operator">|</span> <span class="token keyword">PASSWORD</span> <span class="token keyword"></span><em class="replaceable"><span class="token keyword">character</span><span class="token operator">-</span>literal</em>
<span class="token operator">|</span> <span class="token keyword">SOCKET</span> <span class="token keyword"></span><em class="replaceable"><span class="token keyword">character</span><span class="token operator">-</span>literal</em>
<span class="token operator">|</span> <span class="token keyword">OWNER</span> <span class="token keyword"></span><em class="replaceable"><span class="token keyword">character</span><span class="token operator">-</span>literal</em>
<span class="token operator">|</span> <span class="token keyword">PORT</span> <span class="token datatype"></span><em class="replaceable"><span class="token datatype">numeric</span><span class="token operator">-</span>literal</em>
}</code></pre>
</div>
<p>
This statement creates the definition of a server for use with the
<code class="literal">
FEDERATED
</code>
storage engine. The
<code class="literal">
CREATE
SERVER
</code>
statement creates a new row in the
<code class="literal">
servers
</code>
table in the
<code class="literal">
mysql
</code>
database. This statement requires the
<a class="link" href="privileges-provided.html#priv_super">
<code class="literal">
SUPER
</code>
</a>
privilege.
</p>
<p>
The
<code class="literal">
<em class="replaceable">
<code>
server_name
</code>
</em>
</code>
should be a unique reference to the server. Server definitions are
global within the scope of the server, it is not possible to
qualify the server definition to a specific database.
<code class="literal">
<em class="replaceable">
<code>
server_name
</code>
</em>
</code>
has a
maximum length of 64 characters (names longer than 64 characters
are silently truncated), and is case-insensitive. You may specify
the name as a quoted string.
</p>
<p>
The
<code class="literal">
<em class="replaceable">
<code>
wrapper_name
</code>
</em>
</code>
is
an identifier and may be quoted with single quotation marks.
</p>
<p>
For each
<code class="literal">
<em class="replaceable">
<code>
option
</code>
</em>
</code>
you
must specify either a character literal or numeric literal.
Character literals are UTF-8, support a maximum length of 64
characters and default to a blank (empty) string. String literals
are silently truncated to 64 characters. Numeric literals must be
a number between 0 and 9999, default value is 0.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
The
<code class="literal">
OWNER
</code>
option is currently not applied,
and has no effect on the ownership or operation of the server
connection that is created.
</p>
</div>
<p>
The
<code class="literal">
CREATE SERVER
</code>
statement creates an entry in
the
<code class="literal">
mysql.servers
</code>
table that can later be used
with the
<a class="link" href="create-table.html" title="15.1.20 CREATE TABLE Statement">
<code class="literal">
CREATE TABLE
</code>
</a>
statement
when creating a
<code class="literal">
FEDERATED
</code>
table. The options
that you specify are used to populate the columns in the
<code class="literal">
mysql.servers
</code>
table. The table columns are
<code class="literal">
Server_name
</code>
,
<code class="literal">
Host
</code>
,
<code class="literal">
Db
</code>
,
<code class="literal">
Username
</code>
,
<code class="literal">
Password
</code>
,
<code class="literal">
Port
</code>
and
<code class="literal">
Socket
</code>
.
</p>
<p>
For example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa96792536"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">CREATE</span> <span class="token keyword">SERVER</span> s
<span class="token keyword">FOREIGN</span> <span class="token keyword">DATA</span> <span class="token keyword">WRAPPER</span> mysql
<span class="token keyword">OPTIONS</span> <span class="token punctuation">(</span><span class="token keyword">USER</span> <span class="token string">'Remote'</span><span class="token punctuation">,</span> <span class="token keyword">HOST</span> <span class="token string">'198.51.100.106'</span><span class="token punctuation">,</span> <span class="token keyword">DATABASE</span> <span class="token string">'test'</span><span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
Be sure to specify all options necessary to establish a connection
to the server. The user name, host name, and database name are
mandatory. Other options might be required as well, such as
password.
</p>
<p>
The data stored in the table can be used when creating a
connection to a
<code class="literal">
FEDERATED
</code>
table:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa74755280"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">CREATE</span> <span class="token keyword">TABLE</span> t <span class="token punctuation">(</span>s1 <span class="token datatype">INT</span><span class="token punctuation">)</span> <span class="token keyword">ENGINE</span><span class="token operator">=</span>FEDERATED <span class="token keyword">CONNECTION</span><span class="token operator">=</span><span class="token string">'s'</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
For more information, see
<a class="xref" href="federated-storage-engine.html" title="18.8 The FEDERATED Storage Engine">
Section 18.8, “The FEDERATED Storage Engine”
</a>
.
</p>
<p>
<code class="literal">
CREATE SERVER
</code>
causes an implicit commit. See
<a class="xref" href="implicit-commit.html" title="15.3.3 Statements That Cause an Implicit Commit">
Section 15.3.3, “Statements That Cause an Implicit Commit”
</a>
.
</p>
<p>
<code class="literal">
CREATE SERVER
</code>
is not written to the binary log,
regardless of the logging format that is in use.
</p>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/innodb-compression.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title">
<a name="innodb-compression">
</a>
17.9 InnoDB Table and Page Compression
</h2>
</div>
</div>
</div>
<div class="toc">
<dl class="toc">
<dt>
<span class="section">
<a href="innodb-table-compression.html">
17.9.1 InnoDB Table Compression
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="innodb-page-compression.html">
17.9.2 InnoDB Page Compression
</a>
</span>
</dt>
</dl>
</div>
<a class="indexterm" name="idm46045161769648">
</a>
<a class="indexterm" name="idm46045161768608">
</a>
<p>
This section provides information about the
<code class="literal">
InnoDB
</code>
table compression and
<code class="literal">
InnoDB
</code>
page compression features. The page
compression feature is also referred to as
<a class="link" href="glossary.html#glos_transparent_page_compression" title="transparent page compression">
transparent page
compression
</a>
.
</p>
<p>
Using the compression features of
<code class="literal">
InnoDB
</code>
, you can
create tables where the data is stored in compressed form.
Compression can help to improve both raw performance and
scalability. The compression means less data is transferred between
disk and memory, and takes up less space on disk and in memory. The
benefits are amplified for tables with
<a class="link" href="glossary.html#glos_secondary_index" title="secondary index">
secondary indexes
</a>
,
because index data is compressed also. Compression can be especially
important for
<a class="link" href="glossary.html#glos_ssd" title="SSD">
SSD
</a>
storage devices,
because they tend to have lower capacity than
<a class="link" href="glossary.html#glos_hdd" title="HDD">
HDD
</a>
devices.
</p>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/optimizing-innodb-transaction-management.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a name="optimizing-innodb-transaction-management">
</a>
10.5.2 Optimizing InnoDB Transaction Management
</h3>
</div>
</div>
</div>
<p>
To optimize
<code class="literal">
InnoDB
</code>
transaction processing,
find the ideal balance between the performance overhead of
transactional features and the workload of your server. For
example, an application might encounter performance issues if it
commits thousands of times per second, and different performance
issues if it commits only every 2-3 hours.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
The default MySQL setting
<code class="literal">
AUTOCOMMIT=1
</code>
can impose performance limitations on a busy database
server. Where practical, wrap several related data change
operations into a single transaction, by issuing
<code class="literal">
SET AUTOCOMMIT=0
</code>
or a
<code class="literal">
START
TRANSACTION
</code>
statement, followed by a
<code class="literal">
COMMIT
</code>
statement after making all the
changes.
</p>
<p>
<code class="literal">
InnoDB
</code>
must flush the log to disk at each
transaction commit if that transaction made modifications to
the database. When each change is followed by a commit (as
with the default autocommit setting), the I/O throughput of
the storage device puts a cap on the number of potential
operations per second.
</p>
</li>
<li class="listitem">
<p>
Alternatively, for transactions that consist only of a
single
<a class="link" href="select.html" title="15.2.13 SELECT Statement">
<code class="literal">
SELECT
</code>
</a>
statement,
turning on
<code class="literal">
AUTOCOMMIT
</code>
helps
<code class="literal">
InnoDB
</code>
to recognize read-only
transactions and optimize them. See
<a class="xref" href="innodb-performance-ro-txn.html" title="10.5.3 Optimizing InnoDB Read-Only Transactions">
Section 10.5.3, “Optimizing InnoDB Read-Only Transactions”
</a>
for
requirements.
</p>
</li>
<li class="listitem">
<p>
Avoid performing rollbacks after inserting, updating, or
deleting huge numbers of rows. If a big transaction is
slowing down server performance, rolling it back can make
the problem worse, potentially taking several times as long
to perform as the original data change operations. Killing
the database process does not help, because the rollback
starts again on server startup.
</p>
<p>
To minimize the chance of this issue occurring:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
Increase the size of the
<a class="link" href="glossary.html#glos_buffer_pool" title="buffer pool">
buffer pool
</a>
so
that all the data change changes can be cached rather
than immediately written to disk.
</p>
</li>
<li class="listitem">
<p>
Set
<a class="link" href="innodb-parameters.html#sysvar_innodb_change_buffering">
<code class="literal">
innodb_change_buffering=all
</code>
</a>
so that update and delete operations are buffered in
addition to inserts.
</p>
</li>
<li class="listitem">
<p>
Consider issuing
<code class="literal">
COMMIT
</code>
statements
periodically during the big data change operation,
possibly breaking a single delete or update into
multiple statements that operate on smaller numbers of
rows.
</p>
</li>
</ul>
</div>
<p>
To get rid of a runaway rollback once it occurs, increase
the buffer pool so that the rollback becomes CPU-bound and
runs fast, or kill the server and restart with
<a class="link" href="innodb-parameters.html#sysvar_innodb_force_recovery">
<code class="literal">
innodb_force_recovery=3
</code>
</a>
, as
explained in
<a class="xref" href="innodb-recovery.html" title="17.18.2 InnoDB Recovery">
Section 17.18.2, “InnoDB Recovery”
</a>
.
</p>
</li>
<li class="listitem">
<p>
If you can afford the loss of some of the latest committed
transactions if an unexpected exit occurs, you can set the
<a class="link" href="innodb-parameters.html#sysvar_innodb_flush_log_at_trx_commit">
<code class="literal">
innodb_flush_log_at_trx_commit
</code>
</a>
parameter to 0.
<code class="literal">
InnoDB
</code>
tries to flush the
log once per second anyway, although the flush is not
guaranteed.
</p>
</li>
<li class="listitem">
<p>
When rows are modified or deleted, the rows and associated
<a class="link" href="glossary.html#glos_undo_log" title="undo log">
undo logs
</a>
are not
physically removed immediately, or even immediately after
the transaction commits. The old data is preserved until
transactions that started earlier or concurrently are
finished, so that those transactions can access the previous
state of modified or deleted rows. Thus, a long-running
transaction can prevent
<code class="literal">
InnoDB
</code>
from
purging data that was changed by a different transaction.
</p>
</li>
<li class="listitem">
<p>
When rows are modified or deleted within a long-running
transaction, other transactions using the
<a class="link" href="innodb-transaction-isolation-levels.html#isolevel_read-committed">
<code class="literal">
READ COMMITTED
</code>
</a>
and
<a class="link" href="innodb-transaction-isolation-levels.html#isolevel_repeatable-read">
<code class="literal">
REPEATABLE READ
</code>
</a>
isolation
levels have to do more work to reconstruct the older data if
they read those same rows.
</p>
</li>
<li class="listitem">
<p>
When a long-running transaction modifies a table, queries
against that table from other transactions do not make use
of the
<a class="link" href="glossary.html#glos_covering_index" title="covering index">
covering
index
</a>
technique. Queries that normally could retrieve
all the result columns from a secondary index, instead look
up the appropriate values from the table data.
</p>
<p>
If secondary index pages are found to have a
<code class="literal">
PAGE_MAX_TRX_ID
</code>
that is too new, or if
records in the secondary index are delete-marked,
<code class="literal">
InnoDB
</code>
may need to look up records using
a clustered index.
</p>
</li>
</ul>
</div>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/mysql-cluster-start-phases.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a name="mysql-cluster-start-phases">
</a>
25.6.4 Summary of NDB Cluster Start Phases
</h3>
</div>
</div>
</div>
<a class="indexterm" name="idm46045092681776">
</a>
<a class="indexterm" name="idm46045092680288">
</a>
<p>
This section provides a simplified outline of the steps involved
when NDB Cluster data nodes are started. More complete information
can be found in
<a class="ulink" href="/doc/ndb-internals/en/ndb-internals-start-phases.html" target="_top">
NDB Cluster Start Phases
</a>
, in
the
<em class="citetitle">
<code class="literal">
NDB
</code>
Internals Guide
</em>
.
</p>
<p>
These phases are the same as those reported in the output from the
<a class="link" href="mysql-cluster-mgm-client-commands.html#ndbclient-status">
<code class="literal">
<em class="replaceable">
<code>
node_id
</code>
</em>
STATUS
</code>
</a>
command in the management client (see
<a class="xref" href="mysql-cluster-mgm-client-commands.html" title="25.6.1 Commands in the NDB Cluster Management Client">
Section 25.6.1, “Commands in the NDB Cluster Management Client”
</a>
). These start
phases are also reported in the
<code class="literal">
start_phase
</code>
column of the
<a class="link" href="mysql-cluster-ndbinfo-nodes.html" title="25.6.17.48 The ndbinfo nodes Table">
<code class="literal">
ndbinfo.nodes
</code>
</a>
table.
</p>
<p>
<b>
Start types.
</b>
There are several different startup types and modes, as shown in
the following list:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<b>
Initial start.
</b>
The cluster starts with a clean file system on all data
nodes. This occurs either when the cluster started for the
very first time, or when all data nodes are restarted using
the
<a class="link" href="mysql-cluster-programs-ndbd.html#option_ndbd_initial">
<code class="option">
--initial
</code>
</a>
option.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
Disk Data files are not removed when restarting a node using
<a class="link" href="mysql-cluster-programs-ndbd.html#option_ndbd_initial">
<code class="option">
--initial
</code>
</a>
.
</p>
</div>
</li>
<li class="listitem">
<p>
<b>
System restart.
</b>
The cluster starts and reads data stored in the data nodes.
This occurs when the cluster has been shut down after having
been in use, when it is desired for the cluster to resume
operations from the point where it left off.
</p>
</li>
<li class="listitem">
<p>
<b>
Node restart.
</b>
This is the online restart of a cluster node while the
cluster itself is running.
</p>
</li>
<li class="listitem">
<p>
<b>
Initial node restart.
</b>
This is the same as a node restart, except that the node is
reinitialized and started with a clean file system.
</p>
</li>
</ul>
</div>
<p>
<b>
Setup and initialization (phase -1).
</b>
Prior to startup, each data node (
<a class="link" href="mysql-cluster-programs-ndbd.html" title="25.5.1 ndbd — The NDB Cluster Data Node Daemon">
<span class="command">
<strong>
ndbd
</strong>
</span>
</a>
process) must be initialized. Initialization consists of the
following steps:
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1">
<li class="listitem">
<p>
Obtain a node ID
</p>
</li>
<li class="listitem">
<p>
Fetch configuration data
</p>
</li>
<li class="listitem">
<p>
Allocate ports to be used for inter-node communications
</p>
</li>
<li class="listitem">
<p>
Allocate memory according to settings obtained from the
configuration file
</p>
</li>
</ol>
</div>
<p>
When a data node or SQL node first connects to the management
node, it reserves a cluster node ID. To make sure that no other
node allocates the same node ID, this ID is retained until the
node has managed to connect to the cluster and at least one
<a class="link" href="mysql-cluster-programs-ndbd.html" title="25.5.1 ndbd — The NDB Cluster Data Node Daemon">
<span class="command">
<strong>
ndbd
</strong>
</span>
</a>
reports that this node is connected. This
retention of the node ID is guarded by the connection between the
node in question and
<a class="link" href="mysql-cluster-programs-ndb-mgmd.html" title="25.5.4 ndb_mgmd — The NDB Cluster Management Server Daemon">
<span class="command">
<strong>
ndb_mgmd
</strong>
</span>
</a>
.
</p>
<p>
After each data node has been initialized, the cluster startup
process can proceed. The stages which the cluster goes through
during this process are listed here:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<b>
Phase 0.
</b>
The
<a class="ulink" href="/doc/ndb-internals/en/ndb-internals-kernel-blocks-ndbfs.html" target="_top">
<code class="literal">
NDBFS
</code>
</a>
and
<a class="ulink" href="/doc/ndb-internals/en/ndb-internals-kernel-blocks-ndbcntr.html" target="_top">
<code class="literal">
NDBCNTR
</code>
</a>
blocks start.
Data node file systems are cleared on those data nodes that
were started with
<a class="link" href="mysql-cluster-programs-ndbd.html#option_ndbd_initial">
<code class="option">
--initial
</code>
</a>
option.
</p>
</li>
<li class="listitem">
<p>
<b>
Phase 1.
</b>
In this stage, all remaining
<a class="link" href="mysql-cluster.html" title="Chapter 25 MySQL NDB Cluster 8.4">
<code class="literal">
NDB
</code>
</a>
kernel blocks are started.
NDB Cluster connections are set up, inter-block
communications are established, and heartbeats are started.
In the case of a node restart, API node connections are also
checked.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
When one or more nodes hang in Phase 1 while the remaining
node or nodes hang in Phase 2, this often indicates network
problems. One possible cause of such issues is one or more
cluster hosts having multiple network interfaces. Another
common source of problems causing this condition is the
blocking of TCP/IP ports needed for communications between
cluster nodes. In the latter case, this is often due to a
misconfigured firewall.
</p>
</div>
</li>
<li class="listitem">
<p>
<b>
Phase 2.
</b>
The
<a class="ulink" href="/doc/ndb-internals/en/ndb-internals-kernel-blocks-ndbcntr.html" target="_top">
<code class="literal">
NDBCNTR
</code>
</a>
kernel block
checks the states of all existing nodes. The master node is
chosen, and the cluster schema file is initialized.
</p>
</li>
<li class="listitem">
<p>
<b>
Phase 3.
</b>
The
<a class="ulink" href="/doc/ndb-internals/en/ndb-internals-kernel-blocks-dblqh.html" target="_top">
<code class="literal">
DBLQH
</code>
</a>
and
<a class="ulink" href="/doc/ndb-internals/en/ndb-internals-kernel-blocks-dbtc.html" target="_top">
<code class="literal">
DBTC
</code>
</a>
kernel blocks set
up communications between them. The startup type is
determined; if this is a restart, the
<a class="ulink" href="/doc/ndb-internals/en/ndb-internals-kernel-blocks-dbdih.html" target="_top">
<code class="literal">
DBDIH
</code>
</a>
block obtains
permission to perform the restart.
</p>
</li>
<li class="listitem">
<p>
<b>
Phase 4.
</b>
For an initial start or initial node restart, the redo log
files are created. The number of these files is equal to
<a class="link" href="mysql-cluster-ndbd-definition.html#ndbparam-ndbd-nooffragmentlogfiles">
<code class="literal">
NoOfFragmentLogFiles
</code>
</a>
.
</p>
<p>
For a system restart:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
Read schema or schemas.
</p>
</li>
<li class="listitem">
<p>
Read data from the local checkpoint.
</p>
</li>
<li class="listitem">
<p>
Apply all redo information until the latest restorable
global checkpoint has been reached.
</p>
</li>
</ul>
</div>
<p>
For a node restart, find the tail of the redo log.
</p>
</li>
<li class="listitem">
<p>
<b>
Phase 5.
</b>
Most of the database-related portion of a data node start is
performed during this phase. For an initial start or system
restart, a local checkpoint is executed, followed by a
global checkpoint. Periodic checks of memory usage begin
during this phase, and any required node takeovers are
performed.
</p>
</li>
<li class="listitem">
<p>
<b>
Phase 6.
</b>
In this phase, node groups are defined and set up.
</p>
</li>
<li class="listitem">
<p>
<b>
Phase 7.
</b>
The arbitrator node is selected and begins to function. The
next backup ID is set, as is the backup disk write speed.
Nodes reaching this start phase are marked as
<code class="literal">
Started
</code>
. It is now possible for API nodes
(including SQL nodes) to connect to the cluster.
</p>
</li>
<li class="listitem">
<p>
<b>
Phase 8.
</b>
If this is a system restart, all indexes are rebuilt (by
<a class="ulink" href="/doc/ndb-internals/en/ndb-internals-kernel-blocks-dbdih.html" target="_top">
<code class="literal">
DBDIH
</code>
</a>
).
</p>
</li>
<li class="listitem">
<p>
<b>
Phase 9.
</b>
The node internal startup variables are reset.
</p>
</li>
<li class="listitem">
<p>
<b>
Phase 100 (OBSOLETE).
</b>
Formerly, it was at this point during a node restart or
initial node restart that API nodes could connect to the
node and begin to receive events. Currently, this phase is
empty.
</p>
</li>
<li class="listitem">
<p>
<b>
Phase 101.
</b>
At this point in a node restart or initial node restart,
event delivery is handed over to the node joining the
cluster. The newly-joined node takes over responsibility for
delivering its primary data to subscribers. This phase is
also referred to as
<span class="firstterm">
<a class="ulink" href="/doc/ndb-internals/en/ndb-internals-kernel-blocks-suma.html" target="_top">
<code class="literal">
SUMA
</code>
</a>
handover phase
</span>
.
</p>
</li>
</ul>
</div>
<p>
After this process is completed for an initial start or system
restart, transaction handling is enabled. For a node restart or
initial node restart, completion of the startup process means that
the node may now act as a transaction coordinator.
</p>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/reserved-accounts.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a name="reserved-accounts">
</a>
8.2.9 Reserved Accounts
</h3>
</div>
</div>
</div>
<a class="indexterm" name="idm46045249447568">
</a>
<a class="indexterm" name="idm46045249446496">
</a>
<a class="indexterm" name="idm46045249445008">
</a>
<p>
One part of the MySQL installation process is data directory
initialization (see
<a class="xref" href="data-directory-initialization.html" title="2.9.1 Initializing the Data Directory">
Section 2.9.1, “Initializing the Data Directory”
</a>
). During data
directory initialization, MySQL creates user accounts that should
be considered reserved:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<code class="literal">
'root'@'localhost
</code>
: Used for administrative
purposes. This account has all privileges, is a system
account, and can perform any operation.
</p>
<p>
Strictly speaking, this account name is not reserved, in the
sense that some installations rename the
<code class="literal">
root
</code>
account to something else to avoid
exposing a highly privileged account with a well-known name.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
'mysql.sys'@'localhost'
</code>
: Used as the
<code class="literal">
DEFINER
</code>
for
<a class="link" href="sys-schema.html" title="Chapter 30 MySQL sys Schema">
<code class="literal">
sys
</code>
</a>
schema objects. Use of the
<code class="literal">
mysql.sys
</code>
account avoids problems that
occur if a DBA renames or removes the
<code class="literal">
root
</code>
account. This account is locked so that it cannot be used for
client connections.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
'mysql.session'@'localhost'
</code>
: Used
internally by plugins to access the server. This account is
locked so that it cannot be used for client connections. The
account is a system account.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
'mysql.infoschema'@'localhost'
</code>
: Used as the
<code class="literal">
DEFINER
</code>
for
<a class="link" href="information-schema.html" title="Chapter 28 INFORMATION_SCHEMA Tables">
<code class="literal">
INFORMATION_SCHEMA
</code>
</a>
views. Use of
the
<code class="literal">
mysql.infoschema
</code>
account avoids
problems that occur if a DBA renames or removes the root
account. This account is locked so that it cannot be used for
client connections.
</p>
</li>
</ul>
</div>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/group-replication-system-variables.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a name="group-replication-system-variables">
</a>
20.9.1 Group Replication System Variables
</h3>
</div>
</div>
</div>
<a class="indexterm" name="idm46045130912864">
</a>
<a class="indexterm" name="idm46045130911376">
</a>
<p>
This section lists the system variables that are specific to the
Group Replication plugin.
</p>
<p>
The name of each Group Replication system variable is prefixed
with
<code class="literal">
group_replication_
</code>
.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
InnoDB Cluster uses Group Replication, but the default values
of the Group Replication system variables may differ from the
defaults documented in this section. For example, in
InnoDB Cluster, the default value of
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_communication_stack">
<code class="literal">
group_replication_communication_stack
</code>
</a>
is
<code class="literal">
MYSQL
</code>
, not
<code class="literal">
XCOM
</code>
as it
is for a default Group Replication implementation.
</p>
<p>
For more information, see
<a class="ulink" href="/doc/mysql-shell/8.4/en/mysql-innodb-cluster.html" target="_top">
MySQL InnoDB Cluster
</a>
.
</p>
</div>
<p>
Some system variables on a Group Replication group member,
including some Group Replication-specific system variables and
some general system variables, are group-wide configuration
settings. These system variables must have the same value on all
group members, and require a full reboot of the group (a bootstrap
by a server with
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_bootstrap_group">
<code class="literal">
group_replication_bootstrap_group=ON
</code>
</a>
)
in order for the value change to take effect. For instructions to
reboot a group where every member has been stopped, see
<a class="xref" href="group-replication-restarting-group.html" title="20.5.2 Restarting a Group">
Section 20.5.2, “Restarting a Group”
</a>
.
</p>
<p>
If a running group has a value set for a group-wide configuration
setting, and a joining member has a different value set for that
system variable, the joining member cannot join the group until
the value is changed to match. If the group has a value set for
one of these system variables, and the joining member does not
support the system variable, it cannot join the group.
</p>
<p>
The following system variables are group-wide configuration
settings:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_single_primary_mode">
<code class="literal">
group_replication_single_primary_mode
</code>
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_enforce_update_everywhere_checks">
<code class="literal">
group_replication_enforce_update_everywhere_checks
</code>
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_gtid_assignment_block_size">
<code class="literal">
group_replication_gtid_assignment_block_size
</code>
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_view_change_uuid">
<code class="literal">
group_replication_view_change_uuid
</code>
</a>
(deprecated)
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_paxos_single_leader">
<code class="literal">
group_replication_paxos_single_leader
</code>
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_communication_stack">
<code class="literal">
group_replication_communication_stack
</code>
</a>
(a special case not policed by Group Replication's own checks;
see the system variable description for details)
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="server-system-variables.html#sysvar_default_table_encryption">
<code class="literal">
default_table_encryption
</code>
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="server-system-variables.html#sysvar_lower_case_table_names">
<code class="literal">
lower_case_table_names
</code>
</a>
</p>
</li>
</ul>
</div>
<p>
Group-wide configuration settings cannot be changed by the usual
methods while Group Replication is running, but it is possible to
use the
<a class="link" href="group-replication-functions-for-mode.html#function_group-replication-switch-to-single-primary-mode">
<code class="literal">
group_replication_switch_to_single_primary_mode()
</code>
</a>
and
<a class="link" href="group-replication-functions-for-mode.html#function_group-replication-switch-to-multi-primary-mode">
<code class="literal">
group_replication_switch_to_multi_primary_mode()
</code>
</a>
functions to change the values of
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_single_primary_mode">
<code class="literal">
group_replication_single_primary_mode
</code>
</a>
and
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_enforce_update_everywhere_checks">
<code class="literal">
group_replication_enforce_update_everywhere_checks
</code>
</a>
while the group is still running. For more information, see
<a class="xref" href="group-replication-changing-group-mode.html" title="20.5.1.2 Changing the Group Mode">
Section 20.5.1.2, “Changing the Group Mode”
</a>
.
</p>
<p>
Most system variables for Group Replication can have different
values on different group members. For the following system
variables, it is advisable to set the same value on all members of
a group in order to avoid unnecessary rollback of transactions,
failure of message delivery, or failure of message recovery:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_auto_increment_increment">
<code class="literal">
group_replication_auto_increment_increment
</code>
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_communication_max_message_size">
<code class="literal">
group_replication_communication_max_message_size
</code>
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_compression_threshold">
<code class="literal">
group_replication_compression_threshold
</code>
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_message_cache_size">
<code class="literal">
group_replication_message_cache_size
</code>
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_transaction_size_limit">
<code class="literal">
group_replication_transaction_size_limit
</code>
</a>
</p>
</li>
</ul>
</div>
<p>
The value of
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_preemptive_garbage_collection">
<code class="literal">
group_replication_preemptive_garbage_collection
</code>
</a>
must be the same on all group members.
</p>
<p>
Most system variables for Group Replication are described as
dynamic, and their values can be changed while the server is
running. However, in most cases, the change takes effect only
after you stop and restart Group Replication on the group member
using a
<a class="link" href="stop-group-replication.html" title="15.4.3.2 STOP GROUP_REPLICATION Statement">
<code class="literal">
STOP GROUP_REPLICATION
</code>
</a>
statement followed by a
<a class="link" href="start-group-replication.html" title="15.4.3.1 START GROUP_REPLICATION Statement">
<code class="literal">
START
GROUP_REPLICATION
</code>
</a>
statement. Changes to the following
system variables take effect without stopping and restarting Group
Replication:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_advertise_recovery_endpoints">
<code class="literal">
group_replication_advertise_recovery_endpoints
</code>
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_autorejoin_tries">
<code class="literal">
group_replication_autorejoin_tries
</code>
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_consistency">
<code class="literal">
group_replication_consistency
</code>
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_exit_state_action">
<code class="literal">
group_replication_exit_state_action
</code>
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_flow_control_applier_threshold">
<code class="literal">
group_replication_flow_control_applier_threshold
</code>
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_flow_control_certifier_threshold">
<code class="literal">
group_replication_flow_control_certifier_threshold
</code>
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_flow_control_hold_percent">
<code class="literal">
group_replication_flow_control_hold_percent
</code>
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_flow_control_max_quota">
<code class="literal">
group_replication_flow_control_max_quota
</code>
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_flow_control_member_quota_percent">
<code class="literal">
group_replication_flow_control_member_quota_percent
</code>
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_flow_control_min_quota">
<code class="literal">
group_replication_flow_control_min_quota
</code>
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_flow_control_min_recovery_quota">
<code class="literal">
group_replication_flow_control_min_recovery_quota
</code>
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_flow_control_mode">
<code class="literal">
group_replication_flow_control_mode
</code>
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_flow_control_period">
<code class="literal">
group_replication_flow_control_period
</code>
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_flow_control_release_percent">
<code class="literal">
group_replication_flow_control_release_percent
</code>
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_force_members">
<code class="literal">
group_replication_force_members
</code>
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_ip_allowlist">
<code class="literal">
group_replication_ip_allowlist
</code>
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_member_expel_timeout">
<code class="literal">
group_replication_member_expel_timeout
</code>
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_member_weight">
<code class="literal">
group_replication_member_weight
</code>
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_transaction_size_limit">
<code class="literal">
group_replication_transaction_size_limit
</code>
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_unreachable_majority_timeout">
<code class="literal">
group_replication_unreachable_majority_timeout
</code>
</a>
</p>
</li>
</ul>
</div>
<p>
When you change the values of any Group Replication system
variables, bear in mind that if there is a point where Group
Replication is stopped on every member at once by a
<a class="link" href="stop-group-replication.html" title="15.4.3.2 STOP GROUP_REPLICATION Statement">
<code class="literal">
STOP GROUP_REPLICATION
</code>
</a>
statement or
system shutdown, the group must be restarted by bootstrapping as
if it was being started for the first time. For instructions on
doing this safely, see
<a class="xref" href="group-replication-restarting-group.html" title="20.5.2 Restarting a Group">
Section 20.5.2, “Restarting a Group”
</a>
. In the case
of group-wide configuration settings, this is required, but if you
are changing other settings, try to ensure that at least one
member is running at all times.
</p>
<div class="important" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Important
</div>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
A number of system variables for Group Replication are not
completely validated during server startup if they are
passed as command line arguments to the server. These system
variables include
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_group_name">
<code class="literal">
group_replication_group_name
</code>
</a>
,
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_single_primary_mode">
<code class="literal">
group_replication_single_primary_mode
</code>
</a>
,
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_force_members">
<code class="literal">
group_replication_force_members
</code>
</a>
,
the SSL variables, and the flow control system variables.
They are fully validated only after the server has started.
</p>
</li>
<li class="listitem">
<p>
System variables for Group Replication that specify IP
addresses or host names for group members are not validated
until a
<a class="link" href="start-group-replication.html" title="15.4.3.1 START GROUP_REPLICATION Statement">
<code class="literal">
START
GROUP_REPLICATION
</code>
</a>
statement is issued. Group
Replication's Group Communication System (GCS) is not
available to validate the values until that point.
</p>
</li>
</ul>
</div>
</div>
<p>
Server system variables specific to the Group Replication plugin,
along with descriptions of their function or purpose, are listed
here:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<a name="sysvar_group_replication_advertise_recovery_endpoints">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_advertise_recovery_endpoints">
<code class="literal">
group_replication_advertise_recovery_endpoints
</code>
</a>
</p>
<a class="indexterm" name="idm46045130802992">
</a>
<a class="indexterm" name="idm46045130801888">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_advertise_recovery_endpoints">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-advertise-recovery-endpoints=value
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_advertise_recovery_endpoints">
group_replication_advertise_recovery_endpoints
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
DEFAULT
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
The value of this system variable can be changed while Group
Replication is running. The change takes effect immediately on
the member. However, a joining member that already received
the previous value of the system variable continues to use
that value. Only members that join after the value change
receive the new value.
</p>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_advertise_recovery_endpoints">
<code class="literal">
group_replication_advertise_recovery_endpoints
</code>
</a>
specifies how a joining member can establish a connection to
an existing member for state transfer for distributed
recovery. The connection is used for both remote cloning
operations and state transfer from the donor's binary log.
</p>
<p>
A value of
<code class="literal">
DEFAULT
</code>
, which is the default
setting, means joining members use the existing member's
standard SQL client connection, as specified by MySQL Server's
<a class="link" href="server-system-variables.html#sysvar_hostname">
<code class="literal">
hostname
</code>
</a>
and
<a class="link" href="server-system-variables.html#sysvar_port">
<code class="literal">
port
</code>
</a>
system variables. If an
alternative port number is specified by the
<a class="link" href="replication-options-replica.html#sysvar_report_port">
<code class="literal">
report_port
</code>
</a>
system variable,
that one is used instead. The Performance Schema table
<a class="link" href="performance-schema-replication-group-members-table.html" title="29.12.11.16 The replication_group_members Table">
<code class="literal">
replication_group_members
</code>
</a>
shows
this connection's address and port number in the
<code class="literal">
MEMBER_HOST
</code>
and
<code class="literal">
MEMBER_PORT
</code>
columns.
</p>
<p>
Instead of
<code class="literal">
DEFAULT
</code>
, you can specify one or
more distributed recovery endpoints, which the existing member
advertises to joining members for them to use. Offering
distributed recovery endpoints lets administrators control
distributed recovery traffic separately from regular MySQL
client connections to the group members. Joining members try
each of the endpoints in turn in the order they are specified
on the list.
</p>
<p>
Specify the distributed recovery endpoints as a
comma-separated list of IP addresses and port numbers, for
example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-none"><div class="docs-select-all right" id="sa6310409"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-none">group_replication_advertise_recovery_endpoints= "127.0.0.1:3306,127.0.0.1:4567,[::1]:3306,localhost:3306"</code></pre>
</div>
<p>
IPv4 and IPv6 addresses and host names can be used in any
combination. IPv6 addresses must be specified in square
brackets. Host names must resolve to a local IP address.
Wildcard address formats cannot be used, and you cannot
specify an empty list. Note that the standard SQL client
connection is not automatically included on a list of
distributed recovery endpoints. If you want to use it as an
endpoint, you must include it explicitly on the list.
</p>
<p>
For details of how to select IP addresses and ports as
distributed recovery endpoints, and how joining members use
them, see
<a class="xref" href="group-replication-distributed-recovery-connections.html#group-replication-distributed-recovery-connections-endpoints" title="20.5.4.1.1 Selecting addresses for distributed recovery endpoints">
Section 20.5.4.1.1, “Selecting addresses for distributed recovery endpoints”
</a>
.
A summary of the requirements is as follows:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
The IP addresses do not have to be configured for MySQL
Server, but they do have to be assigned to the server.
</p>
</li>
<li class="listitem">
<p>
The ports do have to be configured for MySQL Server using
the
<a class="link" href="server-system-variables.html#sysvar_port">
<code class="literal">
port
</code>
</a>
,
<a class="link" href="replication-options-replica.html#sysvar_report_port">
<code class="literal">
report_port
</code>
</a>
, or
<a class="link" href="server-system-variables.html#sysvar_admin_port">
<code class="literal">
admin_port
</code>
</a>
system
variable.
</p>
</li>
<li class="listitem">
<p>
Appropriate permissions are required for the replication
user for distributed recovery if the
<a class="link" href="server-system-variables.html#sysvar_admin_port">
<code class="literal">
admin_port
</code>
</a>
is used.
</p>
</li>
<li class="listitem">
<p>
The IP addresses do not need to be added to the Group
Replication allowlist specified by the
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_ip_allowlist">
<code class="literal">
group_replication_ip_allowlist
</code>
</a>
system variable.
</p>
</li>
<li class="listitem">
<p>
The SSL requirements for the connection are as specified
by the
<code class="literal">
group_replication_recovery_ssl_*
</code>
options.
</p>
</li>
</ul>
</div>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_allow_local_lower_version_join">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_allow_local_lower_version_join">
<code class="literal">
group_replication_allow_local_lower_version_join
</code>
</a>
</p>
<a class="indexterm" name="idm46045130749344">
</a>
<a class="indexterm" name="idm46045130748224">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_allow_local_lower_version_join">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-allow-local-lower-version-join[={OFF|ON}]
</code>
</td>
</tr>
<tr>
<th>
Deprecated
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_allow_local_lower_version_join">
group_replication_allow_local_lower_version_join
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
OFF
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
The value of this system variable can be changed while Group
Replication is running, but the change takes effect only after
you stop and restart Group Replication on the group member.
</p>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_allow_local_lower_version_join">
<code class="literal">
group_replication_allow_local_lower_version_join
</code>
</a>
allows the current server to join the group even if it is
running a lower MySQL Server version than the group. With the
default setting
<code class="literal">
OFF
</code>
, servers are not
permitted to join a replication group if they are running a
lower version than the existing group members. This standard
policy ensures that all members of a group are able to
exchange messages and apply transactions.
</p>
<p>
Set
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_allow_local_lower_version_join">
<code class="literal">
group_replication_allow_local_lower_version_join
</code>
</a>
to
<code class="literal">
ON
</code>
only in the following scenarios:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
A server must be added to the group in an emergency in
order to improve the group's fault tolerance, and only
older versions are available.
</p>
</li>
<li class="listitem">
<p>
You want to roll back an upgrade for one or more
replication group members without shutting down the whole
group and bootstrapping it again.
</p>
</li>
</ul>
</div>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Warning
</div>
<p>
Setting this option to
<code class="literal">
ON
</code>
does not make
the new member compatible with the group, and allows it to
join the group without any safeguards against incompatible
behaviors by the existing members. To ensure the new
member's correct operation, take
<span class="emphasis">
<em>
both
</em>
</span>
of the following precautions:
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1">
<li class="listitem">
<p>
Before the server running the lower version joins the
group, stop all writes on that server.
</p>
</li>
<li class="listitem">
<p>
From the point where the server running the lower
version joins the group, stop all writes on the other
servers in the group.
</p>
</li>
</ol>
</div>
<p>
Without these precautions, the server running the lower
version is likely to experience difficulties and terminate
with an error.
</p>
</div>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_auto_increment_increment">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_auto_increment_increment">
<code class="literal">
group_replication_auto_increment_increment
</code>
</a>
</p>
<a class="indexterm" name="idm46045130708016">
</a>
<a class="indexterm" name="idm46045130706896">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_auto_increment_increment">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-auto-increment-increment=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_auto_increment_increment">
group_replication_auto_increment_increment
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
7
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
1
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
65535
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
This system variable should have the same value on all group
members. You cannot change the value of this system variable
while Group Replication is running. You must stop Group
Replication, change the value of the system variable, then
restart Group Replication, on each of the group members.
During this process, the value of the system variable is
permitted to differ between group members, but some
transactions on group members might be rolled back.
</p>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_auto_increment_increment">
<code class="literal">
group_replication_auto_increment_increment
</code>
</a>
determines the interval between successive values for
auto-incremented columns for transactions that execute on this
server instance. Adding an interval avoids the selection of
duplicate auto-increment values for writes on group members,
which causes rollback of transactions. The default value of 7
represents a balance between the number of usable values and
the permitted maximum size of a replication group (9 members).
If your group has more or fewer members, you can set this
system variable to match the expected number of group members
before Group Replication is started.
</p>
<div class="important" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Important
</div>
<p>
Setting
<code class="literal">
group_replication_auto_increment_increment
</code>
has no effect when
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_single_primary_mode">
<code class="literal">
group_replication_single_primary_mode
</code>
</a>
is
<code class="literal">
ON
</code>
.
</p>
</div>
<p>
When Group Replication is started on a server instance, the
value of the server system variable
<a class="link" href="replication-options-source.html#sysvar_auto_increment_increment">
<code class="literal">
auto_increment_increment
</code>
</a>
is
changed to this value, and the value of the server system
variable
<a class="link" href="replication-options-source.html#sysvar_auto_increment_offset">
<code class="literal">
auto_increment_offset
</code>
</a>
is
changed to the server ID. The changes are reverted when Group
Replication is stopped. These changes are only made and
reverted if
<a class="link" href="replication-options-source.html#sysvar_auto_increment_increment">
<code class="literal">
auto_increment_increment
</code>
</a>
and
<a class="link" href="replication-options-source.html#sysvar_auto_increment_offset">
<code class="literal">
auto_increment_offset
</code>
</a>
each
have their default value of 1. If their values have already
been modified from the default, Group Replication does not
alter them. The system variables are also not modified when
Group Replication is in single-primary mode, where only one
server writes.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_autorejoin_tries">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_autorejoin_tries">
<code class="literal">
group_replication_autorejoin_tries
</code>
</a>
</p>
<a class="indexterm" name="idm46045130664080">
</a>
<a class="indexterm" name="idm46045130663040">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_autorejoin_tries">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-autorejoin-tries=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_autorejoin_tries">
group_replication_autorejoin_tries
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
3
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
2016
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
The value of this system variable can be changed while Group
Replication is running, and the change takes effect
immediately. The system variable's current value is read when
an issue occurs that means the behavior is needed.
</p>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_autorejoin_tries">
<code class="literal">
group_replication_autorejoin_tries
</code>
</a>
specifies the number of tries that a member makes to
automatically rejoin the group if it is expelled, or if it is
unable to contact a majority of the group before the
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_unreachable_majority_timeout">
<code class="literal">
group_replication_unreachable_majority_timeout
</code>
</a>
setting is reached. When the member's expulsion or unreachable
majority timeout is reached, it makes an attempt to rejoin
(using the current plugin option values), then continues to
make further auto-rejoin attempts up to the specified number
of tries. After an unsuccessful auto-rejoin attempt, the
member waits 5 minutes before the next try. If the specified
number of tries is exhausted without the member rejoining or
being stopped, the member proceeds to the action specified by
the
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_exit_state_action">
<code class="literal">
group_replication_exit_state_action
</code>
</a>
system variable.
</p>
<p>
During and between auto-rejoin attempts, a member remains in
super read only mode and does not accept writes, but reads can
still be made on the member, with an increasing likelihood of
stale reads over time. If you cannot tolerate the possibility
of stale reads for any period of time, set
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_autorejoin_tries">
<code class="literal">
group_replication_autorejoin_tries
</code>
</a>
to 0. For more information on the auto-rejoin feature, and
considerations when choosing a value for this option, see
<a class="xref" href="group-replication-responses-failure-rejoin.html" title="20.7.7.3 Auto-Rejoin">
Section 20.7.7.3, “Auto-Rejoin”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_bootstrap_group">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_bootstrap_group">
<code class="literal">
group_replication_bootstrap_group
</code>
</a>
</p>
<a class="indexterm" name="idm46045130625072">
</a>
<a class="indexterm" name="idm46045130624032">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_bootstrap_group">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-bootstrap-group[={OFF|ON}]
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_bootstrap_group">
group_replication_bootstrap_group
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
OFF
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_bootstrap_group">
<code class="literal">
group_replication_bootstrap_group
</code>
</a>
configures this server to bootstrap the group. This system
variable must
<span class="emphasis">
<em>
only
</em>
</span>
be set on one server,
and
<span class="emphasis">
<em>
only
</em>
</span>
when starting the group for the
first time or restarting the entire group. After the group has
been bootstrapped, set this option to
<code class="literal">
OFF
</code>
.
It should be set to
<code class="literal">
OFF
</code>
both dynamically
and in the configuration files. Starting two servers or
restarting one server with this option set while the group is
running may lead to an artificial split brain situation, where
two independent groups with the same name are bootstrapped.
</p>
<p>
For instructions to bootstrap a group for the first time, see
<a class="xref" href="group-replication-bootstrap.html" title="20.2.1.5 Bootstrapping the Group">
Section 20.2.1.5, “Bootstrapping the Group”
</a>
. For
instructions to safely bootstrap a group where transactions
have been executed and certified, see
<a class="xref" href="group-replication-restarting-group.html" title="20.5.2 Restarting a Group">
Section 20.5.2, “Restarting a Group”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_clone_threshold">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_clone_threshold">
<code class="literal">
group_replication_clone_threshold
</code>
</a>
</p>
<a class="indexterm" name="idm46045130593120">
</a>
<a class="indexterm" name="idm46045130592080">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_clone_threshold">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-clone-threshold=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_clone_threshold">
group_replication_clone_threshold
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
9223372036854775807
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
1
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
9223372036854775807
</code>
</td>
</tr>
<tr>
<th>
Unit
</th>
<td>
transactions
</td>
</tr>
</tbody>
</table>
</div>
<p>
The value of this system variable can be changed while Group
Replication is running, but the change takes effect only after
you stop and restart Group Replication on the group member.
</p>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_clone_threshold">
<code class="literal">
group_replication_clone_threshold
</code>
</a>
specifies the transaction gap, as a number of transactions,
between the existing member (donor) and the joining member
(recipient) that triggers the use of a remote cloning
operation for state transfer to the joining member during the
distributed recovery process. If the transaction gap between
the joining member and a suitable donor exceeds the threshold,
Group Replication begins distributed recovery with a remote
cloning operation. If the transaction gap is below the
threshold, or if the remote cloning operation is not
technically possible, Group Replication proceeds directly to
state transfer from a donor's binary log.
</p>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Warning
</div>
<p>
Do not use a low setting for
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_clone_threshold">
<code class="literal">
group_replication_clone_threshold
</code>
</a>
in an active group. If a number of transactions above the
threshold takes place in the group while the remote cloning
operation is in progress, the joining member triggers a
remote cloning operation again after restarting, and could
continue this indefinitely. To avoid this situation, ensure
that you set the threshold to a number higher than the
number of transactions that you would expect to occur in the
group during the time taken for the remote cloning
operation.
</p>
</div>
<p>
To use this function, both the donor and the joining member
must be set up beforehand to support cloning. For
instructions, see
<a class="xref" href="group-replication-cloning.html" title="20.5.4.2 Cloning for Distributed Recovery">
Section 20.5.4.2, “Cloning for Distributed Recovery”
</a>
.
When a remote cloning operation is carried out, Group
Replication manages it for you, including the required server
restart, provided that
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_start_on_boot">
<code class="literal">
group_replication_start_on_boot=ON
</code>
</a>
is set. If not, you must restart the server manually. The
remote cloning operation replaces the existing data dictionary
on the joining member, but Group Replication checks and does
not proceed if the joining member has additional transactions
that are not present on the other group members, because these
transactions would be erased by the cloning operation.
</p>
<p>
The default setting (which is the maximum permitted sequence
number for a transaction in a GTID) means that state transfer
from a donor's binary log is virtually always attempted
rather than cloning. However, note that Group Replication
always attempts to execute a cloning operation, regardless of
your threshold, if state transfer from a donor's binary
log is impossible, for example because the transactions needed
by the joining member are not available in the binary logs on
any existing group member. If you do not want to use cloning
at all in your replication group, do not install the clone
plugin on the members.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_communication_debug_options">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_communication_debug_options">
<code class="literal">
group_replication_communication_debug_options
</code>
</a>
</p>
<a class="indexterm" name="idm46045130550896">
</a>
<a class="indexterm" name="idm46045130549776">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_communication_debug_options">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-communication-debug-options=value
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_communication_debug_options">
group_replication_communication_debug_options
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
GCS_DEBUG_NONE
</code>
</td>
</tr>
<tr>
<th>
Valid Values
</th>
<td>
<p class="valid-value">
<code class="literal">
GCS_DEBUG_NONE
</code>
</p>
<p class="valid-value">
<code class="literal">
GCS_DEBUG_BASIC
</code>
</p>
<p class="valid-value">
<code class="literal">
GCS_DEBUG_TRACE
</code>
</p>
<p class="valid-value">
<code class="literal">
XCOM_DEBUG_BASIC
</code>
</p>
<p class="valid-value">
<code class="literal">
XCOM_DEBUG_TRACE
</code>
</p>
<p class="valid-value">
<code class="literal">
GCS_DEBUG_ALL
</code>
</p>
</td>
</tr>
</tbody>
</table>
</div>
<p>
The value of this system variable can be changed while Group
Replication is running, and the change takes effect
immediately.
</p>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_communication_debug_options">
<code class="literal">
group_replication_communication_debug_options
</code>
</a>
configures the level of debugging messages to provide for the
different Group Replication components, such as the Group
Communication System (GCS) and the group communication engine
(XCom, a Paxos variant). The debug information is stored in
the
<code class="filename">
GCS_DEBUG_TRACE
</code>
file in the data
directory.
</p>
<p>
The set of available options, specified as strings, can be
combined. The following options are available:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
<code class="literal">
GCS_DEBUG_NONE
</code>
disables all debugging
levels for both GCS and XCom.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
GCS_DEBUG_BASIC
</code>
enables basic debugging
information in GCS.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
GCS_DEBUG_TRACE
</code>
enables trace
information in GCS.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
XCOM_DEBUG_BASIC
</code>
enables basic
debugging information in XCom.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
XCOM_DEBUG_TRACE
</code>
enables trace
information in XCom.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
GCS_DEBUG_ALL
</code>
enables all debugging
levels for both GCS and XCom.
</p>
</li>
</ul>
</div>
<p>
Setting the debug level to
<code class="literal">
GCS_DEBUG_NONE
</code>
only has an effect when provided without any other option.
Setting the debug level to
<code class="literal">
GCS_DEBUG_ALL
</code>
overrides all other options.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_communication_max_message_size">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_communication_max_message_size">
<code class="literal">
group_replication_communication_max_message_size
</code>
</a>
</p>
<a class="indexterm" name="idm46045130502336">
</a>
<a class="indexterm" name="idm46045130501216">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_communication_max_message_size">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-communication-max-message-size=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_communication_max_message_size">
group_replication_communication_max_message_size
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
10485760
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
1073741824
</code>
</td>
</tr>
<tr>
<th>
Unit
</th>
<td>
bytes
</td>
</tr>
</tbody>
</table>
</div>
<p>
This system variable should have the same value on all group
members. You cannot change the value of this system variable
while Group Replication is running. You must stop Group
Replication, change the value of the system variable, then
restart Group Replication, on each of the group members.
During this process, the value of the system variable is
permitted to differ between group members, but some
transactions on group members might be rolled back.
</p>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_communication_max_message_size">
<code class="literal">
group_replication_communication_max_message_size
</code>
</a>
specifies a maximum message size for Group Replication
communications. Messages greater than this size are
automatically split into fragments that are sent separately
and reassembled by the recipients. For more information, see
<a class="xref" href="group-replication-performance-message-fragmentation.html" title="20.7.5 Message Fragmentation">
Section 20.7.5, “Message Fragmentation”
</a>
.
</p>
<p>
A maximum message size of 10485760 bytes (10 MiB) is set by
default, which means that fragmentation is used by default.
The greatest permitted value is the same as the maximum value
of the
<a class="link" href="replication-options-replica.html#sysvar_replica_max_allowed_packet">
<code class="literal">
replica_max_allowed_packet
</code>
</a>
system variable, which is 1073741824 bytes (1 GB).
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_communication_max_message_size">
<code class="literal">
group_replication_communication_max_message_size
</code>
</a>
must be less than
<a class="link" href="replication-options-replica.html#sysvar_replica_max_allowed_packet">
<code class="literal">
replica_max_allowed_packet
</code>
</a>
,
because the applier thread cannot handle message fragments
larger than the maximum permitted packet size. To switch off
fragmentation, set
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_communication_max_message_size">
<code class="literal">
group_replication_communication_max_message_size
</code>
</a>
to
<code class="literal">
0
</code>
.
</p>
<p>
In order for members of a replication group to use
fragmentation, the group's communication protocol version
must be 8.0.16 or later. Use the
<a class="link" href="group-replication-functions-for-communication-protocol.html#function_group-replication-get-communication-protocol">
<code class="literal">
group_replication_get_communication_protocol()
</code>
</a>
function to view the group's communication protocol version.
If a lower version is in use, group members do not fragment
messages. You can use the
<a class="link" href="group-replication-functions-for-communication-protocol.html#function_group-replication-set-communication-protocol">
<code class="literal">
group_replication_set_communication_protocol()
</code>
</a>
function to set the group's communication protocol to a higher
version if all group members support it. For more information,
see
<a class="xref" href="group-replication-communication-protocol.html" title="20.5.1.4 Setting a Group's Communication Protocol Version">
Section 20.5.1.4, “Setting a Group's Communication Protocol Version”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_communication_stack">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_communication_stack">
<code class="literal">
group_replication_communication_stack
</code>
</a>
</p>
<a class="indexterm" name="idm46045130455152">
</a>
<a class="indexterm" name="idm46045130454112">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_communication_stack">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_communication_stack">
group_replication_communication_stack
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
XCOM
</code>
</td>
</tr>
<tr>
<th>
Valid Values
</th>
<td>
<p class="valid-value">
<code class="literal">
XCOM
</code>
</p>
<p class="valid-value">
<code class="literal">
MYSQL
</code>
</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
This system variable is effectively a group-wide
configuration setting; although it can be set at runtime, a
full reboot of the replication group is required for any
change to take effect.
</p>
</div>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_communication_stack">
<code class="literal">
group_replication_communication_stack
</code>
</a>
specifies whether the XCom communication stack or the MySQL
communication stack is to be used to establish group
communication connections between members. The XCom
communication stack is Group Replication's own
implementation, and does not support authentication or network
namespaces. The MySQL communication stack is MySQL
Server's native implementation, with support for
authentication and network namespaces, and access to new
security functions immediately on release. All members of a
group must use the same communication stack.
</p>
<p>
When you use the MySQL communication stack in place of XCom,
MySQL Server establishes each connection between group members
using its own authentication and encryption protocols.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
If you are using InnoDB Cluster, the default value of
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_communication_stack">
<code class="literal">
group_replication_communication_stack
</code>
</a>
is
<code class="literal">
MYSQL
</code>
.
</p>
<p>
For more information, see
<a class="ulink" href="/doc/mysql-shell/8.4/en/mysql-innodb-cluster.html" target="_top">
MySQL InnoDB Cluster
</a>
.
</p>
</div>
<p>
Additional configuration is required when you set up a group
to use MySQL’s communication stack; see
<a class="xref" href="group-replication-connection-security.html" title="20.6.1 Communication Stack for Connection Security Management">
Section 20.6.1, “Communication Stack for Connection Security Management”
</a>
.
</p>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_communication_stack">
<code class="literal">
group_replication_communication_stack
</code>
</a>
is effectively a group-wide configuration setting, and the
setting must be the same on all group members. However, this
is not policed by Group Replication’s own checks for
group-wide configuration settings. A member with a different
value from the rest of the group cannot communicate with the
other members at all, because the communication protocols are
incompatible, so it cannot exchange information about its
configuration settings.
</p>
<p>
This means that although the value of the system variable can
be changed while Group Replication is running, and takes
effect after you restart Group Replication on the group
member, the member still cannot rejoin the group until the
setting has been changed on all the members. You must
therefore stop Group Replication on all of the members and
change the value of the system variable on them all before you
can restart the group. Because all of the members are stopped,
a full reboot of the group (a bootstrap by a server with
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_bootstrap_group">
<code class="literal">
group_replication_bootstrap_group=ON
</code>
</a>
)
is required in order for the value change to take effect. For
instructions to migrate from one communication stack to
another, see
<a class="xref" href="group-replication-connection-security.html" title="20.6.1 Communication Stack for Connection Security Management">
Section 20.6.1, “Communication Stack for Connection Security Management”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_components_stop_timeout">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_components_stop_timeout">
<code class="literal">
group_replication_components_stop_timeout
</code>
</a>
</p>
<a class="indexterm" name="idm46045130413200">
</a>
<a class="indexterm" name="idm46045130412080">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_components_stop_timeout">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-components-stop-timeout=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_components_stop_timeout">
group_replication_components_stop_timeout
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
300
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
2
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
31536000
</code>
</td>
</tr>
<tr>
<th>
Unit
</th>
<td>
seconds
</td>
</tr>
</tbody>
</table>
</div>
<p>
The value of this system variable can be changed while Group
Replication is running, but the change takes effect only after
you stop and restart Group Replication on the group member.
</p>
<p>
<code class="literal">
group_replication_components_stop_timeout
</code>
specifies the time, in seconds, for which Group Replication
waits for each of its modules to complete ongoing processes
while shutting down. The component timeout applies after a
<a class="link" href="stop-group-replication.html" title="15.4.3.2 STOP GROUP_REPLICATION Statement">
<code class="literal">
STOP GROUP_REPLICATION
</code>
</a>
statement is issued, which happens automatically during server
restart or auto-rejoin.
</p>
<p>
The timeout is used to resolve situations in which Group
Replication components cannot be stopped normally, which might
happen if a member is expelled from the group while it is in
an error state, or while a process such as MySQL Enterprise Backup is holding a
global lock on tables on the member. In such situations, the
member cannot stop the applier thread or complete the
distributed recovery process to rejoin.
<code class="literal">
STOP
GROUP_REPLICATION
</code>
does not complete until either the
situation is resolved (for example, by the lock being
released), or the component timeout expires and the modules
are shut down regardless of their status.
</p>
<p>
The default value is 300 seconds, so that Group Replication
components are stopped after 5 minutes if the situation is not
resolved before that time, allowing the member to be restarted
and to rejoin.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_compression_threshold">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_compression_threshold">
<code class="literal">
group_replication_compression_threshold
</code>
</a>
</p>
<a class="indexterm" name="idm46045130375072">
</a>
<a class="indexterm" name="idm46045130374032">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_compression_threshold">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-compression-threshold=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_compression_threshold">
group_replication_compression_threshold
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
1000000
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
4294967295
</code>
</td>
</tr>
<tr>
<th>
Unit
</th>
<td>
bytes
</td>
</tr>
</tbody>
</table>
</div>
<p>
The threshold value in bytes above which compression is
applied to messages sent between group members. If this system
variable is set to zero, compression is disabled. The value of
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_compression_threshold">
<code class="literal">
group_replication_compression_threshold
</code>
</a>
should be the same on all group members.
</p>
<p>
Group Replication uses the LZ4 compression algorithm to
compress messages sent in the group. Note that the maximum
supported input size for the LZ4 compression algorithm is
2113929216 bytes. This limit is lower than the maximum
possible value for the
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_compression_threshold">
<code class="literal">
group_replication_compression_threshold
</code>
</a>
system variable, which is matched to the maximum message size
accepted by XCom. With the LZ4 compression algorithm, do not
set a value greater than 2113929216 bytes for
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_compression_threshold">
<code class="literal">
group_replication_compression_threshold
</code>
</a>
,
because transactions above this size cannot be committed when
message compression is enabled.
</p>
<p>
For more information, see
<a class="xref" href="group-replication-message-compression.html" title="20.7.4 Message Compression">
Section 20.7.4, “Message Compression”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_consistency">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_consistency">
<code class="literal">
group_replication_consistency
</code>
</a>
</p>
<a class="indexterm" name="idm46045130336160">
</a>
<a class="indexterm" name="idm46045130335056">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_consistency">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-consistency=value
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_consistency">
group_replication_consistency
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global, Session
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Enumeration
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
BEFORE_ON_PRIMARY_FAILOVER
</code>
</td>
</tr>
<tr>
<th>
Valid Values
</th>
<td>
<p class="valid-value">
<code class="literal">
EVENTUAL
</code>
</p>
<p class="valid-value">
<code class="literal">
BEFORE_ON_PRIMARY_FAILOVER
</code>
</p>
<p class="valid-value">
<code class="literal">
BEFORE
</code>
</p>
<p class="valid-value">
<code class="literal">
AFTER
</code>
</p>
<p class="valid-value">
<code class="literal">
BEFORE_AND_AFTER
</code>
</p>
</td>
</tr>
</tbody>
</table>
</div>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_consistency">
<code class="literal">
group_replication_consistency
</code>
</a>
is a server system variable rather than a Group Replication
plugin-specific variable, so a restart of Group Replication is
not required for the change to take effect. Changing the
session value of the system variable takes effect immediately,
and changing the global value takes effect for new sessions
that start after the change. The
<a class="link" href="privileges-provided.html#priv_group-replication-admin">
<code class="literal">
GROUP_REPLICATION_ADMIN
</code>
</a>
privilege is required to change the global setting for this
system variable.
</p>
<p>
<code class="literal">
group_replication_consistency
</code>
determines
the transaction consistency guarantee which a group provides;
this can done globally, or per transaction.
<code class="literal">
group_replication_consistency
</code>
also
determines the fencing mechanism used by newly elected
primaries in single primary groups. The effect of the variable
must be considered both for read-only and for read/write
transactions. The following list shows the possible values of
this variable, in order of increasing transaction consistency
guarantee:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
<code class="literal">
EVENTUAL
</code>
</p>
<p>
Neither read-only nor read/write transactions wait for
preceding transactions to be applied before executing.
(Before this variables was added, this was the default
behavior.) A read/write transaction does not wait for
other members to apply a transaction. This means that a
transaction can be externalized on one member before the
others. This also means that, in the event of a primary
failover, the new primary can accept new read-only and
read/write transactions before the previous primary
transactions have all been applied.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
BEFORE_ON_PRIMARY_FAILOVER
</code>
</p>
<p>
New read-only or read/write transactions with a newly
elected primary that is applying a backlog from the old
primary are not applied until any backlog has been
applied. This ensures that, in the event of primary
failover, clients always see the latest value on the
primary, regardless of whether the failover is
intentional. This guarantees consistency, but means that
clients must be able to handle the delay in the event that
a backlog is being applied. The length of this delay
depends on the size of the backlog being processed, but is
usually not great.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
BEFORE
</code>
</p>
<p>
A read/write transaction waits for all preceding
transactions to complete before being applied. A read-only
transaction waits for all preceding transactions to
complete before being executed. This ensures that this
transaction reads the latest value by affecting only the
latency of the transaction. This reduces any overhead from
synchronization, by ensuring it is used on read-only
transactions only. This consistency level also includes
the consistency guarantees provided by
<code class="literal">
BEFORE_ON_PRIMARY_FAILOVER
</code>
.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
AFTER
</code>
</p>
<p>
A read/write transaction waits until its changes have been
applied to all of the other members. This value has no
effect on read-only transactions, and ensures that, when a
transaction is committed on the local member, any
subsequent transaction reads the value written or a more
recent value on any group member. This means that
read-only transactions on the other members remain
uncommitted until all preceding transactions are
committed, increasing the latency of the affected
transaction.
</p>
<p>
Use this mode with a group that is intended primarily for
read-only operations to ensure that any read/write
transactions are applied everywhere once they commit. This
can be used by your application to ensure that subsequent
reads fetch the latest data, including the latest writes.
This reduces any overhead from synchronization, by
ensuring that synchronization is used for read/write
transactions only.
</p>
<p>
<code class="literal">
AFTER
</code>
includes the consistency
guarantees provided by
<code class="literal">
BEFORE_ON_PRIMARY_FAILOVER
</code>
.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
BEFORE_AND_AFTER
</code>
</p>
<p>
A read/write transaction waits for all preceding
transactions to complete, and for all its changes to be
applied on all other members, before being applied. A
read-only transaction waits for all preceding transactions
to complete before execution takes place. This consistency
level also includes the consistency guarantees provided by
<code class="literal">
BEFORE_ON_PRIMARY_FAILOVER
</code>
.
</p>
</li>
</ul>
</div>
<p>
For more information, see
<a class="xref" href="group-replication-consistency-guarantees.html" title="20.5.3 Transaction Consistency Guarantees">
Section 20.5.3, “Transaction Consistency Guarantees”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_enforce_update_everywhere_checks">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_enforce_update_everywhere_checks">
<code class="literal">
group_replication_enforce_update_everywhere_checks
</code>
</a>
</p>
<a class="indexterm" name="idm46045130279168">
</a>
<a class="indexterm" name="idm46045130278128">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_enforce_update_everywhere_checks">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-enforce-update-everywhere-checks[={OFF|ON}]
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_enforce_update_everywhere_checks">
group_replication_enforce_update_everywhere_checks
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
OFF
</code>
</td>
</tr>
</tbody>
</table>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
This system variable is a group-wide configuration setting,
and a full reboot of the replication group is required for a
change to take effect.
</p>
</div>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_enforce_update_everywhere_checks">
<code class="literal">
group_replication_enforce_update_everywhere_checks
</code>
</a>
enables or disables strict consistency checks for
multi-primary update everywhere. The default is that checks
are disabled. In single-primary mode, this option must be
disabled on all group members. In multi-primary mode, when
this option is enabled, statements are checked as follows to
ensure they are compatible with multi-primary mode:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
If a transaction is executed under the
<code class="literal">
SERIALIZABLE
</code>
isolation level, then its
commit fails when synchronizing itself with the group.
</p>
</li>
<li class="listitem">
<p>
If a transaction executes against a table that has foreign
keys with cascading constraints, then the transaction
fails to commit when synchronizing itself with the group.
</p>
</li>
</ul>
</div>
<p>
This system variable is a group-wide configuration setting. It
must have the same value on all group members, cannot be
changed while Group Replication is running, and requires a
full reboot of the group (a bootstrap by a server with
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_bootstrap_group">
<code class="literal">
group_replication_bootstrap_group=ON
</code>
</a>
)
in order for the value change to take effect. For instructions
to safely bootstrap a group where transactions have been
executed and certified, see
<a class="xref" href="group-replication-restarting-group.html" title="20.5.2 Restarting a Group">
Section 20.5.2, “Restarting a Group”
</a>
.
</p>
<p>
If the group has a value set for this system variable, and a
joining member has a different value set for the system
variable, the joining member cannot join the group until the
value is changed to match. If the group members have a value
set for this system variable, and the joining member does not
support the system variable, it cannot join the group.
</p>
<p>
Use the
<a class="link" href="group-replication-functions-for-mode.html#function_group-replication-switch-to-single-primary-mode">
<code class="literal">
group_replication_switch_to_single_primary_mode()
</code>
</a>
and
<a class="link" href="group-replication-functions-for-mode.html#function_group-replication-switch-to-multi-primary-mode">
<code class="literal">
group_replication_switch_to_multi_primary_mode()
</code>
</a>
functions to change the value of this system variable while
the group is still running. For more information, see
<a class="xref" href="group-replication-changing-group-mode.html" title="20.5.1.2 Changing the Group Mode">
Section 20.5.1.2, “Changing the Group Mode”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_exit_state_action">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_exit_state_action">
<code class="literal">
group_replication_exit_state_action
</code>
</a>
</p>
<a class="indexterm" name="idm46045130239760">
</a>
<a class="indexterm" name="idm46045130238720">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_exit_state_action">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-exit-state-action=value
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_exit_state_action">
group_replication_exit_state_action
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Enumeration
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
OFFLINE_MODE
</code>
</td>
</tr>
<tr>
<th>
Valid Values
</th>
<td>
<p class="valid-value">
<code class="literal">
ABORT_SERVER
</code>
</p>
<p class="valid-value">
<code class="literal">
OFFLINE_MODE
</code>
</p>
<p class="valid-value">
<code class="literal">
READ_ONLY
</code>
</p>
</td>
</tr>
</tbody>
</table>
</div>
<p>
The value of this system variable can be changed while Group
Replication is running, and the change takes effect
immediately. The system variable's current value is read when
an issue occurs that means the behavior is needed.
</p>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_exit_state_action">
<code class="literal">
group_replication_exit_state_action
</code>
</a>
configures how Group Replication behaves when this server
instance leaves the group unintentionally, for example after
encountering an applier error, or in the case of a loss of
majority, or when another member of the group expels it due to
a suspicion timing out. The timeout period for a member to
leave the group in the case of a loss of majority is set by
the
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_unreachable_majority_timeout">
<code class="literal">
group_replication_unreachable_majority_timeout
</code>
</a>
system variable, and the timeout period for suspicions is set
by the
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_member_expel_timeout">
<code class="literal">
group_replication_member_expel_timeout
</code>
</a>
system variable. Note that an expelled group member does not
know that it was expelled until it reconnects to the group, so
the specified action is only taken if the member manages to
reconnect, or if the member raises a suspicion on itself and
expels itself.
</p>
<p>
When a group member is expelled due to a suspicion timing out
or a loss of majority, if the member has the
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_autorejoin_tries">
<code class="literal">
group_replication_autorejoin_tries
</code>
</a>
system variable set to specify a number of auto-rejoin
attempts, it first makes the specified number of attempts
while in super read only mode, and then follows the action
specified by
<code class="literal">
group_replication_exit_state_action
</code>
.
Auto-rejoin attempts are not made in case of an applier error,
because these are not recoverable.
</p>
<p>
When
<code class="literal">
group_replication_exit_state_action
</code>
is
set to
<code class="literal">
READ_ONLY
</code>
, if the member exits the
group unintentionally or exhausts its auto-rejoin attempts,
the instance switches MySQL to super read only mode (by
setting the system variable
<a class="link" href="server-system-variables.html#sysvar_super_read_only">
<code class="literal">
super_read_only
</code>
</a>
to
<code class="literal">
ON
</code>
).
</p>
<p>
When
<code class="literal">
group_replication_exit_state_action
</code>
is
set to
<code class="literal">
OFFLINE_MODE
</code>
, if the member exits
the group unintentionally or exhausts its auto-rejoin
attempts, the instance switches MySQL to offline mode (by
setting the system variable
<a class="link" href="server-system-variables.html#sysvar_offline_mode">
<code class="literal">
offline_mode
</code>
</a>
to
<code class="literal">
ON
</code>
). In this mode, connected client users
are disconnected on their next request and connections are no
longer accepted, with the exception of client users that have
the
<a class="link" href="privileges-provided.html#priv_connection-admin">
<code class="literal">
CONNECTION_ADMIN
</code>
</a>
privilege
(or the deprecated
<a class="link" href="privileges-provided.html#priv_super">
<code class="literal">
SUPER
</code>
</a>
privilege). Group Replication also sets the system variable
<a class="link" href="server-system-variables.html#sysvar_super_read_only">
<code class="literal">
super_read_only
</code>
</a>
to
<code class="literal">
ON
</code>
, so clients cannot make any updates,
even if they have connected with the
<a class="link" href="privileges-provided.html#priv_connection-admin">
<code class="literal">
CONNECTION_ADMIN
</code>
</a>
or
<a class="link" href="privileges-provided.html#priv_super">
<code class="literal">
SUPER
</code>
</a>
privilege.
</p>
<p>
When
<code class="literal">
group_replication_exit_state_action
</code>
is
set to
<code class="literal">
ABORT_SERVER
</code>
, if the member exits
the group unintentionally or exhausts its auto-rejoin
attempts, the instance shuts down MySQL.
</p>
<div class="important" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Important
</div>
<p>
If a failure occurs before the member has successfully
joined the group, the specified exit action
<span class="emphasis">
<em>
is not
taken
</em>
</span>
. This is the case if there is a failure
during the local configuration check, or a mismatch between
the configuration of the joining member and the
configuration of the group. In these situations, the
<a class="link" href="server-system-variables.html#sysvar_super_read_only">
<code class="literal">
super_read_only
</code>
</a>
system
variable is left with its original value, connections
continue to be accepted, and the server does not shut down
MySQL. To ensure that the server cannot accept updates when
Group Replication did not start, we therefore recommend that
<a class="link" href="server-system-variables.html#sysvar_super_read_only">
<code class="literal">
super_read_only=ON
</code>
</a>
is set
in the server's configuration file at startup, which
Group Replication changes to
<code class="literal">
OFF
</code>
on
primary members after it has been started successfully. This
safeguard is particularly important when the server is
configured to start Group Replication on server boot
(
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_start_on_boot">
<code class="literal">
group_replication_start_on_boot=ON
</code>
</a>
),
but it is also useful when Group Replication is started
manually using a
<a class="link" href="start-group-replication.html" title="15.4.3.1 START GROUP_REPLICATION Statement">
<code class="literal">
START
GROUP_REPLICATION
</code>
</a>
statement.
</p>
</div>
<p>
For more information on using this option, and the full list
of situations in which the exit action is taken, see
<a class="xref" href="group-replication-responses-failure-exit.html" title="20.7.7.4 Exit Action">
Section 20.7.7.4, “Exit Action”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_flow_control_applier_threshold">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_flow_control_applier_threshold">
<code class="literal">
group_replication_flow_control_applier_threshold
</code>
</a>
</p>
<a class="indexterm" name="idm46045130174080">
</a>
<a class="indexterm" name="idm46045130173040">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_flow_control_applier_threshold">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-flow-control-applier-threshold=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_flow_control_applier_threshold">
group_replication_flow_control_applier_threshold
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
25000
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
2147483647
</code>
</td>
</tr>
<tr>
<th>
Unit
</th>
<td>
transactions
</td>
</tr>
</tbody>
</table>
</div>
<p>
The value of this system variable can be changed while Group
Replication is running, and the change takes effect
immediately.
</p>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_flow_control_applier_threshold">
<code class="literal">
group_replication_flow_control_applier_threshold
</code>
</a>
specifies the number of waiting transactions in the applier
queue that trigger flow control.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_flow_control_certifier_threshold">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_flow_control_certifier_threshold">
<code class="literal">
group_replication_flow_control_certifier_threshold
</code>
</a>
</p>
<a class="indexterm" name="idm46045130139296">
</a>
<a class="indexterm" name="idm46045130138256">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_flow_control_certifier_threshold">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-flow-control-certifier-threshold=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_flow_control_certifier_threshold">
group_replication_flow_control_certifier_threshold
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
25000
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
2147483647
</code>
</td>
</tr>
<tr>
<th>
Unit
</th>
<td>
transactions
</td>
</tr>
</tbody>
</table>
</div>
<p>
The value of this system variable can be changed while Group
Replication is running, and the change takes effect
immediately.
</p>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_flow_control_certifier_threshold">
<code class="literal">
group_replication_flow_control_certifier_threshold
</code>
</a>
specifies the number of waiting transactions in the certifier
queue that trigger flow control.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_flow_control_hold_percent">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_flow_control_hold_percent">
<code class="literal">
group_replication_flow_control_hold_percent
</code>
</a>
</p>
<a class="indexterm" name="idm46045130104448">
</a>
<a class="indexterm" name="idm46045130103408">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_flow_control_hold_percent">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-flow-control-hold-percent=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_flow_control_hold_percent">
group_replication_flow_control_hold_percent
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
10
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
100
</code>
</td>
</tr>
<tr>
<th>
Unit
</th>
<td>
percentage
</td>
</tr>
</tbody>
</table>
</div>
<p>
The value of this system variable can be changed while Group
Replication is running, and the change takes effect
immediately.
</p>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_flow_control_hold_percent">
<code class="literal">
group_replication_flow_control_hold_percent
</code>
</a>
defines what percentage of the group quota remains unused to
allow a cluster under flow control to catch up on backlog. A
value of 0 implies that no part of the quota is reserved for
catching up on the work backlog.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_flow_control_max_quota">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_flow_control_max_quota">
<code class="literal">
group_replication_flow_control_max_quota
</code>
</a>
</p>
<a class="indexterm" name="idm46045130069728">
</a>
<a class="indexterm" name="idm46045130068608">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_flow_control_max_quota">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-flow-control-max-quota=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_flow_control_max_quota">
group_replication_flow_control_max_quota
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
2147483647
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
The value of this system variable can be changed while Group
Replication is running, and the change takes effect
immediately.
</p>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_flow_control_max_quota">
<code class="literal">
group_replication_flow_control_max_quota
</code>
</a>
defines the maximum flow control quota of the group, or the
maximum available quota for any period while flow control is
enabled. A value of 0 implies that there is no maximum quota
set. The value of this system variable cannot be smaller than
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_flow_control_min_quota">
<code class="literal">
group_replication_flow_control_min_quota
</code>
</a>
and
<code class="literal">
group_replication_flow_control_min_recovery_quota
</code>
.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_flow_control_member_quota_percent">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_flow_control_member_quota_percent">
<code class="literal">
group_replication_flow_control_member_quota_percent
</code>
</a>
</p>
<a class="indexterm" name="idm46045130034704">
</a>
<a class="indexterm" name="idm46045130033664">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_flow_control_member_quota_percent">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-flow-control-member-quota-percent=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_flow_control_member_quota_percent">
group_replication_flow_control_member_quota_percent
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
100
</code>
</td>
</tr>
<tr>
<th>
Unit
</th>
<td>
percentage
</td>
</tr>
</tbody>
</table>
</div>
<p>
The value of this system variable can be changed while Group
Replication is running, and the change takes effect
immediately.
</p>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_flow_control_member_quota_percent">
<code class="literal">
group_replication_flow_control_member_quota_percent
</code>
</a>
defines the percentage of the quota that a member should
assume is available for itself when calculating the quotas. A
value of 0 implies that the quota should be split equally
between members that were writers in the last period.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_flow_control_min_quota">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_flow_control_min_quota">
<code class="literal">
group_replication_flow_control_min_quota
</code>
</a>
</p>
<a class="indexterm" name="idm46045129999824">
</a>
<a class="indexterm" name="idm46045129998784">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_flow_control_min_quota">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-flow-control-min-quota=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_flow_control_min_quota">
group_replication_flow_control_min_quota
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
2147483647
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
The value of this system variable can be changed while Group
Replication is running, and the change takes effect
immediately.
</p>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_flow_control_min_quota">
<code class="literal">
group_replication_flow_control_min_quota
</code>
</a>
controls the lowest flow control quota that can be assigned to
a member, independently of the calculated minimum quota
executed in the last period. A value of 0 implies that there
is no minimum quota. The value of this system variable cannot
be larger than
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_flow_control_max_quota">
<code class="literal">
group_replication_flow_control_max_quota
</code>
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_flow_control_min_recovery_quota">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_flow_control_min_recovery_quota">
<code class="literal">
group_replication_flow_control_min_recovery_quota
</code>
</a>
</p>
<a class="indexterm" name="idm46045129965616">
</a>
<a class="indexterm" name="idm46045129964576">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_flow_control_min_recovery_quota">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-flow-control-min-recovery-quota=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_flow_control_min_recovery_quota">
group_replication_flow_control_min_recovery_quota
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
2147483647
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
The value of this system variable can be changed while Group
Replication is running, and the change takes effect
immediately.
</p>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_flow_control_min_recovery_quota">
<code class="literal">
group_replication_flow_control_min_recovery_quota
</code>
</a>
controls the lowest quota that can be assigned to a member
because of another recovering member in the group,
independently of the calculated minimum quota executed in the
last period. A value of 0 implies that there is no minimum
quota. The value of this system variable cannot be larger than
<code class="literal">
group_replication_flow_control_max_quota
</code>
.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_flow_control_mode">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_flow_control_mode">
<code class="literal">
group_replication_flow_control_mode
</code>
</a>
</p>
<a class="indexterm" name="idm46045129931888">
</a>
<a class="indexterm" name="idm46045129930848">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_flow_control_mode">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-flow-control-mode=value
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_flow_control_mode">
group_replication_flow_control_mode
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Enumeration
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
QUOTA
</code>
</td>
</tr>
<tr>
<th>
Valid Values
</th>
<td>
<p class="valid-value">
<code class="literal">
DISABLED
</code>
</p>
<p class="valid-value">
<code class="literal">
QUOTA
</code>
</p>
</td>
</tr>
</tbody>
</table>
</div>
<p>
The value of this system variable can be changed while Group
Replication is running, and the change takes effect
immediately.
</p>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_flow_control_mode">
<code class="literal">
group_replication_flow_control_mode
</code>
</a>
specifies the mode used for flow control.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_flow_control_period">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_flow_control_period">
<code class="literal">
group_replication_flow_control_period
</code>
</a>
</p>
<a class="indexterm" name="idm46045129900448">
</a>
<a class="indexterm" name="idm46045129899408">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_flow_control_period">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-flow-control-period=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_flow_control_period">
group_replication_flow_control_period
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
1
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
1
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
60
</code>
</td>
</tr>
<tr>
<th>
Unit
</th>
<td>
seconds
</td>
</tr>
</tbody>
</table>
</div>
<p>
The value of this system variable can be changed while Group
Replication is running, and the change takes effect
immediately.
</p>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_flow_control_period">
<code class="literal">
group_replication_flow_control_period
</code>
</a>
defines how many seconds to wait between flow control
iterations, in which flow control messages are sent and flow
control management tasks are run.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_flow_control_release_percent">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_flow_control_release_percent">
<code class="literal">
group_replication_flow_control_release_percent
</code>
</a>
</p>
<a class="indexterm" name="idm46045129865872">
</a>
<a class="indexterm" name="idm46045129864752">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_flow_control_release_percent">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-flow-control-release-percent=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_flow_control_release_percent">
group_replication_flow_control_release_percent
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
50
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
1000
</code>
</td>
</tr>
<tr>
<th>
Unit
</th>
<td>
percentage
</td>
</tr>
</tbody>
</table>
</div>
<p>
The value of this system variable can be changed while Group
Replication is running, and the change takes effect
immediately.
</p>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_flow_control_release_percent">
<code class="literal">
group_replication_flow_control_release_percent
</code>
</a>
defines how the group quota should be released when flow
control no longer needs to throttle the writer members, with
this percentage being the quota increase per flow control
period. A value of 0 implies that once the flow control
thresholds are within limits the quota is released in a single
flow control iteration. The range allows the quota to be
released at up to 10 times current quota, as that allows a
greater degree of adaptation, mainly when the flow control
period is large and the quotas are very small.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_force_members">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_force_members">
<code class="literal">
group_replication_force_members
</code>
</a>
</p>
<a class="indexterm" name="idm46045129830768">
</a>
<a class="indexterm" name="idm46045129829664">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_force_members">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-force-members=value
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_force_members">
group_replication_force_members
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<p>
This system variable is used to force a new group membership.
The value of this system variable can be changed while Group
Replication is running, and the change takes effect
immediately. You only need to set the value of the system
variable on one of the group members that is to remain in the
group. For details of the situation in which you might need to
force a new group membership, and a procedure to follow when
using this system variable, see
<a class="xref" href="group-replication-network-partitioning.html" title="20.7.8 Handling a Network Partition and Loss of Quorum">
Section 20.7.8, “Handling a Network Partition and Loss of Quorum”
</a>
.
</p>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_force_members">
<code class="literal">
group_replication_force_members
</code>
</a>
specifies a list of peer addresses as a comma separated list,
such as
<code class="literal">
host1:port1
</code>
,
<code class="literal">
host2:port2
</code>
.
Any existing members that are not included in the list do not
receive a new view of the group and are blocked. For each
existing member that is to continue as a member, you must
include the IP address or host name and the port, as they are
given in the
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_local_address">
<code class="literal">
group_replication_local_address
</code>
</a>
system variable for each member. An IPv6 address must be
specified in square brackets. For example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-simple"><div class="docs-select-all right" id="sa71199334"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-simple">"198<span class="token punctuation">.</span>51<span class="token punctuation">.</span>100<span class="token punctuation">.</span>44<span class="token operator">:</span>33061<span class="token punctuation">,</span><span class="token punctuation">[</span>2001<span class="token operator">:</span>db8<span class="token operator">:</span>85a3<span class="token operator">:</span>8d3<span class="token operator">:</span>1319<span class="token operator">:</span>8a2e<span class="token operator">:</span>370<span class="token operator">:</span>7348<span class="token punctuation">]</span><span class="token operator">:</span>33061<span class="token punctuation">,</span>example<span class="token punctuation">.</span>org<span class="token operator">:</span>33061"</code></pre>
</div>
<p>
The group communication engine for Group Replication (XCom)
checks that the supplied IP addresses are in a valid format,
and checks that you have not included any group members that
are currently unreachable. Otherwise, the new configuration is
not validated, so you must be careful to include only online
servers that are reachable members of the group. Any incorrect
values or invalid host names in the list could cause the group
to be blocked with an invalid configuration.
</p>
<p>
It is important before forcing a new membership configuration
to ensure that the servers to be excluded have been shut down.
If they are not, shut them down before proceeding. Group
members that are still online can automatically form new
configurations, and if this has already taken place, forcing a
further new configuration could create an artificial
split-brain situation for the group.
</p>
<p>
After you have used the
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_force_members">
<code class="literal">
group_replication_force_members
</code>
</a>
system variable to successfully force a new group membership
and unblock the group, ensure that you clear the system
variable.
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_force_members">
<code class="literal">
group_replication_force_members
</code>
</a>
must be empty in order to issue a
<a class="link" href="start-group-replication.html" title="15.4.3.1 START GROUP_REPLICATION Statement">
<code class="literal">
START
GROUP_REPLICATION
</code>
</a>
statement.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_group_name">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_group_name">
<code class="literal">
group_replication_group_name
</code>
</a>
</p>
<a class="indexterm" name="idm46045129794128">
</a>
<a class="indexterm" name="idm46045129793024">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_group_name">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-group-name=value
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_group_name">
group_replication_group_name
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<p>
The value of this system variable cannot be changed while
Group Replication is running.
</p>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_group_name">
<code class="literal">
group_replication_group_name
</code>
</a>
specifies the name of the group which this server instance
belongs to, which must be a valid UUID. This UUID forms part
of the GTIDs that are used when transactions received by group
members from clients, and view change events that are
generated internally by the group members, are written to the
binary log.
</p>
<div class="important" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Important
</div>
<p>
A unique UUID must be used.
</p>
</div>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_group_seeds">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_group_seeds">
<code class="literal">
group_replication_group_seeds
</code>
</a>
</p>
<a class="indexterm" name="idm46045129767904">
</a>
<a class="indexterm" name="idm46045129766800">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_group_seeds">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-group-seeds=value
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_group_seeds">
group_replication_group_seeds
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<p>
The value of this system variable can be changed while Group
Replication is running, but the change takes effect only after
you stop and restart Group Replication on the group member.
</p>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_group_seeds">
<code class="literal">
group_replication_group_seeds
</code>
</a>
is a list of group members to which a joining member can
connect to obtain details of all the current group members.
The joining member uses these details to select and connect to
a group member to obtain the data needed for synchrony with
the group. The list consists of a single internal network
address or host name for each included seed member, as
configured in the seed member's
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_local_address">
<code class="literal">
group_replication_local_address
</code>
</a>
system variable (not the seed member's SQL client connection,
as specified by MySQL Server's
<a class="link" href="server-system-variables.html#sysvar_hostname">
<code class="literal">
hostname
</code>
</a>
and
<a class="link" href="server-system-variables.html#sysvar_port">
<code class="literal">
port
</code>
</a>
system variables). The
addresses of the seed members are specified as a comma
separated list, such as
<code class="literal">
host1:port1
</code>
,
<code class="literal">
host2:port2
</code>
.
An IPv6 address must be specified in square brackets. For
example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-simple"><div class="docs-select-all right" id="sa42911683"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-simple">group_replication_group_seeds<span class="token operator">=</span> "198<span class="token punctuation">.</span>51<span class="token punctuation">.</span>100<span class="token punctuation">.</span>44<span class="token operator">:</span>33061<span class="token punctuation">,</span><span class="token punctuation">[</span>2001<span class="token operator">:</span>db8<span class="token operator">:</span>85a3<span class="token operator">:</span>8d3<span class="token operator">:</span>1319<span class="token operator">:</span>8a2e<span class="token operator">:</span>370<span class="token operator">:</span>7348<span class="token punctuation">]</span><span class="token operator">:</span>33061<span class="token punctuation">,</span> example<span class="token punctuation">.</span>org<span class="token operator">:</span>33061"</code></pre>
</div>
<p>
Note that the value you specify for this variable is not
validated until a
<a class="link" href="start-group-replication.html" title="15.4.3.1 START GROUP_REPLICATION Statement">
<code class="literal">
START
GROUP_REPLICATION
</code>
</a>
statement is issued and the Group
Communication System (GCS) is available.
</p>
<p>
Usually this list consists of all members of the group, but
you can choose a subset of the group members to be seeds. The
list must contain at least one valid member address. Each
address is validated when starting Group Replication. If the
list does not contain any valid member addresses, issuing
<a class="link" href="start-group-replication.html" title="15.4.3.1 START GROUP_REPLICATION Statement">
<code class="literal">
START GROUP_REPLICATION
</code>
</a>
fails.
</p>
<p>
When a server is joining a replication group, it attempts to
connect to the first seed member listed in its
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_group_seeds">
<code class="literal">
group_replication_group_seeds
</code>
</a>
system variable. If the connection is refused, the joining
member tries to connect to each of the other seed members in
the list in order. If the joining member connects to a seed
member but does not get added to the replication group as a
result (for example, because the seed member does not have the
joining member's address in its allowlist and closes the
connection), the joining member continues to try the remaining
seed members in the list in order.
</p>
<p>
A joining member must communicate with the seed member using
the same protocol (IPv4 or IPv6) that the seed member
advertises in the
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_group_seeds">
<code class="literal">
group_replication_group_seeds
</code>
</a>
option. For the purpose of IP address permissions for Group
Replication, the allowlist on the seed member must include an
IP address for the joining member for the protocol offered by
the seed member, or a host name that resolves to an address
for that protocol. This address or host name must be set up
and permitted in addition to the joining member's
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_local_address">
<code class="literal">
group_replication_local_address
</code>
</a>
if the protocol for that address does not match the seed
member's advertised protocol. If a joining member does not
have a permitted address for the appropriate protocol, its
connection attempt is refused. For more information, see
<a class="xref" href="group-replication-ip-address-permissions.html" title="20.6.4 Group Replication IP Address Permissions">
Section 20.6.4, “Group Replication IP Address Permissions”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_gtid_assignment_block_size">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_gtid_assignment_block_size">
<code class="literal">
group_replication_gtid_assignment_block_size
</code>
</a>
</p>
<a class="indexterm" name="idm46045129725056">
</a>
<a class="indexterm" name="idm46045129723936">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_gtid_assignment_block_size">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-gtid-assignment-block-size=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_gtid_assignment_block_size">
group_replication_gtid_assignment_block_size
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
1000000
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
1
</code>
</td>
</tr>
<tr>
<th>
Maximum Value (64-bit platforms)
</th>
<td>
<code class="literal">
9223372036854775807
</code>
</td>
</tr>
<tr>
<th>
Maximum Value (32-bit platforms)
</th>
<td>
<code class="literal">
4294967295
</code>
</td>
</tr>
</tbody>
</table>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
This system variable is a group-wide configuration setting,
and a full reboot of the replication group is required for a
change to take effect.
</p>
</div>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_gtid_assignment_block_size">
<code class="literal">
group_replication_gtid_assignment_block_size
</code>
</a>
specifies the number of consecutive GTIDs that are reserved
for each group member. Each member consumes its own blocks and
reserves more when needed.
</p>
<p>
This system variable is a group-wide configuration setting. It
must have the same value on all group members, cannot be
changed while Group Replication is running, and requires a
full reboot of the group (a bootstrap by a server with
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_bootstrap_group">
<code class="literal">
group_replication_bootstrap_group=ON
</code>
</a>
)
in order for the value change to take effect. For instructions
to safely bootstrap a group where transactions have been
executed and certified, see
<a class="xref" href="group-replication-restarting-group.html" title="20.5.2 Restarting a Group">
Section 20.5.2, “Restarting a Group”
</a>
.
</p>
<p>
If the group has a value set for this system variable, and a
joining member has a different value set for the system
variable, the joining member cannot join the group until the
value is changed to match. If the group members have a value
set for this system variable, and the joining member does not
support the system variable, it cannot join the group.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_ip_allowlist">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_ip_allowlist">
<code class="literal">
group_replication_ip_allowlist
</code>
</a>
</p>
<a class="indexterm" name="idm46045129685792">
</a>
<a class="indexterm" name="idm46045129684704">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_ip_allowlist">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-ip-allowlist=value
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_ip_allowlist">
group_replication_ip_allowlist
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
AUTOMATIC
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_ip_allowlist">
<code class="literal">
group_replication_ip_allowlist
</code>
</a>
specifies which hosts are permitted to connect to the group.
When the XCom communication stack is in use for the group
(
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_communication_stack">
<code class="literal">
group_replication_communication_stack=XCOM
</code>
</a>
),
the allowlist is used to control access to the group. When the
MySQL communication stack is in use for the group
(
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_communication_stack">
<code class="literal">
group_replication_communication_stack=MYSQL
</code>
</a>
),
user authentication is used to control access to the group,
and the allowlist is not used and is ignored if set.
</p>
<p>
The address that you specify for each group member in
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_local_address">
<code class="literal">
group_replication_local_address
</code>
</a>
must be permitted on the other servers in the replication
group. Note that the value you specify for this variable is
not validated until a
<a class="link" href="start-group-replication.html" title="15.4.3.1 START GROUP_REPLICATION Statement">
<code class="literal">
START
GROUP_REPLICATION
</code>
</a>
statement is issued and the Group
Communication System (GCS) is available.
</p>
<p>
By default, this system variable is set to
<code class="literal">
AUTOMATIC
</code>
, which permits connections from
private subnetworks active on the host. The group
communication engine for Group Replication (XCom)
automatically scans active interfaces on the host, and
identifies those with addresses on private subnetworks. These
addresses and the
<code class="literal">
localhost
</code>
IP address for
IPv4 and IPv6 are used to create the Group Replication
allowlist. For a list of the ranges from which addresses are
automatically permitted, see
<a class="xref" href="group-replication-ip-address-permissions.html" title="20.6.4 Group Replication IP Address Permissions">
Section 20.6.4, “Group Replication IP Address Permissions”
</a>
.
</p>
<p>
The automatic allowlist of private addresses cannot be used
for connections from servers outside the private network. For
Group Replication connections between server instances that
are on different machines, you must provide public IP
addresses and specify these as an explicit allowlist. If you
specify any entries for the allowlist, the private addresses
are not added automatically, so if you use any of these, you
must specify them explicitly. The
<code class="literal">
localhost
</code>
IP addresses are added automatically.
</p>
<p>
As the value of the
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_ip_allowlist">
<code class="literal">
group_replication_ip_allowlist
</code>
</a>
option, you can specify any combination of the following:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
IPv4 addresses (for example,
<code class="literal">
198.51.100.44
</code>
)
</p>
</li>
<li class="listitem">
<p>
IPv4 addresses with CIDR notation (for example,
<code class="literal">
192.0.2.21/24
</code>
)
</p>
</li>
<li class="listitem">
<p>
IPv6 addresses (for example,
<code class="literal">
2001:db8:85a3:8d3:1319:8a2e:370:7348
</code>
)
</p>
</li>
<li class="listitem">
<p>
IPv6 addresses using CIDR notation (for example,
<code class="literal">
2001:db8:85a3:8d3::/64
</code>
)
</p>
</li>
<li class="listitem">
<p>
Host names (for example,
<code class="literal">
example.org
</code>
)
</p>
</li>
<li class="listitem">
<p>
Host names with CIDR notation (for example,
<code class="literal">
www.example.com/24
</code>
)
</p>
</li>
</ul>
</div>
<p>
Host names can resolve to IPv4 addresses, IPv6 addresses, or
both. If a host name resolves to both an IPv4 and an IPv6
address, the IPv4 address is always used for Group Replication
connections. You can use CIDR notation in combination with
host names or IP addresses to permit a block of IP addresses
with a particular network prefix, but you should ensure that
all the IP addresses in the specified subnet are under your
control.
</p>
<p>
A comma must separate each entry in the allowlist. For
example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-none"><div class="docs-select-all right" id="sa63929790"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-none">"192.0.2.21/24,198.51.100.44,203.0.113.0/24,2001:db8:85a3:8d3:1319:8a2e:370:7348,example.org,www.example.com/24"</code></pre>
</div>
<p>
If any of the seed members for the group are listed in the
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_group_seeds">
<code class="literal">
group_replication_group_seeds
</code>
</a>
option with an IPv6 address when a joining member has an IPv4
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_local_address">
<code class="literal">
group_replication_local_address
</code>
</a>
,
or the reverse, you must also set up and permit an alternative
address for the joining member for the protocol offered by the
seed member (or a host name that resolves to an address for
that protocol). For more information, see
<a class="xref" href="group-replication-ip-address-permissions.html" title="20.6.4 Group Replication IP Address Permissions">
Section 20.6.4, “Group Replication IP Address Permissions”
</a>
.
</p>
<p>
It is possible to configure different allowlists on different
group members according to your security requirements, for
example, in order to keep different subnets separate. However,
this can cause issues when a group is reconfigured. If you do
not have a specific security requirement to do otherwise, use
the same allowlist on all members of a group. For more
details, see
<a class="xref" href="group-replication-ip-address-permissions.html" title="20.6.4 Group Replication IP Address Permissions">
Section 20.6.4, “Group Replication IP Address Permissions”
</a>
.
</p>
<p>
For host names, name resolution takes place only when a
connection request is made by another server. A host name that
cannot be resolved is not considered for allowlist validation,
and a warning message is written to the error log.
Forward-confirmed reverse DNS (FCrDNS) verification is carried
out for resolved host names.
</p>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Warning
</div>
<p>
Host names are inherently less secure than IP addresses in
an allowlist. FCrDNS verification provides a good level of
protection, but can be compromised by certain types of
attack. Specify host names in your allowlist only when
strictly necessary, and ensure that all components used for
name resolution, such as DNS servers, are maintained under
your control. You can also implement name resolution locally
using the hosts file, to avoid the use of external
components.
</p>
</div>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_local_address">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_local_address">
<code class="literal">
group_replication_local_address
</code>
</a>
</p>
<a class="indexterm" name="idm46045129625792">
</a>
<a class="indexterm" name="idm46045129624688">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_local_address">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-local-address=value
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_local_address">
group_replication_local_address
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<p>
The value of this system variable can be changed while Group
Replication is running, but the change takes effect only after
you stop and restart Group Replication on the group member.
</p>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_local_address">
<code class="literal">
group_replication_local_address
</code>
</a>
sets the network address which the member provides for
connections from other members, specified as a
<code class="literal">
host:port
</code>
formatted string. This address
must be reachable by all members of the group because it is
used by the group communication engine for Group Replication
(XCom, a Paxos variant) for TCP communication between remote
XCom instances. If you are using the MySQL communication stack
to establish group communication connections between members
(
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_communication_stack">
<code class="literal">
group_replication_communication_stack
</code>
</a>
= MYSQL), the address must be one of the IP addresses and
ports where MySQL Server is listening on, as specified by the
<a class="link" href="server-system-variables.html#sysvar_bind_address">
<code class="literal">
bind_address
</code>
</a>
system variable
for the server.
</p>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Warning
</div>
<p>
Do not use this address to query or administer the databases
on the member. This is not the SQL client connection host
and port.
</p>
</div>
<p>
The address or host name that you specify in
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_local_address">
<code class="literal">
group_replication_local_address
</code>
</a>
is used by Group Replication as the unique identifier for a
group member within the replication group. You can use the
same port for all members of a replication group as long as
the host names or IP addresses are all different, and you can
use the same host name or IP address for all members as long
as the ports are all different. The recommended port for
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_local_address">
<code class="literal">
group_replication_local_address
</code>
</a>
is 33061. Note that the value you specify for this variable is
not validated until the
<a class="link" href="start-group-replication.html" title="15.4.3.1 START GROUP_REPLICATION Statement">
<code class="literal">
START
GROUP_REPLICATION
</code>
</a>
statement is issued and the Group
Communication System (GCS) is available.
</p>
<p>
The network address configured by
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_local_address">
<code class="literal">
group_replication_local_address
</code>
</a>
must be resolvable by all group members. For example, if each
server instance is on a different machine with a fixed network
address, you could use the IP address of the machine, such as
10.0.0.1. If you use a host name, you must use a fully
qualified name, and ensure it is resolvable through DNS,
correctly configured
<code class="literal">
/etc/hosts
</code>
files, or
other name resolution processes. An IPv6 address must be
specified in square brackets in order to distinguish the port
number, for example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-simple"><div class="docs-select-all right" id="sa16587710"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-simple">group_replication_local_address<span class="token operator">=</span> "<span class="token punctuation">[</span>2001<span class="token operator">:</span>db8<span class="token operator">:</span>85a3<span class="token operator">:</span>8d3<span class="token operator">:</span>1319<span class="token operator">:</span>8a2e<span class="token operator">:</span>370<span class="token operator">:</span>7348<span class="token punctuation">]</span><span class="token operator">:</span>33061"</code></pre>
</div>
<p>
If a host name specified as the Group Replication local
address for a server instance resolves to both an IPv4 and an
IPv6 address, the IPv4 address is always used for Group
Replication connections. For more information on Group
Replication support for IPv6 networks and on replication
groups with a mix of members using IPv4 and members using
IPv6, see
<a class="xref" href="group-replication-ipv6.html" title="20.5.5 Support For IPv6 And For Mixed IPv6 And IPv4 Groups">
Section 20.5.5, “Support For IPv6 And For Mixed IPv6 And IPv4 Groups”
</a>
.
</p>
<p>
If you are using the XCom communication stack to establish
group communication connections between members
(
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_communication_stack">
<code class="literal">
group_replication_communication_stack
= XCOM
</code>
</a>
), the address that you specify for each group
member in
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_local_address">
<code class="literal">
group_replication_local_address
</code>
</a>
must be added to the list for the
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_ip_allowlist">
<code class="literal">
group_replication_ip_allowlist
</code>
</a>
system variable on the other servers in the replication group.
When the XCom communication stack is in use for the group, the
allowlist is used to control access to the group. When the
MySQL communication stack is in use for the group, user
authentication is used to control access to the group, and the
allowlist is not used and is ignored if set. If any of the
seed members for the group are listed in
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_group_seeds">
<code class="literal">
group_replication_group_seeds
</code>
</a>
with an IPv6 address when this member has an IPv4
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_local_address">
<code class="literal">
group_replication_local_address
</code>
</a>
,
or the reverse, you must also set up and permit an alternative
address for this member for the required protocol (or a host
name that resolves to an address for that protocol). For more
information, see
<a class="xref" href="group-replication-ip-address-permissions.html" title="20.6.4 Group Replication IP Address Permissions">
Section 20.6.4, “Group Replication IP Address Permissions”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_member_expel_timeout">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_member_expel_timeout">
<code class="literal">
group_replication_member_expel_timeout
</code>
</a>
</p>
<a class="indexterm" name="idm46045129576688">
</a>
<a class="indexterm" name="idm46045129575648">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_member_expel_timeout">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-member-expel-timeout=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_member_expel_timeout">
group_replication_member_expel_timeout
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
5
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
3600
</code>
</td>
</tr>
<tr>
<th>
Unit
</th>
<td>
seconds
</td>
</tr>
</tbody>
</table>
</div>
<p>
The value of this system variable can be changed while Group
Replication is running, and the change takes effect
immediately. The current value of the system variable is read
whenever Group Replication checks the timeout. It is not
mandatory for all members of a group to have the same setting,
but it is recommended in order to avoid unexpected expulsions.
</p>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_member_expel_timeout">
<code class="literal">
group_replication_member_expel_timeout
</code>
</a>
specifies the period of time in seconds that a Group
Replication group member waits after creating a suspicion,
before expelling from the group the member suspected of having
failed. The initial 5-second detection period before a
suspicion is created does not count as part of this time. The
value of
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_member_expel_timeout">
<code class="literal">
group_replication_member_expel_timeout
</code>
</a>
defaults to 5, meaning that a suspected member is liable for
expulsion 5 seconds after the 5-second detection period.
</p>
<p>
Changing the value of
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_member_expel_timeout">
<code class="literal">
group_replication_member_expel_timeout
</code>
</a>
on a group member takes effect immediately for existing as
well as future suspicions on that group member. You can
therefore use this as a method to force a suspicion to time
out and expel a suspected member, allowing changes to the
group configuration. For more information, see
<a class="xref" href="group-replication-responses-failure-expel.html" title="20.7.7.1 Expel Timeout">
Section 20.7.7.1, “Expel Timeout”
</a>
.
</p>
<p>
Increasing the value of
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_member_expel_timeout">
<code class="literal">
group_replication_member_expel_timeout
</code>
</a>
can help to avoid unnecessary expulsions on slower or less
stable networks, or in the case of expected transient network
outages or machine slowdowns. If a suspect member becomes
active again before the suspicion times out, it applies all
the messages that were buffered by the remaining group members
and enters
<code class="literal">
ONLINE
</code>
state, without operator
intervention. You can specify a timeout value up to a maximum
of 3600 seconds (1 hour). It is important to ensure that
XCom's message cache is sufficiently large to contain the
expected volume of messages in your specified time period,
plus the initial 5-second detection period, otherwise members
are unable to reconnect. You can adjust the cache size limit
using the
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_message_cache_size">
<code class="literal">
group_replication_message_cache_size
</code>
</a>
system variable. For more information, see
<a class="xref" href="group-replication-performance-xcom-cache.html" title="20.7.6 XCom Cache Management">
Section 20.7.6, “XCom Cache Management”
</a>
.
</p>
<p>
If the timeout is exceeded, the suspect member is liable for
expulsion immediately after the suspicion times out. If the
member is able to resume communications and receives a view
where it is expelled, and the member has the
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_autorejoin_tries">
<code class="literal">
group_replication_autorejoin_tries
</code>
</a>
system variable set to specify a number of auto-rejoin
attempts, it proceeds to make the specified number of attempts
to rejoin the group while in super read only mode. If the
member does not have any auto-rejoin attempts specified, or if
it has exhausted the specified number of attempts, it follows
the action specified by the system variable
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_exit_state_action">
<code class="literal">
group_replication_exit_state_action
</code>
</a>
.
</p>
<p>
For more information on using the
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_member_expel_timeout">
<code class="literal">
group_replication_member_expel_timeout
</code>
</a>
setting, see
<a class="xref" href="group-replication-responses-failure-expel.html" title="20.7.7.1 Expel Timeout">
Section 20.7.7.1, “Expel Timeout”
</a>
.
For alternative mitigation strategies to avoid unnecessary
expulsions where this system variable is not available, see
<a class="xref" href="group-replication-limitations.html" title="20.3.2 Group Replication Limitations">
Section 20.3.2, “Group Replication Limitations”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_member_weight">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_member_weight">
<code class="literal">
group_replication_member_weight
</code>
</a>
</p>
<a class="indexterm" name="idm46045129524960">
</a>
<a class="indexterm" name="idm46045129523856">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_member_weight">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-member-weight=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_member_weight">
group_replication_member_weight
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
50
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
100
</code>
</td>
</tr>
<tr>
<th>
Unit
</th>
<td>
percentage
</td>
</tr>
</tbody>
</table>
</div>
<p>
The value of this system variable can be changed while Group
Replication is running, and the change takes effect
immediately. The system variable's current value is read when
a failover situation occurs.
</p>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_member_weight">
<code class="literal">
group_replication_member_weight
</code>
</a>
specifies a percentage weight that can be assigned to members
to influence the chance of the member being elected as primary
in the event of failover, for example when the existing
primary leaves a single-primary group. Assign numeric weights
to members to ensure that specific members are elected, for
example during scheduled maintenance of the primary or to
ensure certain hardware is prioritized in the event of
failover.
</p>
<p>
For a group with members configured as follows:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
<code class="literal">
member-1
</code>
:
group_replication_member_weight=30, server_uuid=aaaa
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
member-2
</code>
:
group_replication_member_weight=40, server_uuid=bbbb
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
member-3
</code>
:
group_replication_member_weight=40, server_uuid=cccc
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
member-4
</code>
:
group_replication_member_weight=40, server_uuid=dddd
</p>
</li>
</ul>
</div>
<p>
during election of a new primary the members above would be
sorted as
<code class="literal">
member-2
</code>
,
<code class="literal">
member-3
</code>
,
<code class="literal">
member-4
</code>
, and
<code class="literal">
member-1
</code>
. This results in
<code class="literal">
member
</code>
-2 being chosen as the new primary in
the event of failover. For more information, see
<a class="xref" href="group-replication-single-primary-mode.html" title="20.1.3.1 Single-Primary Mode">
Section 20.1.3.1, “Single-Primary Mode”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_message_cache_size">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_message_cache_size">
<code class="literal">
group_replication_message_cache_size
</code>
</a>
</p>
<a class="indexterm" name="idm46045129477936">
</a>
<a class="indexterm" name="idm46045129476896">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_message_cache_size">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-message-cache-size=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_message_cache_size">
group_replication_message_cache_size
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
1073741824 (1 GB)
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
134217728 (128 MB)
</code>
</td>
</tr>
<tr>
<th>
Maximum Value (64-bit platforms)
</th>
<td>
<code class="literal">
18446744073709551615 (16 EiB)
</code>
</td>
</tr>
<tr>
<th>
Maximum Value (32-bit platforms)
</th>
<td>
<code class="literal">
315360004294967295 (4 GB)
</code>
</td>
</tr>
<tr>
<th>
Unit
</th>
<td>
bytes
</td>
</tr>
</tbody>
</table>
</div>
<p>
This system variable should have the same value on all group
members. The value of this system variable can be changed
while Group Replication is running. The change takes effect on
each group member after you stop and restart Group Replication
on the member. During this process, the value of the system
variable is permitted to differ between group members, but
members might be unable to reconnect in the event of a
disconnection.
</p>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_message_cache_size">
<code class="literal">
group_replication_message_cache_size
</code>
</a>
sets the maximum amount of memory that is available for the
message cache in the group communication engine for Group
Replication (XCom). The XCom message cache holds messages (and
their metadata) that are exchanged between the group members
as a part of the consensus protocol. Among other functions,
the message cache is used for recovery of missed messages by
members that reconnect with the group after a period where
they were unable to communicate with the other group members.
</p>
<p>
The
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_member_expel_timeout">
<code class="literal">
group_replication_member_expel_timeout
</code>
</a>
system variable determines the waiting period (up to an hour)
that is allowed in addition to the initial 5-second detection
period for members to return to the group rather than being
expelled. The size of the XCom message cache should be set
with reference to the expected volume of messages in this time
period, so that it contains all the missed messages required
for members to return successfully. The default is a 5-second
waiting period after the 5-second detection period, for a
total time period of 10 seconds.
</p>
<p>
Ensure that sufficient memory is available on your system for
your chosen cache size limit, considering the size of the
server's other caches and object pools. The default
setting is 1073741824 bytes (1 GB). The minimum setting of
134217728 bytes (128 MB) enables deployment on a host that has
a restricted amount of available memory, and good network
connectivity to minimize the frequency and duration of
transient losses of connectivity for group members. Note that
the limit set using
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_message_cache_size">
<code class="literal">
group_replication_message_cache_size
</code>
</a>
applies only to the data stored in the cache, and the cache
structures require an additional 50 MB of memory.
</p>
<p>
The cache size limit can be increased or reduced dynamically
at runtime. If you reduce the cache size limit, XCom removes
the oldest entries that have been decided and delivered until
the current size is below the limit. Group Replication's Group
Communication System (GCS) alerts you, by a warning message,
when a message that is likely to be needed for recovery by a
member that is currently unreachable is removed from the
message cache. For more information on tuning the message
cache size, see
<a class="xref" href="group-replication-performance-xcom-cache.html" title="20.7.6 XCom Cache Management">
Section 20.7.6, “XCom Cache Management”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_paxos_single_leader">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_paxos_single_leader">
<code class="literal">
group_replication_paxos_single_leader
</code>
</a>
</p>
<a class="indexterm" name="idm46045129432832">
</a>
<a class="indexterm" name="idm46045129431792">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_paxos_single_leader">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-paxos-single-leader[={OFF|ON}]
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_paxos_single_leader">
group_replication_paxos_single_leader
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
OFF
</code>
</td>
</tr>
</tbody>
</table>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
This system variable is a group-wide configuration setting,
and a full reboot of the replication group is required for a
change to take effect.
</p>
</div>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_paxos_single_leader">
<code class="literal">
group_replication_paxos_single_leader
</code>
</a>
enables the group communication engine to operate with a
single consensus leader when the group is in single-primary
mode. With the default setting
<code class="literal">
OFF
</code>
, this
behavior is disabled, and every member of the group is used as
a leader, which is the behavior in releases before this system
variable was available. When this variable is set to
<code class="literal">
ON
</code>
, the group communication engine can use
a single leader to drive consensus. Operating with a single
consensus leader improves performance and resilience in
single-primary mode, particularly when some of the group’s
secondary members are currently unreachable. For more
information, see
<a class="xref" href="group-replication-single-consensus-leader.html" title="20.7.3 Single Consensus Leader">
Section 20.7.3, “Single Consensus Leader”
</a>
.
</p>
<p>
In order for the group communication engine to use a single
consensus leader, the group's communication protocol
version must be MySQL 8.0.27 or later. Use
<a class="link" href="group-replication-functions-for-communication-protocol.html#function_group-replication-get-communication-protocol">
<code class="literal">
group_replication_get_communication_protocol()
</code>
</a>
to obtain the group's communication protocol version. If
a lower version is in use, the group cannot use this behavior.
You can use
<a class="link" href="group-replication-functions-for-communication-protocol.html#function_group-replication-set-communication-protocol">
<code class="literal">
group_replication_set_communication_protocol()
</code>
</a>
to set the communication protocol to a higher version if all
group members support it. For more information, see
<a class="xref" href="group-replication-communication-protocol.html" title="20.5.1.4 Setting a Group's Communication Protocol Version">
Section 20.5.1.4, “Setting a Group's Communication Protocol Version”
</a>
.
</p>
<p>
This system variable is a group-wide configuration setting. It
must have the same value on all group members, cannot be
changed while Group Replication is running, and requires a
full reboot of the group (a bootstrap by a server with
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_bootstrap_group">
<code class="literal">
group_replication_bootstrap_group=ON
</code>
</a>
)
in order for the value change to take effect. For instructions
to safely bootstrap a group where transactions have been
executed and certified, see
<a class="xref" href="group-replication-restarting-group.html" title="20.5.2 Restarting a Group">
Section 20.5.2, “Restarting a Group”
</a>
.
</p>
<p>
If the group has a value set for this system variable, and a
joining member has a different value set for the system
variable, the joining member cannot join the group until the
value is changed to match. If the group members have a value
set for this system variable, and the joining member does not
support the system variable, it cannot join the group.
</p>
<p>
The
<code class="literal">
WRITE_CONSENSUS_SINGLE_LEADER_CAPABLE
</code>
column of the Performance Schema table
<a class="link" href="performance-schema-replication-group-communication-information-table.html" title="29.12.11.10 The replication_group_communication_information Table">
<code class="literal">
replication_group_communication_information
</code>
</a>
shows whether the group supports the use of a single leader,
even if
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_paxos_single_leader">
<code class="literal">
group_replication_paxos_single_leader
</code>
</a>
is currently set to
<code class="literal">
OFF
</code>
on the queried
member. The column value is 1 if the group was started with
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_paxos_single_leader">
<code class="literal">
group_replication_paxos_single_leader
</code>
</a>
set to
<code class="literal">
ON
</code>
, and its communication protocol
version is MySQL 8.0.27 or later.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_poll_spin_loops">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_poll_spin_loops">
<code class="literal">
group_replication_poll_spin_loops
</code>
</a>
</p>
<a class="indexterm" name="idm46045129386816">
</a>
<a class="indexterm" name="idm46045129385776">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_poll_spin_loops">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-poll-spin-loops=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_poll_spin_loops">
group_replication_poll_spin_loops
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value (64-bit platforms)
</th>
<td>
<code class="literal">
18446744073709551615
</code>
</td>
</tr>
<tr>
<th>
Maximum Value (32-bit platforms)
</th>
<td>
<code class="literal">
4294967295
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
The value of this system variable can be changed while Group
Replication is running, but the change takes effect only after
you stop and restart Group Replication on the group member.
</p>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_poll_spin_loops">
<code class="literal">
group_replication_poll_spin_loops
</code>
</a>
specifies the number of times the group communication thread
waits for the communication engine mutex to be released before
the thread waits for more incoming network messages.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_preemptive_garbage_collection">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_preemptive_garbage_collection">
<code class="literal">
group_replication_preemptive_garbage_collection
</code>
</a>
</p>
<a class="indexterm" name="idm46045129351696">
</a>
<a class="indexterm" name="idm46045129350656">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_preemptive_garbage_collection">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-preemptive-garbage-collection[=ON|OFF]
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_preemptive_garbage_collection">
group_replication_preemptive_garbage_collection
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
OFF
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Enable preemptive garbage collection in single-primary mode
(only), keeping only the write sets for those transactions
that have not yet been committed in the database.
</p>
<p>
In single-primary mode it is possible to clean up write sets
for a given transaction earlier than in multi-primary mode;
this is because conflicts are detected and handled by the
database lock manager in the server while transactions are
executing; thus, the write sets are useful only for
calculating dependencies between transactions, and not for
conflict detection. This means that write sets can be cleaned
up as soon as the transaction to which they belong is tracked
in the Group Replication transaction dependency and conflict
detection module.
</p>
<p>
The aggressive purging of write sets which is performed when
<code class="literal">
group_replication_preemptive_garbage_collection
</code>
is enabled has the following effects:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
Reduction in memory used to keep write sets in memory
</p>
</li>
<li class="listitem">
<p>
Reduction of the impact of lagging secondaries on the
tracking of write sets on the primary
</p>
</li>
<li class="listitem">
<p>
Reduction of the amount of time that the write set
database lock is held per round of write set deletion, and
thus a reduction of its impact on throughput
</p>
</li>
</ul>
</div>
<p>
The value of
<code class="literal">
group_replication_preemptive_garbage_collection
</code>
can be changed only when Group Replication is not running, and
has no effect on a group running in multi-primary mode. In
addition, when this system variable is enabled, it is not
possible to change between multi-primary mode and
single-primary mode (see
<a class="xref" href="group-replication-changing-group-mode.html" title="20.5.1.2 Changing the Group Mode">
Section 20.5.1.2, “Changing the Group Mode”
</a>
).
</p>
<p>
<code class="literal">
group_replication_preemptive_garbage_collection
</code>
must be set to the same value on all group members. A new
joiner's
<code class="literal">
group_replication_preemptive_garbage_collection
</code>
value must be the same as those of all the group's
current members, else it cannot join.
</p>
<p>
A group member running a version of MySQL previous to 8.4.0
sends no
<code class="literal">
group_replication_preemptive_garbage_collection
</code>
value; in such cases, the value is considered to be
<code class="literal">
OFF
</code>
.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_preemptive_garbage_collection_rows_threshold">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_preemptive_garbage_collection_rows_threshold">
<code class="literal">
group_replication_preemptive_garbage_collection_rows_threshold
</code>
</a>
</p>
<a class="indexterm" name="idm46045129313936">
</a>
<a class="indexterm" name="idm46045129312784">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_preemptive_garbage_collection_rows_threshold">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-preemptive-garbage-collection-rows-threshold=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_preemptive_garbage_collection_rows_threshold">
group_replication_preemptive_garbage_collection_rows_threshold
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
100000
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
10000
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
100000000
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
When preemptive garbage collection in single-primary mode is
enabled
(
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_preemptive_garbage_collection">
<code class="literal">
group_replication_preemptive_garbage_collection
</code>
</a>
is
<code class="literal">
ON
</code>
), this is the number of rows of
certification information needed to trigger its use.
</p>
<p>
This variable has no effect on a group running in
multi-primary mode.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_recovery_compression_algorithms">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_compression_algorithms">
<code class="literal">
group_replication_recovery_compression_algorithms
</code>
</a>
</p>
<a class="indexterm" name="idm46045129280240">
</a>
<a class="indexterm" name="idm46045129279200">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_recovery_compression_algorithms">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-recovery-compression-algorithms=value
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_compression_algorithms">
group_replication_recovery_compression_algorithms
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Set
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
uncompressed
</code>
</td>
</tr>
<tr>
<th>
Valid Values
</th>
<td>
<p class="valid-value">
<code class="literal">
zlib
</code>
</p>
<p class="valid-value">
<code class="literal">
zstd
</code>
</p>
<p class="valid-value">
<code class="literal">
uncompressed
</code>
</p>
</td>
</tr>
</tbody>
</table>
</div>
<p>
<code class="literal">
group_replication_recovery_compression_algorithms
</code>
specifies the compression algorithms permitted for Group
Replication distributed recovery connections for state
transfer from a donor's binary log. The available
algorithms are the same as for the
<a class="link" href="server-system-variables.html#sysvar_protocol_compression_algorithms">
<code class="literal">
protocol_compression_algorithms
</code>
</a>
system variable. For more information, see
<a class="xref" href="connection-compression-control.html" title="6.2.8 Connection Compression Control">
Section 6.2.8, “Connection Compression Control”
</a>
.
</p>
<p>
The value of this system variable can be changed while Group
Replication is running, but the change takes effect only after
you stop and restart Group Replication on the group member.
</p>
<p>
This setting does not apply if the server has been set up to
support cloning (see
<a class="xref" href="group-replication-cloning.html" title="20.5.4.2 Cloning for Distributed Recovery">
Section 20.5.4.2, “Cloning for Distributed Recovery”
</a>
) and a remote
cloning operation is used during distributed recovery. For
this method of state transfer, the clone plugin's
<a class="link" href="clone-plugin-options-variables.html#sysvar_clone_enable_compression">
<code class="literal">
clone_enable_compression
</code>
</a>
setting applies.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_recovery_get_public_key">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_get_public_key">
<code class="literal">
group_replication_recovery_get_public_key
</code>
</a>
</p>
<a class="indexterm" name="idm46045129243424">
</a>
<a class="indexterm" name="idm46045129242304">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_recovery_get_public_key">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-recovery-get-public-key[={OFF|ON}]
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_get_public_key">
group_replication_recovery_get_public_key
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
OFF
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
The value of this system variable can be changed while Group
Replication is running, but the change takes effect only after
you stop and restart Group Replication on the group member.
</p>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_get_public_key">
<code class="literal">
group_replication_recovery_get_public_key
</code>
</a>
specifies whether to request from the source the public key
required for RSA key pair-based password exchange. If
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_public_key_path">
<code class="literal">
group_replication_recovery_public_key_path
</code>
</a>
is set to a valid public key file, it takes precedence over
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_get_public_key">
<code class="literal">
group_replication_recovery_get_public_key
</code>
</a>
.
This variable applies if you are not using SSL for distributed
recovery over the
<code class="literal">
group_replication_recovery
</code>
channel
(
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_use_ssl">
<code class="literal">
group_replication_recovery_use_ssl=ON
</code>
</a>
),
and the replication user account for Group Replication
authenticates with the
<code class="literal">
caching_sha2_password
</code>
plugin (the default).
For more details, see
<a class="xref" href="group-replication-secure-user.html#group-replication-caching-sha2-user-credentials" title="20.6.3.1.1 Replication User With The Caching SHA-2 Authentication Plugin">
Section 20.6.3.1.1, “Replication User With The Caching SHA-2 Authentication Plugin”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_recovery_public_key_path">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_public_key_path">
<code class="literal">
group_replication_recovery_public_key_path
</code>
</a>
</p>
<a class="indexterm" name="idm46045129209104">
</a>
<a class="indexterm" name="idm46045129207984">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_recovery_public_key_path">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-recovery-public-key-path=file_name
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_public_key_path">
group_replication_recovery_public_key_path
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
File name
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
empty string
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
The value of this system variable can be changed while Group
Replication is running, but the change takes effect only after
you stop and restart Group Replication on the group member.
</p>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_public_key_path">
<code class="literal">
group_replication_recovery_public_key_path
</code>
</a>
specifies the path name to a file containing a replica-side
copy of the public key required by the source for RSA key
pair-based password exchange. The file must be in PEM format.
If
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_public_key_path">
<code class="literal">
group_replication_recovery_public_key_path
</code>
</a>
is set to a valid public key file, it takes precedence over
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_get_public_key">
<code class="literal">
group_replication_recovery_get_public_key
</code>
</a>
.
This variable applies if you are not using SSL for distributed
recovery over the
<code class="literal">
group_replication_recovery
</code>
channel (so
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_use_ssl">
<code class="literal">
group_replication_recovery_use_ssl
</code>
</a>
is set to
<code class="literal">
OFF
</code>
), and the replication user
account for Group Replication authenticates with the
<code class="literal">
caching_sha2_password
</code>
plugin (the default)
or the
<code class="literal">
sha256_password
</code>
plugin (deprecated).
(For
<code class="literal">
sha256_password
</code>
, setting
<code class="literal">
group_replication_recovery_public_key_path
</code>
applies only if MySQL was built using OpenSSL.) For more
details, see
<a class="xref" href="group-replication-secure-user.html#group-replication-caching-sha2-user-credentials" title="20.6.3.1.1 Replication User With The Caching SHA-2 Authentication Plugin">
Section 20.6.3.1.1, “Replication User With The Caching SHA-2 Authentication Plugin”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_recovery_reconnect_interval">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_reconnect_interval">
<code class="literal">
group_replication_recovery_reconnect_interval
</code>
</a>
</p>
<a class="indexterm" name="idm46045129171664">
</a>
<a class="indexterm" name="idm46045129170544">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_recovery_reconnect_interval">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-recovery-reconnect-interval=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_reconnect_interval">
group_replication_recovery_reconnect_interval
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
60
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
31536000
</code>
</td>
</tr>
<tr>
<th>
Unit
</th>
<td>
seconds
</td>
</tr>
</tbody>
</table>
</div>
<p>
The value of this system variable can be changed while Group
Replication is running, but the change takes effect only after
you stop and restart Group Replication on the group member.
</p>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_reconnect_interval">
<code class="literal">
group_replication_recovery_reconnect_interval
</code>
</a>
specifies the sleep time, in seconds, between reconnection
attempts when no suitable donor was found in the group for
distributed recovery.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_recovery_retry_count">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_retry_count">
<code class="literal">
group_replication_recovery_retry_count
</code>
</a>
</p>
<a class="indexterm" name="idm46045129136752">
</a>
<a class="indexterm" name="idm46045129135712">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_recovery_retry_count">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-recovery-retry-count=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_retry_count">
group_replication_recovery_retry_count
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
10
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
31536000
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
The value of this system variable can be changed while Group
Replication is running, but the change takes effect only after
you stop and restart Group Replication on the group member.
</p>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_retry_count">
<code class="literal">
group_replication_recovery_retry_count
</code>
</a>
specifies the number of times that the member that is joining
tries to connect to the available donors for distributed
recovery before giving up.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_recovery_ssl_ca">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_ssl_ca">
<code class="literal">
group_replication_recovery_ssl_ca
</code>
</a>
</p>
<a class="indexterm" name="idm46045129104080">
</a>
<a class="indexterm" name="idm46045129103040">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_recovery_ssl_ca">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-recovery-ssl-ca=value
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_ssl_ca">
group_replication_recovery_ssl_ca
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<p>
The value of this system variable can be changed while Group
Replication is running, but the change takes effect only after
you stop and restart Group Replication on the group member.
</p>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_ssl_ca">
<code class="literal">
group_replication_recovery_ssl_ca
</code>
</a>
specifies the path to a file that contains a list of trusted
SSL certificate authorities for distributed recovery
connections. See
<a class="xref" href="group-replication-secure-socket-layer-support-ssl.html" title="20.6.2 Securing Group Communication Connections with Secure Socket Layer (SSL)">
Section 20.6.2, “Securing Group Communication Connections with Secure Socket Layer (SSL)”
</a>
for information on configuring SSL for distributed recovery.
</p>
<p>
If this server has been set up to support cloning (see
<a class="xref" href="group-replication-cloning.html" title="20.5.4.2 Cloning for Distributed Recovery">
Section 20.5.4.2, “Cloning for Distributed Recovery”
</a>
), and you have set
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_use_ssl">
<code class="literal">
group_replication_recovery_use_ssl
</code>
</a>
to
<code class="literal">
ON
</code>
, Group Replication automatically
configures the setting for the clone SSL option
<a class="link" href="clone-plugin-options-variables.html#sysvar_clone_ssl_ca">
<code class="literal">
clone_ssl_ca
</code>
</a>
to match your
setting for
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_ssl_ca">
<code class="literal">
group_replication_recovery_ssl_ca
</code>
</a>
.
</p>
<p>
When the MySQL communication stack is in use for the group
(
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_communication_stack">
<code class="literal">
group_replication_communication_stack
= MYSQL
</code>
</a>
), this setting is used for the TLS/SSL
configuration for group communication connections, as well as
for distributed recovery connections.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_recovery_ssl_capath">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_ssl_capath">
<code class="literal">
group_replication_recovery_ssl_capath
</code>
</a>
</p>
<a class="indexterm" name="idm46045129070080">
</a>
<a class="indexterm" name="idm46045129069040">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_recovery_ssl_capath">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-recovery-ssl-capath=value
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_ssl_capath">
group_replication_recovery_ssl_capath
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<p>
The value of this system variable can be changed while Group
Replication is running, but the change takes effect only after
you stop and restart Group Replication on the group member.
</p>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_ssl_capath">
<code class="literal">
group_replication_recovery_ssl_capath
</code>
</a>
specifies the path to a directory that contains trusted SSL
certificate authority certificates for distributed recovery
connections. See
<a class="xref" href="group-replication-secure-socket-layer-support-ssl.html" title="20.6.2 Securing Group Communication Connections with Secure Socket Layer (SSL)">
Section 20.6.2, “Securing Group Communication Connections with Secure Socket Layer (SSL)”
</a>
for information on configuring SSL for distributed recovery.
</p>
<p>
When the MySQL communication stack is in use for the group
(
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_communication_stack">
<code class="literal">
group_replication_communication_stack
= MYSQL
</code>
</a>
), this setting is used for the TLS/SSL
configuration for group communication connections, as well as
for distributed recovery connections.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_recovery_ssl_cert">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_ssl_cert">
<code class="literal">
group_replication_recovery_ssl_cert
</code>
</a>
</p>
<a class="indexterm" name="idm46045129041872">
</a>
<a class="indexterm" name="idm46045129040832">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_recovery_ssl_cert">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-recovery-ssl-cert=value
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_ssl_cert">
group_replication_recovery_ssl_cert
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<p>
The value of this system variable can be changed while Group
Replication is running, but the change takes effect only after
you stop and restart Group Replication on the group member.
</p>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_ssl_cert">
<code class="literal">
group_replication_recovery_ssl_cert
</code>
</a>
specifies the name of the SSL certificate file to use for
establishing a secure connection for distributed recovery. See
<a class="xref" href="group-replication-secure-socket-layer-support-ssl.html" title="20.6.2 Securing Group Communication Connections with Secure Socket Layer (SSL)">
Section 20.6.2, “Securing Group Communication Connections with Secure Socket Layer (SSL)”
</a>
for information on configuring SSL for distributed recovery.
</p>
<p>
If this server has been set up to support cloning (see
<a class="xref" href="group-replication-cloning.html" title="20.5.4.2 Cloning for Distributed Recovery">
Section 20.5.4.2, “Cloning for Distributed Recovery”
</a>
), and you have set
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_use_ssl">
<code class="literal">
group_replication_recovery_use_ssl
</code>
</a>
to
<code class="literal">
ON
</code>
, Group Replication automatically
configures the setting for the clone SSL option
<a class="link" href="clone-plugin-options-variables.html#sysvar_clone_ssl_cert">
<code class="literal">
clone_ssl_cert
</code>
</a>
to match your
setting for
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_ssl_cert">
<code class="literal">
group_replication_recovery_ssl_cert
</code>
</a>
.
</p>
<p>
When the MySQL communication stack is in use for the group
(
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_communication_stack">
<code class="literal">
group_replication_communication_stack
= MYSQL
</code>
</a>
), this setting is used for the TLS/SSL
configuration for group communication connections, as well as
for distributed recovery connections.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_recovery_ssl_cipher">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_ssl_cipher">
<code class="literal">
group_replication_recovery_ssl_cipher
</code>
</a>
</p>
<a class="indexterm" name="idm46045129007888">
</a>
<a class="indexterm" name="idm46045129006848">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_recovery_ssl_cipher">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-recovery-ssl-cipher=value
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_ssl_cipher">
group_replication_recovery_ssl_cipher
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<p>
The value of this system variable can be changed while Group
Replication is running, but the change takes effect only after
you stop and restart Group Replication on the group member.
</p>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_ssl_cipher">
<code class="literal">
group_replication_recovery_ssl_cipher
</code>
</a>
specifies the list of permissible ciphers for SSL encryption.
See
<a class="xref" href="group-replication-secure-socket-layer-support-ssl.html" title="20.6.2 Securing Group Communication Connections with Secure Socket Layer (SSL)">
Section 20.6.2, “Securing Group Communication Connections with Secure Socket Layer (SSL)”
</a>
for information on configuring SSL for distributed recovery.
</p>
<p>
When the MySQL communication stack is in use for the group
(
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_communication_stack">
<code class="literal">
group_replication_communication_stack
= MYSQL
</code>
</a>
), this setting is used for the TLS/SSL
configuration for group communication connections, as well as
for distributed recovery connections.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_recovery_ssl_crl">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_ssl_crl">
<code class="literal">
group_replication_recovery_ssl_crl
</code>
</a>
</p>
<a class="indexterm" name="idm46045128979824">
</a>
<a class="indexterm" name="idm46045128978784">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_recovery_ssl_crl">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-recovery-ssl-crl=value
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_ssl_crl">
group_replication_recovery_ssl_crl
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
File name
</td>
</tr>
</tbody>
</table>
</div>
<p>
The value of this system variable can be changed while Group
Replication is running, but the change takes effect only after
you stop and restart Group Replication on the group member.
</p>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_ssl_crl">
<code class="literal">
group_replication_recovery_ssl_crl
</code>
</a>
specifies the path to a directory that contains files
containing certificate revocation lists. See
<a class="xref" href="group-replication-secure-socket-layer-support-ssl.html" title="20.6.2 Securing Group Communication Connections with Secure Socket Layer (SSL)">
Section 20.6.2, “Securing Group Communication Connections with Secure Socket Layer (SSL)”
</a>
for information on configuring SSL for distributed recovery.
</p>
<p>
When the MySQL communication stack is in use for the group
(
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_communication_stack">
<code class="literal">
group_replication_communication_stack
= MYSQL
</code>
</a>
), this setting is used for the TLS/SSL
configuration for group communication connections, as well as
for distributed recovery connections.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_recovery_ssl_crlpath">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_ssl_crlpath">
<code class="literal">
group_replication_recovery_ssl_crlpath
</code>
</a>
</p>
<a class="indexterm" name="idm46045128951728">
</a>
<a class="indexterm" name="idm46045128950688">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_recovery_ssl_crlpath">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-recovery-ssl-crlpath=value
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_ssl_crlpath">
group_replication_recovery_ssl_crlpath
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Directory name
</td>
</tr>
</tbody>
</table>
</div>
<p>
The value of this system variable can be changed while Group
Replication is running, but the change takes effect only after
you stop and restart Group Replication on the group member.
</p>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_ssl_crlpath">
<code class="literal">
group_replication_recovery_ssl_crlpath
</code>
</a>
specifies the path to a directory that contains files
containing certificate revocation lists. See
<a class="xref" href="group-replication-secure-socket-layer-support-ssl.html" title="20.6.2 Securing Group Communication Connections with Secure Socket Layer (SSL)">
Section 20.6.2, “Securing Group Communication Connections with Secure Socket Layer (SSL)”
</a>
for information on configuring SSL for distributed recovery.
</p>
<p>
When the MySQL communication stack is in use for the group
(
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_communication_stack">
<code class="literal">
group_replication_communication_stack
= MYSQL
</code>
</a>
), this setting is used for the TLS/SSL
configuration for group communication connections, as well as
for distributed recovery connections.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_recovery_ssl_key">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_ssl_key">
<code class="literal">
group_replication_recovery_ssl_key
</code>
</a>
</p>
<a class="indexterm" name="idm46045128923632">
</a>
<a class="indexterm" name="idm46045128922592">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_recovery_ssl_key">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-recovery-ssl-key=value
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_ssl_key">
group_replication_recovery_ssl_key
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<p>
The value of this system variable can be changed while Group
Replication is running, but the change takes effect only after
you stop and restart Group Replication on the group member.
</p>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_ssl_key">
<code class="literal">
group_replication_recovery_ssl_key
</code>
</a>
specifies the name of the SSL key file to use for establishing
a secure connection. See
<a class="xref" href="group-replication-secure-socket-layer-support-ssl.html" title="20.6.2 Securing Group Communication Connections with Secure Socket Layer (SSL)">
Section 20.6.2, “Securing Group Communication Connections with Secure Socket Layer (SSL)”
</a>
for information on configuring SSL for distributed recovery.
</p>
<p>
If this server has been set up to support cloning (see
<a class="xref" href="group-replication-cloning.html" title="20.5.4.2 Cloning for Distributed Recovery">
Section 20.5.4.2, “Cloning for Distributed Recovery”
</a>
), and you have set
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_use_ssl">
<code class="literal">
group_replication_recovery_use_ssl
</code>
</a>
to
<code class="literal">
ON
</code>
, Group Replication automatically
configures the setting for the clone SSL option
<a class="link" href="clone-plugin-options-variables.html#sysvar_clone_ssl_key">
<code class="literal">
clone_ssl_key
</code>
</a>
to match your
setting for
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_ssl_key">
<code class="literal">
group_replication_recovery_ssl_key
</code>
</a>
.
</p>
<p>
When the MySQL communication stack is in use for the group
(
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_communication_stack">
<code class="literal">
group_replication_communication_stack
= MYSQL
</code>
</a>
), this setting is used for the TLS/SSL
configuration for group communication connections, as well as
for distributed recovery connections.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_recovery_ssl_verify_server_cert">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_ssl_verify_server_cert">
<code class="literal">
group_replication_recovery_ssl_verify_server_cert
</code>
</a>
</p>
<a class="indexterm" name="idm46045128889600">
</a>
<a class="indexterm" name="idm46045128888560">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_recovery_ssl_verify_server_cert">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-recovery-ssl-verify-server-cert[={OFF|ON}]
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_ssl_verify_server_cert">
group_replication_recovery_ssl_verify_server_cert
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
OFF
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
The value of this system variable can be changed while Group
Replication is running, but the change takes effect only after
you stop and restart Group Replication on the group member.
</p>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_ssl_verify_server_cert">
<code class="literal">
group_replication_recovery_ssl_verify_server_cert
</code>
</a>
specifies whether the distributed recovery connection should
check the server's Common Name value in the certificate sent
by the donor. See
<a class="xref" href="group-replication-secure-socket-layer-support-ssl.html" title="20.6.2 Securing Group Communication Connections with Secure Socket Layer (SSL)">
Section 20.6.2, “Securing Group Communication Connections with Secure Socket Layer (SSL)”
</a>
for information on configuring SSL for distributed recovery.
</p>
<p>
When the MySQL communication stack is in use for the group
(
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_communication_stack">
<code class="literal">
group_replication_communication_stack
= MYSQL
</code>
</a>
), this setting is used for the TLS/SSL
configuration for group communication connections, as well as
for distributed recovery connections.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_recovery_tls_ciphersuites">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_tls_ciphersuites">
<code class="literal">
group_replication_recovery_tls_ciphersuites
</code>
</a>
</p>
<a class="indexterm" name="idm46045128858800">
</a>
<a class="indexterm" name="idm46045128857760">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_recovery_tls_ciphersuites">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-recovery-tls-ciphersuites=value
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_tls_ciphersuites">
group_replication_recovery_tls_ciphersuites
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
NULL
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
The value of this system variable can be changed while Group
Replication is running, but the change takes effect only after
you stop and restart Group Replication on the group member.
</p>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_tls_ciphersuites">
<code class="literal">
group_replication_recovery_tls_ciphersuites
</code>
</a>
specifies a colon-separated list of one or more permitted
ciphersuites when TLSv1.3 is used for connection encryption
for the distributed recovery connection, and this server
instance is the client in the distributed recovery connection,
that is, the joining member. If this system variable is set to
<code class="literal">
NULL
</code>
when TLSv1.3 is used (which is the
default if you do not set the system variable), the
ciphersuites that are enabled by default are allowed, as
listed in
<a class="xref" href="encrypted-connection-protocols-ciphers.html" title="8.3.2 Encrypted Connection TLS Protocols and Ciphers">
Section 8.3.2, “Encrypted Connection TLS Protocols and Ciphers”
</a>
. If
this system variable is set to the empty string, no cipher
suites are allowed, and TLSv1.3 is therefore not used. See
<a class="xref" href="group-replication-secure-socket-layer-support-ssl.html" title="20.6.2 Securing Group Communication Connections with Secure Socket Layer (SSL)">
Section 20.6.2, “Securing Group Communication Connections with Secure Socket Layer (SSL)”
</a>
,
for information on configuring SSL for distributed recovery.
</p>
<p>
When the MySQL communication stack is in use for the group
(
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_communication_stack">
<code class="literal">
group_replication_communication_stack
= MYSQL
</code>
</a>
), this setting is used for the TLS/SSL
configuration for group communication connections, as well as
for distributed recovery connections.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_recovery_tls_version">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_tls_version">
<code class="literal">
group_replication_recovery_tls_version
</code>
</a>
</p>
<a class="indexterm" name="idm46045128826208">
</a>
<a class="indexterm" name="idm46045128825168">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_recovery_tls_version">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-recovery-tls-version=value
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_tls_version">
group_replication_recovery_tls_version
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
TLSv1.2,TLSv1.3
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
The value of this system variable can be changed while Group
Replication is running, but the change takes effect only after
you stop and restart Group Replication on the group member.
</p>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_tls_version">
<code class="literal">
group_replication_recovery_tls_version
</code>
</a>
specifies a comma-separated list of one or more permitted TLS
protocols for connection encryption when this server instance
is the client in the distributed recovery connection, that is,
the joining member. The group members involved in each
distributed recovery connection as the client (joining member)
and server (donor) negotiate the highest protocol version that
they are both set up to support.
</p>
<p>
When the MySQL communication stack is in use for the group
(
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_communication_stack">
<code class="literal">
group_replication_communication_stack
= MYSQL
</code>
</a>
), this setting is used for the TLS/SSL
configuration for group communication connections, as well as
for distributed recovery connections.
</p>
<p>
The default is
<span class="quote">
“
<span class="quote">
<code class="literal">
TLSv1.2,TLSv1.3
</code>
</span>
”
</span>
. Ensure that
the specified protocol versions are contiguous, with no
versions numbers skipped from the middle of the sequence.
</p>
<div class="important" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Important
</div>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
Support for the TLSv1 and TLSv1.1 connection protocols
was deprecated in and later removed from MySQL in MySQL
8.0. See
<a class="xref" href="encrypted-connection-protocols-ciphers.html#encrypted-connection-deprecated-protocols" title="Removal of Support for the TLSv1 and TLSv1.1 Protocols">
Removal of Support for the TLSv1 and TLSv1.1 Protocols
</a>
for more information.
</p>
</li>
<li class="listitem">
<p>
Support for the TLSv1.3 protocol is available in MySQL
8.4, provided that MySQL was compiled using
OpenSSL 1.1.1. The server checks the version of OpenSSL
at startup, and if it is lower than 1.1.1, TLSv1.3 is
removed from the default value for the system variable.
In that case, the default is
<code class="literal">
TLSv1.2
</code>
.
</p>
</li>
<li class="listitem">
<p>
Group Replication supports TLSv1.3 with support for
ciphersuite selection. See
<a class="xref" href="group-replication-secure-socket-layer-support-ssl.html" title="20.6.2 Securing Group Communication Connections with Secure Socket Layer (SSL)">
Section 20.6.2, “Securing Group Communication Connections with Secure Socket Layer (SSL)”
</a>
for more information.
</p>
</li>
</ul>
</div>
</div>
<p>
See
<a class="xref" href="group-replication-secure-socket-layer-support-ssl.html" title="20.6.2 Securing Group Communication Connections with Secure Socket Layer (SSL)">
Section 20.6.2, “Securing Group Communication Connections with Secure Socket Layer (SSL)”
</a>
for information on configuring SSL for distributed recovery.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_recovery_use_ssl">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_use_ssl">
<code class="literal">
group_replication_recovery_use_ssl
</code>
</a>
</p>
<a class="indexterm" name="idm46045128787376">
</a>
<a class="indexterm" name="idm46045128786336">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_recovery_use_ssl">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-recovery-use-ssl[={OFF|ON}]
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_use_ssl">
group_replication_recovery_use_ssl
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
OFF
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
The value of this system variable can be changed while Group
Replication is running, but the change takes effect only after
you stop and restart Group Replication on the group member.
</p>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_use_ssl">
<code class="literal">
group_replication_recovery_use_ssl
</code>
</a>
specifies whether Group Replication distributed recovery
connections between group members should use SSL or not. See
<a class="xref" href="group-replication-secure-socket-layer-support-ssl.html" title="20.6.2 Securing Group Communication Connections with Secure Socket Layer (SSL)">
Section 20.6.2, “Securing Group Communication Connections with Secure Socket Layer (SSL)”
</a>
for information on configuring SSL for distributed recovery.
</p>
<p>
If this server has been set up to support cloning (see
<a class="xref" href="group-replication-cloning.html" title="20.5.4.2 Cloning for Distributed Recovery">
Section 20.5.4.2, “Cloning for Distributed Recovery”
</a>
), and you set this
option to
<code class="literal">
ON
</code>
, Group Replication uses SSL
for remote cloning operations as well as for state transfer
from a donor's binary log. If you set this option to
<code class="literal">
OFF
</code>
, Group Replication does not use SSL for
remote cloning operations.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_recovery_zstd_compression_level">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_zstd_compression_level">
<code class="literal">
group_replication_recovery_zstd_compression_level
</code>
</a>
</p>
<a class="indexterm" name="idm46045128755904">
</a>
<a class="indexterm" name="idm46045128754864">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_recovery_zstd_compression_level">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-recovery-zstd-compression-level=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_zstd_compression_level">
group_replication_recovery_zstd_compression_level
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
3
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
1
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
22
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
The value of this system variable can be changed while Group
Replication is running, but the change takes effect only after
you stop and restart Group Replication on the group member.
</p>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_recovery_zstd_compression_level">
<code class="literal">
group_replication_recovery_zstd_compression_level
</code>
</a>
specifies the compression level to use for Group Replication
distributed recovery connections that use the
<code class="literal">
zstd
</code>
compression algorithm. The permitted
levels are from 1 to 22, with larger values indicating
increasing levels of compression. The default
<code class="literal">
zstd
</code>
compression level is 3. For
distributed recovery connections that do not use
<code class="literal">
zstd
</code>
compression, this variable has no
effect.
</p>
<p>
For more information, see
<a class="xref" href="connection-compression-control.html" title="6.2.8 Connection Compression Control">
Section 6.2.8, “Connection Compression Control”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_single_primary_mode">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_single_primary_mode">
<code class="literal">
group_replication_single_primary_mode
</code>
</a>
</p>
<a class="indexterm" name="idm46045128719520">
</a>
<a class="indexterm" name="idm46045128718480">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_single_primary_mode">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-single-primary-mode[={OFF|ON}]
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_single_primary_mode">
group_replication_single_primary_mode
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
ON
</code>
</td>
</tr>
</tbody>
</table>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
This system variable is a group-wide configuration setting,
and a full reboot of the replication group is required for a
change to take effect.
</p>
</div>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_single_primary_mode">
<code class="literal">
group_replication_single_primary_mode
</code>
</a>
instructs the group to pick a single server automatically to
be the one that handles read/write workload. This server is
the primary and all others are secondaries.
</p>
<p>
This system variable is a group-wide configuration setting. It
must have the same value on all group members, cannot be
changed while Group Replication is running, and requires a
full reboot of the group (a bootstrap by a server with
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_bootstrap_group">
<code class="literal">
group_replication_bootstrap_group=ON
</code>
</a>
)
in order for the value change to take effect. For instructions
to safely bootstrap a group where transactions have been
executed and certified, see
<a class="xref" href="group-replication-restarting-group.html" title="20.5.2 Restarting a Group">
Section 20.5.2, “Restarting a Group”
</a>
.
</p>
<p>
If the group has a value set for this system variable, and a
joining member has a different value set for the system
variable, the joining member cannot join the group until the
value is changed to match. If the group members have a value
set for this system variable, and the joining member does not
support the system variable, it cannot join the group.
</p>
<p>
Setting this variable
<code class="literal">
ON
</code>
causes any setting
for
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_auto_increment_increment">
<code class="literal">
group_replication_auto_increment_increment
</code>
</a>
to be ignored.
</p>
<p>
Use the functions
<a class="link" href="group-replication-functions-for-mode.html#function_group-replication-switch-to-single-primary-mode">
<code class="literal">
group_replication_switch_to_single_primary_mode()
</code>
</a>
and
<a class="link" href="group-replication-functions-for-mode.html#function_group-replication-switch-to-multi-primary-mode">
<code class="literal">
group_replication_switch_to_multi_primary_mode()
</code>
</a>
to change the value of this system variable while the group is
still running. For more information, see
<a class="xref" href="group-replication-changing-group-mode.html" title="20.5.1.2 Changing the Group Mode">
Section 20.5.1.2, “Changing the Group Mode”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_ssl_mode">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_ssl_mode">
<code class="literal">
group_replication_ssl_mode
</code>
</a>
</p>
<a class="indexterm" name="idm46045128681232">
</a>
<a class="indexterm" name="idm46045128680128">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_ssl_mode">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-ssl-mode=value
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_ssl_mode">
group_replication_ssl_mode
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Enumeration
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
DISABLED
</code>
</td>
</tr>
<tr>
<th>
Valid Values
</th>
<td>
<p class="valid-value">
<code class="literal">
DISABLED
</code>
</p>
<p class="valid-value">
<code class="literal">
REQUIRED
</code>
</p>
<p class="valid-value">
<code class="literal">
VERIFY_CA
</code>
</p>
<p class="valid-value">
<code class="literal">
VERIFY_IDENTITY
</code>
</p>
</td>
</tr>
</tbody>
</table>
</div>
<p>
The value of this system variable can be changed while Group
Replication is running, but the change takes effect only after
you stop and restart Group Replication on the group member.
</p>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_ssl_mode">
<code class="literal">
group_replication_ssl_mode
</code>
</a>
sets the security state of group communication connections
between Group Replication members. The possible values are as
follows:
</p>
<div class="variablelist">
<dl class="variablelist">
<dt>
<span class="term">
DISABLED
</span>
</dt>
<dd>
<p>
Establish an unencrypted connection (the default).
</p>
</dd>
<dt>
<span class="term">
REQUIRED
</span>
</dt>
<dd>
<p>
Establish a secure connection if the server supports
secure connections.
</p>
</dd>
<dt>
<span class="term">
VERIFY_CA
</span>
</dt>
<dd>
<p>
Like
<code class="literal">
REQUIRED
</code>
, but additionally
verify the server TLS certificate against the configured
Certificate Authority (CA) certificates.
</p>
</dd>
<dt>
<span class="term">
VERIFY_IDENTITY
</span>
</dt>
<dd>
<p>
Like
<code class="literal">
VERIFY_CA
</code>
, but additionally
verify that the server certificate matches the host to
which the connection is attempted.
</p>
</dd>
</dl>
</div>
<p>
See
<a class="xref" href="group-replication-secure-socket-layer-support-ssl.html" title="20.6.2 Securing Group Communication Connections with Secure Socket Layer (SSL)">
Section 20.6.2, “Securing Group Communication Connections with Secure Socket Layer (SSL)”
</a>
for information on configuring SSL for group communication.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_start_on_boot">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_start_on_boot">
<code class="literal">
group_replication_start_on_boot
</code>
</a>
</p>
<a class="indexterm" name="idm46045128637760">
</a>
<a class="indexterm" name="idm46045128636656">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_start_on_boot">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-start-on-boot[={OFF|ON}]
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_start_on_boot">
group_replication_start_on_boot
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
ON
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
The value of this system variable can be changed while Group
Replication is running, but the change takes effect only after
you stop and restart Group Replication on the group member.
</p>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_start_on_boot">
<code class="literal">
group_replication_start_on_boot
</code>
</a>
specifies whether the server should start Group Replication
automatically (
<code class="literal">
ON
</code>
) or not
(
<code class="literal">
OFF
</code>
) during server start. When you set
this option to
<code class="literal">
ON
</code>
, Group Replication
restarts automatically after a remote cloning operation is
used for distributed recovery.
</p>
<p>
To start Group Replication automatically during server start,
the user credentials for distributed recovery must be stored
in the replication metadata repositories on the server using
the
<a class="link" href="change-replication-source-to.html" title="15.4.2.2 CHANGE REPLICATION SOURCE TO Statement">
<code class="literal">
CHANGE REPLICATION SOURCE
TO
</code>
</a>
statement. If you prefer to specify user
credentials as part of
<a class="link" href="start-group-replication.html" title="15.4.3.1 START GROUP_REPLICATION Statement">
<code class="literal">
START
GROUP_REPLICATION
</code>
</a>
, which stores the user credentials
in memory only, ensure that
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_start_on_boot">
<code class="literal">
group_replication_start_on_boot
</code>
</a>
is set to
<code class="literal">
OFF
</code>
.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_tls_source">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_tls_source">
<code class="literal">
group_replication_tls_source
</code>
</a>
</p>
<a class="indexterm" name="idm46045128602768">
</a>
<a class="indexterm" name="idm46045128601664">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_tls_source">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-tls-source=value
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_tls_source">
group_replication_tls_source
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Enumeration
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
mysql_main
</code>
</td>
</tr>
<tr>
<th>
Valid Values
</th>
<td>
<p class="valid-value">
<code class="literal">
mysql_main
</code>
</p>
<p class="valid-value">
<code class="literal">
mysql_admin
</code>
</p>
</td>
</tr>
</tbody>
</table>
</div>
<p>
The value of this system variable can be changed while Group
Replication is running, but the change takes effect only after
you stop and restart Group Replication on the group member.
</p>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_tls_source">
<code class="literal">
group_replication_tls_source
</code>
</a>
specifies the source of TLS material for Group Replication.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_transaction_size_limit">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_transaction_size_limit">
<code class="literal">
group_replication_transaction_size_limit
</code>
</a>
</p>
<a class="indexterm" name="idm46045128571296">
</a>
<a class="indexterm" name="idm46045128570176">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_transaction_size_limit">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-transaction-size-limit=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_transaction_size_limit">
group_replication_transaction_size_limit
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
150000000
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
2147483647
</code>
</td>
</tr>
<tr>
<th>
Unit
</th>
<td>
bytes
</td>
</tr>
</tbody>
</table>
</div>
<p>
This system variable should have the same value on all group
members. The value of this system variable can be changed
while Group Replication is running. The change takes effect
immediately on the group member, and applies from the next
transaction started on that member. During this process, the
value of the system variable is permitted to differ between
group members, but some transactions might be rejected.
</p>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_transaction_size_limit">
<code class="literal">
group_replication_transaction_size_limit
</code>
</a>
configures the maximum transaction size in bytes which the
replication group accepts. Transactions larger than this size
are rolled back by the receiving member and are not broadcast
to the group. Large transactions can cause problems for a
replication group in terms of memory allocation, which can
cause the system to slow down, or in terms of network
bandwidth consumption, which can cause a member to be
suspected of having failed because it is busy processing the
large transaction.
</p>
<p>
When this system variable is set to 0 there is no limit to the
size of transactions the group accepts. The default is
150000000 bytes (approximately 143 MB). Adjust the value of
this system variable depending on the maximum message size
that you need the group to tolerate, bearing in mind that the
time taken to process a transaction is proportional to its
size. The value of
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_transaction_size_limit">
<code class="literal">
group_replication_transaction_size_limit
</code>
</a>
should be the same on all group members. For further
mitigation strategies for large transactions, see
<a class="xref" href="group-replication-limitations.html" title="20.3.2 Group Replication Limitations">
Section 20.3.2, “Group Replication Limitations”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_unreachable_majority_timeout">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_unreachable_majority_timeout">
<code class="literal">
group_replication_unreachable_majority_timeout
</code>
</a>
</p>
<a class="indexterm" name="idm46045128532784">
</a>
<a class="indexterm" name="idm46045128531680">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_unreachable_majority_timeout">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-unreachable-majority-timeout=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_unreachable_majority_timeout">
group_replication_unreachable_majority_timeout
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
31536000
</code>
</td>
</tr>
<tr>
<th>
Unit
</th>
<td>
seconds
</td>
</tr>
</tbody>
</table>
</div>
<p>
The value of this system variable can be changed while Group
Replication is running, and the change takes effect
immediately. The current value of the system variable is read
when an issue occurs that means the behavior is needed.
</p>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_unreachable_majority_timeout">
<code class="literal">
group_replication_unreachable_majority_timeout
</code>
</a>
specifies a number of seconds for which members that suffer a
network partition and cannot connect to the majority wait
before leaving the group. In a group of 5 servers
(S1,S2,S3,S4,S5), if there is a disconnection between (S1,S2)
and (S3,S4,S5) there is a network partition. The first group
(S1,S2) is now in a minority because it cannot contact more
than half of the group. While the majority group (S3,S4,S5)
remains running, the minority group waits for the specified
time for a network reconnection. For a detailed description of
this scenario, see
<a class="xref" href="group-replication-network-partitioning.html" title="20.7.8 Handling a Network Partition and Loss of Quorum">
Section 20.7.8, “Handling a Network Partition and Loss of Quorum”
</a>
.
</p>
<p>
By default,
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_unreachable_majority_timeout">
<code class="literal">
group_replication_unreachable_majority_timeout
</code>
</a>
is set to 0, which means that members that find themselves in
a minority due to a network partition wait forever to leave
the group. If you set a timeout, when the specified time
elapses, all pending transactions processed by the minority
are rolled back, and the servers in the minority partition
move to the
<code class="literal">
ERROR
</code>
state. If a member has
the
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_autorejoin_tries">
<code class="literal">
group_replication_autorejoin_tries
</code>
</a>
system variable set to specify a number of auto-rejoin
attempts, it proceeds to make the specified number of attempts
to rejoin the group while in super read only mode. If the
member does not have any auto-rejoin attempts specified, or if
it has exhausted the specified number of attempts, it follows
the action specified by the system variable
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_exit_state_action">
<code class="literal">
group_replication_exit_state_action
</code>
</a>
.
</p>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Warning
</div>
<p>
When you have a symmetric group, with just two members for
example (S0,S2), if there is a network partition and there
is no majority, after the configured timeout all members
enter the
<code class="literal">
ERROR
</code>
state.
</p>
</div>
<p>
For more information on using this option, see
<a class="xref" href="group-replication-responses-failure-partition.html" title="20.7.7.2 Unreachable Majority Timeout">
Section 20.7.7.2, “Unreachable Majority Timeout”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_group_replication_view_change_uuid">
</a>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_view_change_uuid">
<code class="literal">
group_replication_view_change_uuid
</code>
</a>
</p>
<a class="indexterm" name="idm46045128487664">
</a>
<a class="indexterm" name="idm46045128486624">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for group_replication_view_change_uuid">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--group-replication-view-change-uuid=value
</code>
</td>
</tr>
<tr>
<th>
Deprecated
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_view_change_uuid">
group_replication_view_change_uuid
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
AUTOMATIC
</code>
</td>
</tr>
</tbody>
</table>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
This system variable is a group-wide configuration setting,
and a full reboot of the replication group is required for a
change to take effect.
</p>
</div>
<p>
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_view_change_uuid">
<code class="literal">
group_replication_view_change_uuid
</code>
</a>
specifies an alternative UUID to use as the UUID part of the
identifier in the GTIDs for view change events generated by
the group. The alternative UUID makes these internally
generated transactions easy to distinguish from transactions
received by the group from clients. This can be useful if your
setup allows for failover between groups, and you need to
identify and discard transactions that were specific to the
backup group. The default value for this system variable is
<code class="literal">
AUTOMATIC
</code>
, meaning that the GTIDs for view
change events use the group name specified by the
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_group_name">
<code class="literal">
group_replication_group_name
</code>
</a>
system variable, as transactions from clients do. Group
members at a release that does not have this system variable
are treated as having the value
<code class="literal">
AUTOMATIC
</code>
.
</p>
<p>
The alternative UUID must be different from the group name
specified by the
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_group_name">
<code class="literal">
group_replication_group_name
</code>
</a>
system variable, and it must be different from the server UUID
of any group member. It must also be different from any UUIDs
used in the GTIDs that are applied to anonymous transactions
on replication channels anywhere in this topology, using the
<code class="literal">
ASSIGN_GTIDS_TO_ANONYMOUS_TRANSACTIONS
</code>
option of the
<a class="link" href="change-replication-source-to.html" title="15.4.2.2 CHANGE REPLICATION SOURCE TO Statement">
<code class="literal">
CHANGE REPLICATION SOURCE
TO
</code>
</a>
statement.
</p>
<p>
This system variable is a group-wide configuration setting. It
must have the same value on all group members, cannot be
changed while Group Replication is running, and requires a
full reboot of the group (a bootstrap by a server with
<a class="link" href="group-replication-system-variables.html#sysvar_group_replication_bootstrap_group">
<code class="literal">
group_replication_bootstrap_group=ON
</code>
</a>
)
in order for the value change to take effect. For instructions
to safely bootstrap a group where transactions have been
executed and certified, see
<a class="xref" href="group-replication-restarting-group.html" title="20.5.2 Restarting a Group">
Section 20.5.2, “Restarting a Group”
</a>
.
</p>
<p>
If the group has a value set for this system variable, and a
joining member has a different value set for the system
variable, the joining member cannot join the group until the
value is changed to match. If the group members have a value
set for this system variable, and the joining member does not
support the system variable, it cannot join the group.
</p>
<p>
Logging of view change events is replaced by sharing of
recovery metadata; thus, this variable is deprecated, and
subject to removal in a future version of MySQL.
</p>
</li>
</ul>
</div>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/mysql-config-editor.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a name="mysql-config-editor">
</a>
6.6.7 mysql_config_editor — MySQL Configuration Utility
</h3>
</div>
</div>
</div>
<a class="indexterm" name="idm46045306204608">
</a>
<a class="indexterm" name="idm46045306203696">
</a>
<a class="indexterm" name="idm46045306202736">
</a>
<p>
The
<a class="link" href="mysql-config-editor.html" title="6.6.7 mysql_config_editor — MySQL Configuration Utility">
<span class="command">
<strong>
mysql_config_editor
</strong>
</span>
</a>
utility enables you
to store authentication credentials in an obfuscated login path
file named
<code class="filename">
.mylogin.cnf
</code>
. The file location
is the
<code class="filename">
%APPDATA%\MySQL
</code>
directory on Windows
and the current user's home directory on non-Windows systems.
The file can be read later by MySQL client programs to obtain
authentication credentials for connecting to MySQL Server.
</p>
<p>
The unobfuscated format of the
<code class="filename">
.mylogin.cnf
</code>
login path file consists of option groups, similar to other
option files. Each option group in
<code class="filename">
.mylogin.cnf
</code>
is called a
<span class="quote">
“
<span class="quote">
login
path,
</span>
”
</span>
which is a group that permits only certain
options:
<code class="option">
host
</code>
,
<code class="option">
user
</code>
,
<code class="option">
password
</code>
,
<code class="option">
port
</code>
and
<code class="option">
socket
</code>
. Think of a login path option group as a
set of options that specify which MySQL server to connect to and
which account to authenticate as. Here is an unobfuscated
example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-ini"><div class="docs-select-all right" id="sa21735192"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-ini"><span class="token selector">[client]</span>
<span class="token constant">user</span> <span class="token attr-value"><span class="token punctuation">=</span> mydefaultname</span>
<span class="token constant">password</span> <span class="token attr-value"><span class="token punctuation">=</span> mydefaultpass</span>
<span class="token constant">host</span> <span class="token attr-value"><span class="token punctuation">=</span> 127.0.0.1</span>
<span class="token selector">[mypath]</span>
<span class="token constant">user</span> <span class="token attr-value"><span class="token punctuation">=</span> myothername</span>
<span class="token constant">password</span> <span class="token attr-value"><span class="token punctuation">=</span> myotherpass</span>
<span class="token constant">host</span> <span class="token attr-value"><span class="token punctuation">=</span> localhost</span></code></pre>
</div>
<p>
When you invoke a client program to connect to the server, the
client uses
<code class="filename">
.mylogin.cnf
</code>
in conjunction
with other option files. Its precedence is higher than other
option files, but less than options specified explicitly on the
client command line. For information about the order in which
option files are used, see
<a class="xref" href="option-files.html" title="6.2.2.2 Using Option Files">
Section 6.2.2.2, “Using Option Files”
</a>
.
</p>
<a class="indexterm" name="idm46045306189776">
</a>
<a class="indexterm" name="idm46045306188672">
</a>
<p>
To specify an alternate login path file name, set the
<code class="literal">
MYSQL_TEST_LOGIN_FILE
</code>
environment variable.
This variable is recognized by
<a class="link" href="mysql-config-editor.html" title="6.6.7 mysql_config_editor — MySQL Configuration Utility">
<span class="command">
<strong>
mysql_config_editor
</strong>
</span>
</a>
, by standard MySQL
clients (
<a class="link" href="mysql.html" title="6.5.1 mysql — The MySQL Command-Line Client">
<span class="command">
<strong>
mysql
</strong>
</span>
</a>
,
<a class="link" href="mysqladmin.html" title="6.5.2 mysqladmin — A MySQL Server Administration Program">
<span class="command">
<strong>
mysqladmin
</strong>
</span>
</a>
, and so forth), and by the
<span class="command">
<strong>
mysql-test-run.pl
</strong>
</span>
testing utility.
</p>
<p>
Programs use groups in the login path file as follows:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<a class="link" href="mysql-config-editor.html" title="6.6.7 mysql_config_editor — MySQL Configuration Utility">
<span class="command">
<strong>
mysql_config_editor
</strong>
</span>
</a>
operates on the
<code class="literal">
client
</code>
login path by default if you
specify no
<a class="link" href="option-file-options.html#option_general_login-path">
<code class="option">
--login-path=
<em class="replaceable">
<code>
name
</code>
</em>
</code>
</a>
option to indicate explicitly which login path to use.
</p>
</li>
<li class="listitem">
<p>
Without a
<a class="link" href="option-file-options.html#option_general_login-path">
<code class="option">
--login-path
</code>
</a>
option, client programs read the same option groups from the
login path file that they read from other option files.
Consider this command:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa36520357"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">mysql</code></pre>
</div>
<p>
By default, the
<a class="link" href="mysql.html" title="6.5.1 mysql — The MySQL Command-Line Client">
<span class="command">
<strong>
mysql
</strong>
</span>
</a>
client reads the
<code class="literal">
[client]
</code>
and
<code class="literal">
[mysql]
</code>
groups from other option files, so it reads them from the
login path file as well.
</p>
</li>
<li class="listitem">
<p>
With a
<a class="link" href="option-file-options.html#option_general_login-path">
<code class="option">
--login-path
</code>
</a>
option,
client programs additionally read the named login path from
the login path file. The option groups read from other
option files remain the same. Consider this command:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa82327971"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">mysql <span class="token constant">--login-path</span><span class="token attr-value"><span class="token punctuation">=</span>mypath</span></code></pre>
</div>
<p>
The
<a class="link" href="mysql.html" title="6.5.1 mysql — The MySQL Command-Line Client">
<span class="command">
<strong>
mysql
</strong>
</span>
</a>
client reads
<code class="literal">
[client]
</code>
and
<code class="literal">
[mysql]
</code>
from other option files, and
<code class="literal">
[client]
</code>
,
<code class="literal">
[mysql]
</code>
, and
<code class="literal">
[mypath]
</code>
from the login path file.
</p>
</li>
<li class="listitem">
<p>
Client programs read the login path file even when the
<a class="link" href="option-file-options.html#option_general_no-defaults">
<code class="option">
--no-defaults
</code>
</a>
option is
used, unless
<a class="link" href="option-file-options.html#option_general_no-login-paths">
<code class="option">
--no-login-paths
</code>
</a>
is set.
This permits passwords to be specified in a safer way than
on the command line even if
<a class="link" href="option-file-options.html#option_general_no-defaults">
<code class="option">
--no-defaults
</code>
</a>
is present.
</p>
</li>
</ul>
</div>
<p>
<a class="link" href="mysql-config-editor.html" title="6.6.7 mysql_config_editor — MySQL Configuration Utility">
<span class="command">
<strong>
mysql_config_editor
</strong>
</span>
</a>
obfuscates the
<code class="filename">
.mylogin.cnf
</code>
file so it cannot be read as
cleartext, and its contents when unobfuscated by client programs
are used only in memory. In this way, passwords can be stored in
a file in non-cleartext format and used later without ever
needing to be exposed on the command line or in an environment
variable.
<a class="link" href="mysql-config-editor.html" title="6.6.7 mysql_config_editor — MySQL Configuration Utility">
<span class="command">
<strong>
mysql_config_editor
</strong>
</span>
</a>
provides a
<code class="literal">
print
</code>
command for displaying the login path
file contents, but even in this case, password values are masked
so as never to appear in a way that other users can see them.
</p>
<p>
The obfuscation used by
<a class="link" href="mysql-config-editor.html" title="6.6.7 mysql_config_editor — MySQL Configuration Utility">
<span class="command">
<strong>
mysql_config_editor
</strong>
</span>
</a>
prevents passwords from appearing in
<code class="filename">
.mylogin.cnf
</code>
as cleartext and provides a
measure of security by preventing inadvertent password exposure.
For example, if you display a regular unobfuscated
<code class="filename">
my.cnf
</code>
option file on the screen, any
passwords it contains are visible for anyone to see. With
<code class="filename">
.mylogin.cnf
</code>
, that is not true, but the
obfuscation used is not likely to deter a determined attacker
and you should not consider it unbreakable. A user who can gain
system administration privileges on your machine to access your
files could unobfuscate the
<code class="filename">
.mylogin.cnf
</code>
file with some effort.
</p>
<p>
The login path file must be readable and writable to the current
user, and inaccessible to other users. Otherwise,
<a class="link" href="mysql-config-editor.html" title="6.6.7 mysql_config_editor — MySQL Configuration Utility">
<span class="command">
<strong>
mysql_config_editor
</strong>
</span>
</a>
ignores it, and client
programs do not use it, either.
</p>
<p>
Invoke
<a class="link" href="mysql-config-editor.html" title="6.6.7 mysql_config_editor — MySQL Configuration Utility">
<span class="command">
<strong>
mysql_config_editor
</strong>
</span>
</a>
like this:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa77305094"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">mysql_config_editor <span class="token punctuation">[</span><em class="replaceable">program_options</em><span class="token punctuation">]</span> <em class="replaceable">command</em> <span class="token punctuation">[</span><em class="replaceable">command_options</em><span class="token punctuation">]</span></code></pre>
</div>
<p>
If the login path file does not exist,
<a class="link" href="mysql-config-editor.html" title="6.6.7 mysql_config_editor — MySQL Configuration Utility">
<span class="command">
<strong>
mysql_config_editor
</strong>
</span>
</a>
creates it.
</p>
<p>
Command arguments are given as follows:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<em class="replaceable">
<code>
program_options
</code>
</em>
consists of
general
<a class="link" href="mysql-config-editor.html" title="6.6.7 mysql_config_editor — MySQL Configuration Utility">
<span class="command">
<strong>
mysql_config_editor
</strong>
</span>
</a>
options.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
command
</code>
indicates what action to perform
on the
<code class="filename">
.mylogin.cnf
</code>
login path file.
For example,
<code class="literal">
set
</code>
writes a login path to
the file,
<code class="literal">
remove
</code>
removes a login path,
and
<code class="literal">
print
</code>
displays login path contents.
</p>
</li>
<li class="listitem">
<p>
<em class="replaceable">
<code>
command_options
</code>
</em>
indicates any
additional options specific to the command, such as the
login path name and the values to use in the login path.
</p>
</li>
</ul>
</div>
<p>
The position of the command name within the set of program
arguments is significant. For example, these command lines have
the same arguments, but produce different results:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-terminal"><div class="docs-select-all right" id="sa58136124"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">mysql_config_editor <span class="token property">--help</span> set
mysql_config_editor set <span class="token property">--help</span></code></pre>
</div>
<p>
The first command line displays a general
<a class="link" href="mysql-config-editor.html" title="6.6.7 mysql_config_editor — MySQL Configuration Utility">
<span class="command">
<strong>
mysql_config_editor
</strong>
</span>
</a>
help message, and ignores
the
<code class="literal">
set
</code>
command. The second command line
displays a help message specific to the
<code class="literal">
set
</code>
command.
</p>
<p>
Suppose that you want to establish a
<code class="literal">
client
</code>
login path that defines your default connection parameters, and
an additional login path named
<code class="literal">
remote
</code>
for
connecting to the MySQL server the host
<code class="literal">
remote.example.com
</code>
. You want to log in as
follows:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
By default, to the local server with a user name and
password of
<code class="literal">
localuser
</code>
and
<code class="literal">
localpass
</code>
</p>
</li>
<li class="listitem">
<p>
To the remote server with a user name and password of
<code class="literal">
remoteuser
</code>
and
<code class="literal">
remotepass
</code>
</p>
</li>
</ul>
</div>
<p>
To set up the login paths in the
<code class="filename">
.mylogin.cnf
</code>
file, use the following
<code class="literal">
set
</code>
commands. Enter each command on a single
line, and enter the appropriate passwords when prompted:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-terminal"><div class="docs-select-all right" id="sa47505548"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal"><span class="token prompt">$> </span><span class="token command">mysql_config_editor</span> set <span class="token constant">--login-path</span><span class="token attr-value"><span class="token punctuation">=</span>client</span>
<span class="token constant">--host</span><span class="token attr-value"><span class="token punctuation">=</span>localhost</span> <span class="token constant">--user</span><span class="token attr-value"><span class="token punctuation">=</span>localuser</span> <span class="token property">--password</span>
Enter password<span class="token punctuation">:</span> <em class="replaceable">enter password <span class="token atrule">"localpass"</span> here</em>
<span class="token prompt">$> </span><span class="token command">mysql_config_editor</span> set <span class="token constant">--login-path</span><span class="token attr-value"><span class="token punctuation">=</span>remote</span>
<span class="token constant">--host</span><span class="token attr-value"><span class="token punctuation">=</span>remote.example.com</span> <span class="token constant">--user</span><span class="token attr-value"><span class="token punctuation">=</span>remoteuser</span> <span class="token property">--password</span>
Enter password<span class="token punctuation">:</span> <em class="replaceable">enter password <span class="token atrule">"remotepass"</span> here</em></code></pre>
</div>
<p>
<a class="link" href="mysql-config-editor.html" title="6.6.7 mysql_config_editor — MySQL Configuration Utility">
<span class="command">
<strong>
mysql_config_editor
</strong>
</span>
</a>
uses the
<code class="literal">
client
</code>
login path by default, so the
<code class="option">
--login-path=client
</code>
option can be omitted from
the first command without changing its effect.
</p>
<p>
To see what
<a class="link" href="mysql-config-editor.html" title="6.6.7 mysql_config_editor — MySQL Configuration Utility">
<span class="command">
<strong>
mysql_config_editor
</strong>
</span>
</a>
writes to the
<code class="filename">
.mylogin.cnf
</code>
file, use the
<code class="literal">
print
</code>
command:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-terminal"><div class="docs-select-all right" id="sa31068297"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal"><span class="token prompt">$> </span><span class="token command">mysql_config_editor</span> print <span class="token property">--all</span>
<span class="token punctuation">[</span>client<span class="token punctuation">]</span>
user = localuser
password = *****
host = localhost
<span class="token punctuation">[</span>remote<span class="token punctuation">]</span>
user = remoteuser
password = *****
host = remote<span class="token punctuation">.</span>example<span class="token punctuation">.</span>com</code></pre>
</div>
<p>
The
<code class="literal">
print
</code>
command displays each login path as
a set of lines beginning with a group header indicating the
login path name in square brackets, followed by the option
values for the login path. Password values are masked and do not
appear as cleartext.
</p>
<p>
If you do not specify
<code class="option">
--all
</code>
to display all
login paths or
<code class="option">
--login-path=
<em class="replaceable">
<code>
name
</code>
</em>
</code>
to
display a named login path, the
<code class="literal">
print
</code>
command
displays the
<code class="literal">
client
</code>
login path by default, if
there is one.
</p>
<p>
As shown by the preceding example, the login path file can
contain multiple login paths. In this way,
<a class="link" href="mysql-config-editor.html" title="6.6.7 mysql_config_editor — MySQL Configuration Utility">
<span class="command">
<strong>
mysql_config_editor
</strong>
</span>
</a>
makes it easy to set up
multiple
<span class="quote">
“
<span class="quote">
personalities
</span>
”
</span>
for connecting to
different MySQL servers, or for connecting to a given server
using different accounts. Any of these can be selected by name
later using the
<code class="option">
--login-path
</code>
option when you
invoke a client program. For example, to connect to the remote
server, use this command:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa82962500"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">mysql <span class="token constant">--login-path</span><span class="token attr-value"><span class="token punctuation">=</span>remote</span></code></pre>
</div>
<p>
Here,
<a class="link" href="mysql.html" title="6.5.1 mysql — The MySQL Command-Line Client">
<span class="command">
<strong>
mysql
</strong>
</span>
</a>
reads the
<code class="literal">
[client]
</code>
and
<code class="literal">
[mysql]
</code>
option groups from other option files, and the
<code class="literal">
[client]
</code>
,
<code class="literal">
[mysql]
</code>
, and
<code class="literal">
[remote]
</code>
groups from the login path file.
</p>
<p>
To connect to the local server, use this command:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa46653020"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">mysql <span class="token constant">--login-path</span><span class="token attr-value"><span class="token punctuation">=</span>client</span></code></pre>
</div>
<p>
Because
<a class="link" href="mysql.html" title="6.5.1 mysql — The MySQL Command-Line Client">
<span class="command">
<strong>
mysql
</strong>
</span>
</a>
reads the
<code class="literal">
client
</code>
and
<code class="literal">
mysql
</code>
login
paths by default, the
<a class="link" href="option-file-options.html#option_general_login-path">
<code class="option">
--login-path
</code>
</a>
option does not add
anything in this case. That command is equivalent to this one:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa35614824"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">mysql</code></pre>
</div>
<p>
Options read from the login path file take precedence over
options read from other option files. Options read from login
path groups appearing later in the login path file take
precedence over options read from groups appearing earlier in
the file.
</p>
<p>
<a class="link" href="mysql-config-editor.html" title="6.6.7 mysql_config_editor — MySQL Configuration Utility">
<span class="command">
<strong>
mysql_config_editor
</strong>
</span>
</a>
adds login paths to the
login path file in the order you create them, so you should
create more general login paths first and more specific paths
later. If you need to move a login path within the file, you can
remove it, then recreate it to add it to the end. For example, a
<code class="literal">
client
</code>
login path is more general because it
is read by all client programs, whereas a
<code class="literal">
mysqldump
</code>
login path is read only by
<a class="link" href="mysqldump.html" title="6.5.4 mysqldump — A Database Backup Program">
<span class="command">
<strong>
mysqldump
</strong>
</span>
</a>
. Options specified later override
options specified earlier, so putting the login paths in the
order
<code class="literal">
client
</code>
,
<code class="literal">
mysqldump
</code>
enables
<a class="link" href="mysqldump.html" title="6.5.4 mysqldump — A Database Backup Program">
<span class="command">
<strong>
mysqldump
</strong>
</span>
</a>
-specific options to
override
<code class="literal">
client
</code>
options.
</p>
<p>
When you use the
<code class="literal">
set
</code>
command with
<a class="link" href="mysql-config-editor.html" title="6.6.7 mysql_config_editor — MySQL Configuration Utility">
<span class="command">
<strong>
mysql_config_editor
</strong>
</span>
</a>
to create a login path,
you need not specify all possible option values (host name, user
name, password, port, socket). Only those values given are
written to the path. Any missing values required later can be
specified when you invoke a client path to connect to the MySQL
server, either in other option files or on the command line. Any
options specified on the command line override those specified
in the login path file or other option files. For example, if
the credentials in the
<code class="literal">
remote
</code>
login path also
apply for the host
<code class="literal">
remote2.example.com
</code>
,
connect to the server on that host like this:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa97716831"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">mysql <span class="token constant">--login-path</span><span class="token attr-value"><span class="token punctuation">=</span>remote</span> <span class="token constant">--host</span><span class="token attr-value"><span class="token punctuation">=</span>remote2.example.com</span></code></pre>
</div>
<h4>
<a name="mysql-config-editor-command-options">
</a>
mysql_config_editor General Options
</h4>
<p>
<a class="link" href="mysql-config-editor.html" title="6.6.7 mysql_config_editor — MySQL Configuration Utility">
<span class="command">
<strong>
mysql_config_editor
</strong>
</span>
</a>
supports the following
general options, which may be used preceding any command named
on the command line. For descriptions of command-specific
options, see
<a class="xref" href="mysql-config-editor.html#mysql-config-editor-commands" title="mysql_config_editor Commands and Command-Specific Options">
mysql_config_editor Commands and Command-Specific Options
</a>
.
</p>
<div class="table">
<a name="idm46045306067328">
</a>
<p class="title">
<b>
Table 6.18 mysql_config_editor General Options
</b>
</p>
<div class="table-contents">
<table frame="box" rules="all" summary="General Command-line options available for mysql_config_editor.">
<colgroup>
<col style="width: 35%"/>
<col style="width: 64%"/>
</colgroup>
<thead>
<tr>
<th>
Option Name
</th>
<th>
Description
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<a class="link" href="mysql-config-editor.html#option_mysql_config_editor_debug">
--debug
</a>
</td>
<td>
Write debugging log
</td>
</tr>
<tr>
<td>
<a class="link" href="mysql-config-editor.html#option_mysql_config_editor_help">
--help
</a>
</td>
<td>
Display help message and exit
</td>
</tr>
<tr>
<td>
<a class="link" href="mysql-config-editor.html#option_mysql_config_editor_verbose">
--verbose
</a>
</td>
<td>
Verbose mode
</td>
</tr>
<tr>
<td>
<a class="link" href="mysql-config-editor.html#option_mysql_config_editor_version">
--version
</a>
</td>
<td>
Display version information and exit
</td>
</tr>
</tbody>
</table>
</div>
</div>
<br class="table-break"/>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<a name="option_mysql_config_editor_help">
</a>
<a class="link" href="mysql-config-editor.html#option_mysql_config_editor_help">
<code class="option">
--help
</code>
</a>
,
<code class="option">
-?
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for help">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--help
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045306042128">
</a>
<a class="indexterm" name="idm46045306040640">
</a>
<p>
Display a general help message and exit.
</p>
<p>
To see a command-specific help message, invoke
<a class="link" href="mysql-config-editor.html" title="6.6.7 mysql_config_editor — MySQL Configuration Utility">
<span class="command">
<strong>
mysql_config_editor
</strong>
</span>
</a>
as follows, where
<em class="replaceable">
<code>
command
</code>
</em>
is a command other than
<code class="literal">
help
</code>
:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa98527639"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">mysql_config_editor <em class="replaceable">command</em> <span class="token property">--help</span></code></pre>
</div>
</li>
<li class="listitem">
<p>
<a name="option_mysql_config_editor_debug">
</a>
<a class="link" href="mysql-config-editor.html#option_mysql_config_editor_debug">
<code class="option">
--debug[=
<em class="replaceable">
<code>
debug_options
</code>
</em>
]
</code>
</a>
,
<code class="option">
-#
<em class="replaceable">
<code>
debug_options
</code>
</em>
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for debug">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--debug[=debug_options]
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
d:t:o
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045306021056">
</a>
<a class="indexterm" name="idm46045306019568">
</a>
<p>
Write a debugging log. A typical
<em class="replaceable">
<code>
debug_options
</code>
</em>
string is
<code class="literal">
d:t:o,
<em class="replaceable">
<code>
file_name
</code>
</em>
</code>
.
The default is
<code class="literal">
d:t:o,/tmp/mysql_config_editor.trace
</code>
.
</p>
<p>
This option is available only if MySQL was built using
<a class="link" href="source-configuration-options.html#option_cmake_with_debug">
<code class="option">
WITH_DEBUG
</code>
</a>
. MySQL release
binaries provided by Oracle are
<span class="emphasis">
<em>
not
</em>
</span>
built using this option.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysql_config_editor_verbose">
</a>
<a class="link" href="mysql-config-editor.html#option_mysql_config_editor_verbose">
<code class="option">
--verbose
</code>
</a>
,
<code class="option">
-v
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for verbose">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--verbose
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045306005408">
</a>
<a class="indexterm" name="idm46045306003920">
</a>
<p>
Verbose mode. Print more information about what the program
does. This option may be helpful in diagnosing problems if
an operation does not have the effect you expect.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysql_config_editor_version">
</a>
<a class="link" href="mysql-config-editor.html#option_mysql_config_editor_version">
<code class="option">
--version
</code>
</a>
,
<code class="option">
-V
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for version">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--version
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045305993696">
</a>
<a class="indexterm" name="idm46045305992208">
</a>
<p>
Display version information and exit.
</p>
</li>
</ul>
</div>
<h4>
<a name="mysql-config-editor-commands">
</a>
mysql_config_editor Commands and Command-Specific Options
</h4>
<p>
This section describes the permitted
<a class="link" href="mysql-config-editor.html" title="6.6.7 mysql_config_editor — MySQL Configuration Utility">
<span class="command">
<strong>
mysql_config_editor
</strong>
</span>
</a>
commands, and, for each
one, the command-specific options permitted following the
command name on the command line.
</p>
<p>
In addition,
<a class="link" href="mysql-config-editor.html" title="6.6.7 mysql_config_editor — MySQL Configuration Utility">
<span class="command">
<strong>
mysql_config_editor
</strong>
</span>
</a>
supports
general options that can be used preceding any command. For
descriptions of these options, see
<a class="xref" href="mysql-config-editor.html#mysql-config-editor-command-options" title="mysql_config_editor General Options">
mysql_config_editor General Options
</a>
.
</p>
<p>
<a class="link" href="mysql-config-editor.html" title="6.6.7 mysql_config_editor — MySQL Configuration Utility">
<span class="command">
<strong>
mysql_config_editor
</strong>
</span>
</a>
supports these commands:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<code class="literal">
help
</code>
</p>
<p>
Display a general help message and exit. This command takes
no following options.
</p>
<p>
To see a command-specific help message, invoke
<a class="link" href="mysql-config-editor.html" title="6.6.7 mysql_config_editor — MySQL Configuration Utility">
<span class="command">
<strong>
mysql_config_editor
</strong>
</span>
</a>
as follows, where
<em class="replaceable">
<code>
command
</code>
</em>
is a command other than
<code class="literal">
help
</code>
:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa21495583"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">mysql_config_editor <em class="replaceable">command</em> <span class="token property">--help</span></code></pre>
</div>
</li>
<li class="listitem">
<p>
<code class="literal">
print
[
<em class="replaceable">
<code>
options
</code>
</em>
]
</code>
</p>
<p>
Print the contents of the login path file in unobfuscated
form, with the exception that passwords are displayed as
<code class="literal">
*****
</code>
.
</p>
<p>
The default login path name is
<code class="literal">
client
</code>
if
no login path is named. If both
<code class="option">
--all
</code>
and
<code class="option">
--login-path
</code>
are given,
<code class="option">
--all
</code>
takes precedence.
</p>
<p>
The
<code class="literal">
print
</code>
command permits these options
following the command name:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
<code class="option">
--help
</code>
,
<code class="option">
-?
</code>
</p>
<p>
Display a help message for the
<code class="literal">
print
</code>
command and exit.
</p>
<p>
To see a general help message, use
<a class="link" href="mysql-config-editor.html" title="6.6.7 mysql_config_editor — MySQL Configuration Utility">
<span class="command">
<strong>
mysql_config_editor --help
</strong>
</span>
</a>
.
</p>
</li>
<li class="listitem">
<p>
<code class="option">
--all
</code>
</p>
<p>
Print the contents of all login paths in the login path
file.
</p>
</li>
<li class="listitem">
<p>
<code class="option">
--login-path=
<em class="replaceable">
<code>
name
</code>
</em>
</code>
,
<code class="option">
-G
<em class="replaceable">
<code>
name
</code>
</em>
</code>
</p>
<p>
Print the contents of the named login path.
</p>
</li>
</ul>
</div>
</li>
<li class="listitem">
<p>
<code class="literal">
remove
[
<em class="replaceable">
<code>
options
</code>
</em>
]
</code>
</p>
<p>
Remove a login path from the login path file, or modify a
login path by removing options from it.
</p>
<p>
This command removes from the login path only such options
as are specified with the
<code class="option">
--host
</code>
,
<code class="option">
--password
</code>
,
<code class="option">
--port
</code>
,
<code class="option">
--socket
</code>
, and
<code class="option">
--user
</code>
options. If none of those options are given,
<code class="literal">
remove
</code>
removes the entire login path. For
example, this command removes only the
<code class="option">
user
</code>
option from the
<code class="literal">
mypath
</code>
login path rather
than the entire
<code class="literal">
mypath
</code>
login path:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa58196037"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">mysql_config_editor remove <span class="token constant">--login-path</span><span class="token attr-value"><span class="token punctuation">=</span>mypath</span> <span class="token property">--user</span></code></pre>
</div>
<p>
This command removes the entire
<code class="literal">
mypath
</code>
login path:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa52534428"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">mysql_config_editor remove <span class="token constant">--login-path</span><span class="token attr-value"><span class="token punctuation">=</span>mypath</span></code></pre>
</div>
<p>
The
<code class="literal">
remove
</code>
command permits these options
following the command name:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
<code class="option">
--help
</code>
,
<code class="option">
-?
</code>
</p>
<p>
Display a help message for the
<code class="literal">
remove
</code>
command and exit.
</p>
<p>
To see a general help message, use
<a class="link" href="mysql-config-editor.html" title="6.6.7 mysql_config_editor — MySQL Configuration Utility">
<span class="command">
<strong>
mysql_config_editor --help
</strong>
</span>
</a>
.
</p>
</li>
<li class="listitem">
<p>
<code class="option">
--host
</code>
,
<code class="option">
-h
</code>
</p>
<p>
Remove the host name from the login path.
</p>
</li>
<li class="listitem">
<p>
<code class="option">
--login-path=
<em class="replaceable">
<code>
name
</code>
</em>
</code>
,
<code class="option">
-G
<em class="replaceable">
<code>
name
</code>
</em>
</code>
</p>
<p>
The login path to remove or modify. The default login
path name is
<code class="literal">
client
</code>
if this option is
not given.
</p>
</li>
<li class="listitem">
<p>
<code class="option">
--password
</code>
,
<code class="option">
-p
</code>
</p>
<p>
Remove the password from the login path.
</p>
</li>
<li class="listitem">
<p>
<code class="option">
--port
</code>
,
<code class="option">
-P
</code>
</p>
<p>
Remove the TCP/IP port number from the login path.
</p>
</li>
<li class="listitem">
<p>
<code class="option">
--socket
</code>
,
<code class="option">
-S
</code>
</p>
<p>
Remove the Unix socket file name from the login path.
</p>
</li>
<li class="listitem">
<p>
<code class="option">
--user
</code>
,
<code class="option">
-u
</code>
</p>
<p>
Remove the user name from the login path.
</p>
</li>
<li class="listitem">
<p>
<code class="option">
--warn
</code>
,
<code class="option">
-w
</code>
</p>
<p>
Warn and prompt the user for confirmation if the command
attempts to remove the default login path
(
<code class="literal">
client
</code>
) and
<code class="option">
--login-path=client
</code>
was not specified.
This option is enabled by default; use
<code class="option">
--skip-warn
</code>
to disable it.
</p>
</li>
</ul>
</div>
</li>
<li class="listitem">
<p>
<code class="literal">
reset
[
<em class="replaceable">
<code>
options
</code>
</em>
]
</code>
</p>
<p>
Empty the contents of the login path file.
</p>
<p>
The
<code class="literal">
reset
</code>
command permits these options
following the command name:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
<code class="option">
--help
</code>
,
<code class="option">
-?
</code>
</p>
<p>
Display a help message for the
<code class="literal">
reset
</code>
command and exit.
</p>
<p>
To see a general help message, use
<a class="link" href="mysql-config-editor.html" title="6.6.7 mysql_config_editor — MySQL Configuration Utility">
<span class="command">
<strong>
mysql_config_editor --help
</strong>
</span>
</a>
.
</p>
</li>
</ul>
</div>
</li>
<li class="listitem">
<p>
<code class="literal">
set [
<em class="replaceable">
<code>
options
</code>
</em>
]
</code>
</p>
<p>
Write a login path to the login path file.
</p>
<p>
This command writes to the login path only such options as
are specified with the
<code class="option">
--host
</code>
,
<code class="option">
--password
</code>
,
<code class="option">
--port
</code>
,
<code class="option">
--socket
</code>
, and
<code class="option">
--user
</code>
options. If none of those options are given,
<a class="link" href="mysql-config-editor.html" title="6.6.7 mysql_config_editor — MySQL Configuration Utility">
<span class="command">
<strong>
mysql_config_editor
</strong>
</span>
</a>
writes the login path
as an empty group.
</p>
<p>
The
<code class="literal">
set
</code>
command permits these options
following the command name:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
<code class="option">
--help
</code>
,
<code class="option">
-?
</code>
</p>
<p>
Display a help message for the
<code class="literal">
set
</code>
command and exit.
</p>
<p>
To see a general help message, use
<a class="link" href="mysql-config-editor.html" title="6.6.7 mysql_config_editor — MySQL Configuration Utility">
<span class="command">
<strong>
mysql_config_editor --help
</strong>
</span>
</a>
.
</p>
</li>
<li class="listitem">
<p>
<code class="option">
--host=
<em class="replaceable">
<code>
host_name
</code>
</em>
</code>
,
<code class="option">
-h
<em class="replaceable">
<code>
host_name
</code>
</em>
</code>
</p>
<p>
The host name to write to the login path.
</p>
</li>
<li class="listitem">
<p>
<code class="option">
--login-path=
<em class="replaceable">
<code>
name
</code>
</em>
</code>
,
<code class="option">
-G
<em class="replaceable">
<code>
name
</code>
</em>
</code>
</p>
<p>
The login path to create. The default login path name is
<code class="literal">
client
</code>
if this option is not given.
</p>
</li>
<li class="listitem">
<p>
<code class="option">
--password
</code>
,
<code class="option">
-p
</code>
</p>
<p>
Prompt for a password to write to the login path. After
<a class="link" href="mysql-config-editor.html" title="6.6.7 mysql_config_editor — MySQL Configuration Utility">
<span class="command">
<strong>
mysql_config_editor
</strong>
</span>
</a>
displays the
prompt, type the password and press Enter. To prevent
other users from seeing the password,
<a class="link" href="mysql-config-editor.html" title="6.6.7 mysql_config_editor — MySQL Configuration Utility">
<span class="command">
<strong>
mysql_config_editor
</strong>
</span>
</a>
does not echo it.
</p>
<p>
To specify an empty password, press Enter at the
password prompt. The resulting login path written to the
login path file includes a line like this:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-ini"><div class="docs-select-all right" id="sa22576990"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-ini"><span class="token constant">password</span> <span class="token attr-value"><span class="token punctuation">=</span></span></code></pre>
</div>
</li>
<li class="listitem">
<p>
<code class="option">
--port=
<em class="replaceable">
<code>
port_num
</code>
</em>
</code>
,
<code class="option">
-P
<em class="replaceable">
<code>
port_num
</code>
</em>
</code>
</p>
<p>
The TCP/IP port number to write to the login path.
</p>
</li>
<li class="listitem">
<p>
<code class="option">
--socket=
<em class="replaceable">
<code>
file_name
</code>
</em>
</code>
,
<code class="option">
-S
<em class="replaceable">
<code>
file_name
</code>
</em>
</code>
</p>
<p>
The Unix socket file name to write to the login path.
</p>
</li>
<li class="listitem">
<p>
<code class="option">
--user=
<em class="replaceable">
<code>
user_name
</code>
</em>
</code>
,
<code class="option">
-u
<em class="replaceable">
<code>
user_name
</code>
</em>
</code>
</p>
<p>
The user name to write to the login path.
</p>
</li>
<li class="listitem">
<p>
<code class="option">
--warn
</code>
,
<code class="option">
-w
</code>
</p>
<p>
Warn and prompt the user for confirmation if the command
attempts to overwrite an existing login path. This
option is enabled by default; use
<code class="option">
--skip-warn
</code>
to disable it.
</p>
</li>
</ul>
</div>
</li>
</ul>
</div>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/charset-unicode-utf8mb4.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a name="charset-unicode-utf8mb4">
</a>
12.9.1 The utf8mb4 Character Set (4-Byte UTF-8 Unicode Encoding)
</h3>
</div>
</div>
</div>
<a class="indexterm" name="idm46045216686416">
</a>
<p>
The
<code class="literal">
utf8mb4
</code>
character set has these
characteristics:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
Supports BMP and supplementary characters.
</p>
</li>
<li class="listitem">
<p>
Requires a maximum of four bytes per multibyte character.
</p>
</li>
</ul>
</div>
<p>
<code class="literal">
utf8mb4
</code>
contrasts with the
<code class="literal">
utf8mb3
</code>
character set, which supports only
BMP characters and uses a maximum of three bytes per character:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
For a BMP character,
<code class="literal">
utf8mb4
</code>
and
<code class="literal">
utf8mb3
</code>
have identical storage
characteristics: same code values, same encoding, same
length.
</p>
</li>
<li class="listitem">
<p>
For a supplementary character,
<code class="literal">
utf8mb4
</code>
requires four bytes to store it, whereas
<code class="literal">
utf8mb3
</code>
cannot store the character at
all. When converting
<code class="literal">
utf8mb3
</code>
columns to
<code class="literal">
utf8mb4
</code>
, you need not worry about
converting supplementary characters because there are none.
</p>
</li>
</ul>
</div>
<p>
<code class="literal">
utf8mb4
</code>
is a superset of
<code class="literal">
utf8mb3
</code>
, so for an operation such as the
following concatenation, the result has character set
<code class="literal">
utf8mb4
</code>
and the collation of
<code class="literal">
utf8mb4_col
</code>
:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa14693168"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SELECT</span> <span class="token function">CONCAT</span><span class="token punctuation">(</span>utf8mb3_col<span class="token punctuation">,</span> utf8mb4_col<span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
Similarly, the following comparison in the
<code class="literal">
WHERE
</code>
clause works according to the collation
of
<code class="literal">
utf8mb4_col
</code>
:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa63790147"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SELECT</span> <span class="token operator">*</span> <span class="token keyword">FROM</span> utf8mb3_tbl<span class="token punctuation">,</span> utf8mb4_tbl
<span class="token keyword">WHERE</span> utf8mb3_tbl<span class="token punctuation">.</span>utf8mb3_col <span class="token operator">=</span> utf8mb4_tbl<span class="token punctuation">.</span>utf8mb4_col<span class="token punctuation">;</span></code></pre>
</div>
<p>
For information about data type storage as it relates to
multibyte character sets, see
<a class="xref" href="storage-requirements.html#data-types-storage-reqs-strings" title="String Type Storage Requirements">
String Type Storage Requirements
</a>
.
</p>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/optimizer-hints.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a name="optimizer-hints">
</a>
10.9.3 Optimizer Hints
</h3>
</div>
</div>
</div>
<a class="indexterm" name="idm46045224183312">
</a>
<a class="indexterm" name="idm46045224182240">
</a>
<p>
One means of control over optimizer strategies is to set the
<a class="link" href="server-system-variables.html#sysvar_optimizer_switch">
<code class="literal">
optimizer_switch
</code>
</a>
system
variable (see
<a class="xref" href="switchable-optimizations.html" title="10.9.2 Switchable Optimizations">
Section 10.9.2, “Switchable Optimizations”
</a>
).
Changes to this variable affect execution of all subsequent
queries; to affect one query differently from another, it is
necessary to change
<a class="link" href="server-system-variables.html#sysvar_optimizer_switch">
<code class="literal">
optimizer_switch
</code>
</a>
before each
one.
</p>
<p>
Another way to control the optimizer is by using optimizer
hints, which can be specified within individual statements.
Because optimizer hints apply on a per-statement basis, they
provide finer control over statement execution plans than can be
achieved using
<a class="link" href="server-system-variables.html#sysvar_optimizer_switch">
<code class="literal">
optimizer_switch
</code>
</a>
. For example,
you can enable an optimization for one table in a statement and
disable the optimization for a different table. Hints within a
statement take precedence over
<a class="link" href="server-system-variables.html#sysvar_optimizer_switch">
<code class="literal">
optimizer_switch
</code>
</a>
flags.
</p>
<p>
Examples:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa33736983"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ NO_RANGE_OPTIMIZATION(t3 PRIMARY, f2_idx) */</span> f1
<span class="token keyword">FROM</span> t3 <span class="token keyword">WHERE</span> f1 <span class="token operator">></span> <span class="token number">30</span> <span class="token operator">AND</span> f1 <span class="token operator"><</span> <span class="token number">33</span><span class="token punctuation">;</span>
<span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ BKA(t1) NO_BKA(t2) */</span> <span class="token operator">*</span> <span class="token keyword">FROM</span> t1 <span class="token keyword">INNER</span> <span class="token keyword">JOIN</span> t2 <span class="token keyword">WHERE</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">;</span>
<span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ NO_ICP(t1, t2) */</span> <span class="token operator">*</span> <span class="token keyword">FROM</span> t1 <span class="token keyword">INNER</span> <span class="token keyword">JOIN</span> t2 <span class="token keyword">WHERE</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">;</span>
<span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ SEMIJOIN(FIRSTMATCH, LOOSESCAN) */</span> <span class="token operator">*</span> <span class="token keyword">FROM</span> t1 <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">;</span>
<span class="token keyword">EXPLAIN</span> <span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ NO_ICP(t1) */</span> <span class="token operator">*</span> <span class="token keyword">FROM</span> t1 <span class="token keyword">WHERE</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">;</span>
<span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ MERGE(dt) */</span> <span class="token operator">*</span> <span class="token keyword">FROM</span> <span class="token punctuation">(</span><span class="token keyword">SELECT</span> <span class="token operator">*</span> <span class="token keyword">FROM</span> t1<span class="token punctuation">)</span> <span class="token keyword">AS</span> dt<span class="token punctuation">;</span>
<span class="token keyword">INSERT</span> <span class="token comment" spellcheck="true">/*+ SET_VAR(foreign_key_checks=OFF) */</span> <span class="token keyword">INTO</span> t2 <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token number">2</span><span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
Optimizer hints, described here, differ from index hints,
described in
<a class="xref" href="index-hints.html" title="10.9.4 Index Hints">
Section 10.9.4, “Index Hints”
</a>
. Optimizer and index
hints may be used separately or together.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<a class="xref" href="optimizer-hints.html#optimizer-hints-overview" title="Optimizer Hint Overview">
Optimizer Hint Overview
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="xref" href="optimizer-hints.html#optimizer-hints-syntax" title="Optimizer Hint Syntax">
Optimizer Hint Syntax
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="xref" href="optimizer-hints.html#optimizer-hints-join-order" title="Join-Order Optimizer Hints">
Join-Order Optimizer Hints
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="xref" href="optimizer-hints.html#optimizer-hints-table-level" title="Table-Level Optimizer Hints">
Table-Level Optimizer Hints
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="xref" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
Index-Level Optimizer Hints
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="xref" href="optimizer-hints.html#optimizer-hints-subquery" title="Subquery Optimizer Hints">
Subquery Optimizer Hints
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="xref" href="optimizer-hints.html#optimizer-hints-execution-time" title="Statement Execution Time Optimizer Hints">
Statement Execution Time Optimizer Hints
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="xref" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
Variable-Setting Hint Syntax
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="xref" href="optimizer-hints.html#optimizer-hints-resource-group" title="Resource Group Hint Syntax">
Resource Group Hint Syntax
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="xref" href="optimizer-hints.html#optimizer-hints-query-block-naming" title="Optimizer Hints for Naming Query Blocks">
Optimizer Hints for Naming Query Blocks
</a>
</p>
</li>
</ul>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title">
<a name="optimizer-hints-overview">
</a>
Optimizer Hint Overview
</h4>
</div>
</div>
</div>
<p>
Optimizer hints apply at different scope levels:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
Global: The hint affects the entire statement
</p>
</li>
<li class="listitem">
<p>
Query block: The hint affects a particular query block
within a statement
</p>
</li>
<li class="listitem">
<p>
Table-level: The hint affects a particular table within a
query block
</p>
</li>
<li class="listitem">
<p>
Index-level: The hint affects a particular index within a
table
</p>
</li>
</ul>
</div>
<p>
The following table summarizes the available optimizer hints,
the optimizer strategies they affect, and the scope or scopes
at which they apply. More details are given later.
</p>
<div class="table">
<a name="optimizer-hints-table">
</a>
<p class="title">
<b>
Table 10.2 Optimizer Hints Available
</b>
</p>
<div class="table-contents">
<table summary="Optimizer hint names, descriptions, and contexts in which they apply.">
<colgroup>
<col style="width: 30%"/>
<col style="width: 40%"/>
<col style="width: 30%"/>
</colgroup>
<thead>
<tr>
<th scope="col">
Hint Name
</th>
<th scope="col">
Description
</th>
<th scope="col">
Applicable Scopes
</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">
<a class="link" href="optimizer-hints.html#optimizer-hints-table-level" title="Table-Level Optimizer Hints">
<code class="literal">
BKA
</code>
</a>
,
<a class="link" href="optimizer-hints.html#optimizer-hints-table-level" title="Table-Level Optimizer Hints">
<code class="literal">
NO_BKA
</code>
</a>
</th>
<td>
Affects Batched Key Access join processing
</td>
<td>
Query block, table
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="optimizer-hints.html#optimizer-hints-table-level" title="Table-Level Optimizer Hints">
<code class="literal">
BNL
</code>
</a>
,
<a class="link" href="optimizer-hints.html#optimizer-hints-table-level" title="Table-Level Optimizer Hints">
<code class="literal">
NO_BNL
</code>
</a>
</th>
<td>
Affects hash join optimization
</td>
<td>
Query block, table
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="optimizer-hints.html#optimizer-hints-table-level" title="Table-Level Optimizer Hints">
<code class="literal">
DERIVED_CONDITION_PUSHDOWN
</code>
</a>
,
<a class="link" href="optimizer-hints.html#optimizer-hints-table-level" title="Table-Level Optimizer Hints">
<code class="literal">
NO_DERIVED_CONDITION_PUSHDOWN
</code>
</a>
</th>
<td>
Use or ignore the derived condition pushdown optimization for
materialized derived tables
</td>
<td>
Query block, table
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
GROUP_INDEX
</code>
</a>
,
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
NO_GROUP_INDEX
</code>
</a>
</th>
<td>
Use or ignore the specified index or indexes for index scans in
<code class="literal">
GROUP BY
</code>
operations
</td>
<td>
Index
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="optimizer-hints.html#optimizer-hints-table-level" title="Table-Level Optimizer Hints">
<code class="literal">
HASH_JOIN
</code>
</a>
,
<a class="link" href="optimizer-hints.html#optimizer-hints-table-level" title="Table-Level Optimizer Hints">
<code class="literal">
NO_HASH_JOIN
</code>
</a>
</th>
<td>
Affects Hash Join optimization (No effect in MySQL 8.4)
</td>
<td>
Query block, table
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
INDEX
</code>
</a>
,
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
NO_INDEX
</code>
</a>
</th>
<td>
Acts as the combination of
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
JOIN_INDEX
</code>
</a>
,
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
GROUP_INDEX
</code>
</a>
, and
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
ORDER_INDEX
</code>
</a>
, or as the
combination of
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
NO_JOIN_INDEX
</code>
</a>
,
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
NO_GROUP_INDEX
</code>
</a>
, and
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
NO_ORDER_INDEX
</code>
</a>
</td>
<td>
Index
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
INDEX_MERGE
</code>
</a>
,
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
NO_INDEX_MERGE
</code>
</a>
</th>
<td>
Affects Index Merge optimization
</td>
<td>
Table, index
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="optimizer-hints.html#optimizer-hints-join-order" title="Join-Order Optimizer Hints">
<code class="literal">
JOIN_FIXED_ORDER
</code>
</a>
</th>
<td>
Use table order specified in
<code class="literal">
FROM
</code>
clause for join
order
</td>
<td>
Query block
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
JOIN_INDEX
</code>
</a>
,
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
NO_JOIN_INDEX
</code>
</a>
</th>
<td>
Use or ignore the specified index or indexes for any access method
</td>
<td>
Index
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="optimizer-hints.html#optimizer-hints-join-order" title="Join-Order Optimizer Hints">
<code class="literal">
JOIN_ORDER
</code>
</a>
</th>
<td>
Use table order specified in hint for join order
</td>
<td>
Query block
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="optimizer-hints.html#optimizer-hints-join-order" title="Join-Order Optimizer Hints">
<code class="literal">
JOIN_PREFIX
</code>
</a>
</th>
<td>
Use table order specified in hint for first tables of join order
</td>
<td>
Query block
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="optimizer-hints.html#optimizer-hints-join-order" title="Join-Order Optimizer Hints">
<code class="literal">
JOIN_SUFFIX
</code>
</a>
</th>
<td>
Use table order specified in hint for last tables of join order
</td>
<td>
Query block
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="optimizer-hints.html#optimizer-hints-execution-time" title="Statement Execution Time Optimizer Hints">
<code class="literal">
MAX_EXECUTION_TIME
</code>
</a>
</th>
<td>
Limits statement execution time
</td>
<td>
Global
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="optimizer-hints.html#optimizer-hints-table-level" title="Table-Level Optimizer Hints">
<code class="literal">
MERGE
</code>
</a>
,
<a class="link" href="optimizer-hints.html#optimizer-hints-table-level" title="Table-Level Optimizer Hints">
<code class="literal">
NO_MERGE
</code>
</a>
</th>
<td>
Affects derived table/view merging into outer query block
</td>
<td>
Table
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
MRR
</code>
</a>
,
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
NO_MRR
</code>
</a>
</th>
<td>
Affects Multi-Range Read optimization
</td>
<td>
Table, index
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
NO_ICP
</code>
</a>
</th>
<td>
Affects Index Condition Pushdown optimization
</td>
<td>
Table, index
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
NO_RANGE_OPTIMIZATION
</code>
</a>
</th>
<td>
Affects range optimization
</td>
<td>
Table, index
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
ORDER_INDEX
</code>
</a>
,
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
NO_ORDER_INDEX
</code>
</a>
</th>
<td>
Use or ignore the specified index or indexes for sorting rows
</td>
<td>
Index
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="optimizer-hints.html#optimizer-hints-query-block-naming" title="Optimizer Hints for Naming Query Blocks">
<code class="literal">
QB_NAME
</code>
</a>
</th>
<td>
Assigns name to query block
</td>
<td>
Query block
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="optimizer-hints.html#optimizer-hints-resource-group" title="Resource Group Hint Syntax">
<code class="literal">
RESOURCE_GROUP
</code>
</a>
</th>
<td>
Set resource group during statement execution
</td>
<td>
Global
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="optimizer-hints.html#optimizer-hints-subquery" title="Subquery Optimizer Hints">
<code class="literal">
SEMIJOIN
</code>
</a>
,
<a class="link" href="optimizer-hints.html#optimizer-hints-subquery" title="Subquery Optimizer Hints">
<code class="literal">
NO_SEMIJOIN
</code>
</a>
</th>
<td>
Affects semijoin and antijoin strategies
</td>
<td>
Query block
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
SKIP_SCAN
</code>
</a>
,
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
NO_SKIP_SCAN
</code>
</a>
</th>
<td>
Affects Skip Scan optimization
</td>
<td>
Table, index
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
</th>
<td>
Set variable during statement execution
</td>
<td>
Global
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="optimizer-hints.html#optimizer-hints-subquery" title="Subquery Optimizer Hints">
<code class="literal">
SUBQUERY
</code>
</a>
</th>
<td>
Affects materialization,
<code class="literal">
IN
</code>
-to-
<code class="literal">
EXISTS
</code>
subquery strategies
</td>
<td>
Query block
</td>
</tr>
</tbody>
</table>
</div>
<div class="table-contents">
<table cellpadding="0" cellspacing="0" style="position: fixed; top: 0px; display: none; left: 401px; width: 739px;">
<thead>
<tr>
<th scope="col" style="width: 242.641px;">
Hint Name
</th>
<th scope="col" style="width: 283.516px;">
Description
</th>
<th scope="col" style="width: 211.844px;">
Applicable Scopes
</th>
</tr>
</thead>
</table>
</div>
</div>
<br class="table-break"/>
<p>
Disabling an optimization prevents the optimizer from using
it. Enabling an optimization means the optimizer is free to
use the strategy if it applies to statement execution, not
that the optimizer necessarily uses it.
</p>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title">
<a name="optimizer-hints-syntax">
</a>
Optimizer Hint Syntax
</h4>
</div>
</div>
</div>
<p>
MySQL supports comments in SQL statements as described in
<a class="xref" href="comments.html" title="11.7 Comments">
Section 11.7, “Comments”
</a>
. Optimizer hints must be specified
within
<code class="literal">
/*+ ... */
</code>
comments. That is,
optimizer hints use a variant of
<code class="literal">
/* ... */
</code>
C-style comment syntax, with a
<code class="literal">
+
</code>
character
following the
<code class="literal">
/*
</code>
comment opening sequence.
Examples:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa65833951"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token comment" spellcheck="true">/*+ BKA(t1) */</span>
<span class="token comment" spellcheck="true">/*+ BNL(t1, t2) */</span>
<span class="token comment" spellcheck="true">/*+ NO_RANGE_OPTIMIZATION(t4 PRIMARY) */</span>
<span class="token comment" spellcheck="true">/*+ QB_NAME(qb2) */</span></code></pre>
</div>
<p>
Whitespace is permitted after the
<code class="literal">
+
</code>
character.
</p>
<p>
The parser recognizes optimizer hint comments after the
initial keyword of
<a class="link" href="select.html" title="15.2.13 SELECT Statement">
<code class="literal">
SELECT
</code>
</a>
,
<a class="link" href="update.html" title="15.2.17 UPDATE Statement">
<code class="literal">
UPDATE
</code>
</a>
,
<a class="link" href="insert.html" title="15.2.7 INSERT Statement">
<code class="literal">
INSERT
</code>
</a>
,
<a class="link" href="replace.html" title="15.2.12 REPLACE Statement">
<code class="literal">
REPLACE
</code>
</a>
, and
<a class="link" href="delete.html" title="15.2.2 DELETE Statement">
<code class="literal">
DELETE
</code>
</a>
statements. Hints are
permitted in these contexts:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
At the beginning of query and data change statements:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa15791451"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ ... */</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>
<span class="token keyword">INSERT</span> <span class="token comment" spellcheck="true">/*+ ... */</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>
<span class="token keyword">REPLACE</span> <span class="token comment" spellcheck="true">/*+ ... */</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>
<span class="token keyword">UPDATE</span> <span class="token comment" spellcheck="true">/*+ ... */</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>
<span class="token keyword">DELETE</span> <span class="token comment" spellcheck="true">/*+ ... */</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span></code></pre>
</div>
</li>
<li class="listitem">
<p>
At the beginning of query blocks:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa54181279"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token punctuation">(</span><span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ ... */</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span> <span class="token punctuation">)</span>
<span class="token punctuation">(</span><span class="token keyword">SELECT</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span> <span class="token punctuation">)</span> <span class="token keyword">UNION</span> <span class="token punctuation">(</span><span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ ... */</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span> <span class="token punctuation">)</span>
<span class="token punctuation">(</span><span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ ... */</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span> <span class="token punctuation">)</span> <span class="token keyword">UNION</span> <span class="token punctuation">(</span><span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ ... */</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span> <span class="token punctuation">)</span>
<span class="token keyword">UPDATE</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span> <span class="token keyword">WHERE</span> x <span class="token keyword">IN</span> <span class="token punctuation">(</span><span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ ... */</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">)</span>
<span class="token keyword">INSERT</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span> <span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ ... */</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span></code></pre>
</div>
</li>
<li class="listitem">
<p>
In hintable statements prefaced by
<a class="link" href="explain.html" title="15.8.2 EXPLAIN Statement">
<code class="literal">
EXPLAIN
</code>
</a>
. For example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa42605398"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">EXPLAIN</span> <span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ ... */</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>
<span class="token keyword">EXPLAIN</span> <span class="token keyword">UPDATE</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span> <span class="token keyword">WHERE</span> x <span class="token keyword">IN</span> <span class="token punctuation">(</span><span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ ... */</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">)</span></code></pre>
</div>
<p>
The implication is that you can use
<a class="link" href="explain.html" title="15.8.2 EXPLAIN Statement">
<code class="literal">
EXPLAIN
</code>
</a>
to see how
optimizer hints affect execution plans. Use
<a class="link" href="show-warnings.html" title="15.7.7.42 SHOW WARNINGS Statement">
<code class="literal">
SHOW WARNINGS
</code>
</a>
immediately
after
<a class="link" href="explain.html" title="15.8.2 EXPLAIN Statement">
<code class="literal">
EXPLAIN
</code>
</a>
to see how
hints are used. The extended
<code class="literal">
EXPLAIN
</code>
output displayed by a following
<a class="link" href="show-warnings.html" title="15.7.7.42 SHOW WARNINGS Statement">
<code class="literal">
SHOW
WARNINGS
</code>
</a>
indicates which hints were used.
Ignored hints are not displayed.
</p>
</li>
</ul>
</div>
<p>
A hint comment may contain multiple hints, but a query block
cannot contain multiple hint comments. This is valid:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa23727463"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ BNL(t1) BKA(t2) */</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span></code></pre>
</div>
<p>
But this is invalid:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa19595700"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ BNL(t1) */</span> <span class="token comment" spellcheck="true">/* BKA(t2) */</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span></code></pre>
</div>
<p>
When a hint comment contains multiple hints, the possibility
of duplicates and conflicts exists. The following general
guidelines apply. For specific hint types, additional rules
may apply, as indicated in the hint descriptions.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
Duplicate hints: For a hint such as
<code class="literal">
/*+ MRR(idx1)
MRR(idx1) */
</code>
, MySQL uses the first hint and
issues a warning about the duplicate hint.
</p>
</li>
<li class="listitem">
<p>
Conflicting hints: For a hint such as
<code class="literal">
/*+
MRR(idx1) NO_MRR(idx1) */
</code>
, MySQL uses the first
hint and issues a warning about the second conflicting
hint.
</p>
</li>
</ul>
</div>
<p>
Query block names are identifiers and follow the usual rules
about what names are valid and how to quote them (see
<a class="xref" href="identifiers.html" title="11.2 Schema Object Names">
Section 11.2, “Schema Object Names”
</a>
).
</p>
<p>
Hint names, query block names, and strategy names are not
case-sensitive. References to table and index names follow the
usual identifier case-sensitivity rules (see
<a class="xref" href="identifier-case-sensitivity.html" title="11.2.3 Identifier Case Sensitivity">
Section 11.2.3, “Identifier Case Sensitivity”
</a>
).
</p>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title">
<a name="optimizer-hints-join-order">
</a>
Join-Order Optimizer Hints
</h4>
</div>
</div>
</div>
<p>
Join-order hints affect the order in which the optimizer joins
tables.
</p>
<p>
Syntax of the
<a class="link" href="optimizer-hints.html#optimizer-hints-join-order" title="Join-Order Optimizer Hints">
<code class="literal">
JOIN_FIXED_ORDER
</code>
</a>
hint:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa80196283"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><em class="replaceable">hint_name</em><span class="token punctuation">(</span><span class="token punctuation">[</span><span class="token variable">@<em class="replaceable">query_block_name</em></span><span class="token punctuation">]</span><span class="token punctuation">)</span></code></pre>
</div>
<p>
Syntax of other join-order hints:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa67021076"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><em class="replaceable">hint_name</em><span class="token punctuation">(</span><span class="token punctuation">[</span><span class="token variable">@<em class="replaceable">query_block_name</em></span><span class="token punctuation">]</span> <em class="replaceable">tbl_name</em> <span class="token punctuation">[</span><span class="token punctuation">,</span> <em class="replaceable">tbl_name</em><span class="token punctuation">]</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">)</span>
<em class="replaceable">hint_name</em><span class="token punctuation">(</span><em class="replaceable">tbl_name</em><span class="token punctuation">[</span><span class="token variable">@<em class="replaceable">query_block_name</em></span><span class="token punctuation">]</span> <span class="token punctuation">[</span><span class="token punctuation">,</span> <em class="replaceable">tbl_name</em><span class="token punctuation">[</span><span class="token variable">@<em class="replaceable">query_block_name</em></span><span class="token punctuation">]</span><span class="token punctuation">]</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">)</span></code></pre>
</div>
<p>
The syntax refers to these terms:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<em class="replaceable">
<code>
hint_name
</code>
</em>
: These hint names are
permitted:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
<a class="link" href="optimizer-hints.html#optimizer-hints-join-order" title="Join-Order Optimizer Hints">
<code class="literal">
JOIN_FIXED_ORDER
</code>
</a>
:
Force the optimizer to join tables using the order in
which they appear in the
<code class="literal">
FROM
</code>
clause. This is the same as specifying
<code class="literal">
SELECT
STRAIGHT_JOIN
</code>
.
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="optimizer-hints.html#optimizer-hints-join-order" title="Join-Order Optimizer Hints">
<code class="literal">
JOIN_ORDER
</code>
</a>
: Instruct
the optimizer to join tables using the specified table
order. The hint applies to the named tables. The
optimizer may place tables that are not named anywhere
in the join order, including between specified tables.
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="optimizer-hints.html#optimizer-hints-join-order" title="Join-Order Optimizer Hints">
<code class="literal">
JOIN_PREFIX
</code>
</a>
:
Instruct the optimizer to join tables using the
specified table order for the first tables of the join
execution plan. The hint applies to the named tables.
The optimizer places all other tables after the named
tables.
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="optimizer-hints.html#optimizer-hints-join-order" title="Join-Order Optimizer Hints">
<code class="literal">
JOIN_SUFFIX
</code>
</a>
:
Instruct the optimizer to join tables using the
specified table order for the last tables of the join
execution plan. The hint applies to the named tables.
The optimizer places all other tables before the named
tables.
</p>
</li>
</ul>
</div>
</li>
<li class="listitem">
<p>
<em class="replaceable">
<code>
tbl_name
</code>
</em>
: The name of a table
used in the statement. A hint that names tables applies to
all tables that it names. The
<a class="link" href="optimizer-hints.html#optimizer-hints-join-order" title="Join-Order Optimizer Hints">
<code class="literal">
JOIN_FIXED_ORDER
</code>
</a>
hint
names no tables and applies to all tables in the
<code class="literal">
FROM
</code>
clause of the query block in which
it occurs.
</p>
<p>
If a table has an alias, hints must refer to the alias,
not the table name.
</p>
<p>
Table names in hints cannot be qualified with schema
names.
</p>
</li>
<li class="listitem">
<p>
<em class="replaceable">
<code>
query_block_name
</code>
</em>
: The query
block to which the hint applies. If the hint includes no
leading
<code class="literal">
@
<em class="replaceable">
<code>
query_block_name
</code>
</em>
</code>
,
the hint applies to the query block in which it occurs.
For
<code class="literal">
<em class="replaceable">
<code>
tbl_name
</code>
</em>
@
<em class="replaceable">
<code>
query_block_name
</code>
</em>
</code>
syntax, the hint applies to the named table in the named
query block. To assign a name to a query block, see
<a class="xref" href="optimizer-hints.html#optimizer-hints-query-block-naming" title="Optimizer Hints for Naming Query Blocks">
Optimizer Hints for Naming Query Blocks
</a>
.
</p>
</li>
</ul>
</div>
<p>
Example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa22510367"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SELECT</span>
<span class="token comment" spellcheck="true">/*+ JOIN_PREFIX(t2, t5@subq2, t4@subq1)
JOIN_ORDER(t4@subq1, t3)
JOIN_SUFFIX(t1) */</span>
<span class="token function">COUNT</span><span class="token punctuation">(</span><span class="token operator">*</span><span class="token punctuation">)</span> <span class="token keyword">FROM</span> t1 <span class="token keyword">JOIN</span> t2 <span class="token keyword">JOIN</span> t3
<span class="token keyword">WHERE</span> t1<span class="token punctuation">.</span>f1 <span class="token keyword">IN</span> <span class="token punctuation">(</span><span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ QB_NAME(subq1) */</span> f1 <span class="token keyword">FROM</span> t4<span class="token punctuation">)</span>
<span class="token operator">AND</span> t2<span class="token punctuation">.</span>f1 <span class="token keyword">IN</span> <span class="token punctuation">(</span><span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ QB_NAME(subq2) */</span> f1 <span class="token keyword">FROM</span> t5<span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
Hints control the behavior of semijoin tables that are merged
to the outer query block. If subqueries
<code class="literal">
subq1
</code>
and
<code class="literal">
subq2
</code>
are
converted to semijoins, tables
<code class="literal">
t4@subq1
</code>
and
<code class="literal">
t5@subq2
</code>
are merged to the outer query
block. In this case, the hint specified in the outer query
block controls the behavior of
<code class="literal">
t4@subq1
</code>
,
<code class="literal">
t5@subq2
</code>
tables.
</p>
<p>
The optimizer resolves join-order hints according to these
principles:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
Multiple hint instances
</p>
<p>
Only one
<a class="link" href="optimizer-hints.html#optimizer-hints-join-order" title="Join-Order Optimizer Hints">
<code class="literal">
JOIN_PREFIX
</code>
</a>
and
<a class="link" href="optimizer-hints.html#optimizer-hints-join-order" title="Join-Order Optimizer Hints">
<code class="literal">
JOIN_SUFFIX
</code>
</a>
hint of each
type are applied. Any later hints of the same type are
ignored with a warning.
<a class="link" href="optimizer-hints.html#optimizer-hints-join-order" title="Join-Order Optimizer Hints">
<code class="literal">
JOIN_ORDER
</code>
</a>
can be
specified several times.
</p>
<p>
Examples:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa1714487"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token comment" spellcheck="true">/*+ JOIN_PREFIX(t1) JOIN_PREFIX(t2) */</span></code></pre>
</div>
<p>
The second
<a class="link" href="optimizer-hints.html#optimizer-hints-join-order" title="Join-Order Optimizer Hints">
<code class="literal">
JOIN_PREFIX
</code>
</a>
hint is ignored with a warning.
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa11097719"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token comment" spellcheck="true">/*+ JOIN_PREFIX(t1) JOIN_SUFFIX(t2) */</span></code></pre>
</div>
<p>
Both hints are applicable. No warning occurs.
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa56475575"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token comment" spellcheck="true">/*+ JOIN_ORDER(t1, t2) JOIN_ORDER(t2, t3) */</span></code></pre>
</div>
<p>
Both hints are applicable. No warning occurs.
</p>
</li>
<li class="listitem">
<p>
Conflicting hints
</p>
<p>
In some cases hints can conflict, such as when
<a class="link" href="optimizer-hints.html#optimizer-hints-join-order" title="Join-Order Optimizer Hints">
<code class="literal">
JOIN_ORDER
</code>
</a>
and
<a class="link" href="optimizer-hints.html#optimizer-hints-join-order" title="Join-Order Optimizer Hints">
<code class="literal">
JOIN_PREFIX
</code>
</a>
have table
orders that are impossible to apply at the same time:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa62329151"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ JOIN_ORDER(t1, t2) JOIN_PREFIX(t2, t1) */</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span> <span class="token keyword">FROM</span> t1<span class="token punctuation">,</span> t2<span class="token punctuation">;</span></code></pre>
</div>
<p>
In this case, the first specified hint is applied and
subsequent conflicting hints are ignored with no warning.
A valid hint that is impossible to apply is silently
ignored with no warning.
</p>
</li>
<li class="listitem">
<p>
Ignored hints
</p>
<p>
A hint is ignored if a table specified in the hint has a
circular dependency.
</p>
<p>
Example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa31596987"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token comment" spellcheck="true">/*+ JOIN_ORDER(t1, t2) JOIN_PREFIX(t2, t1) */</span></code></pre>
</div>
<p>
The
<a class="link" href="optimizer-hints.html#optimizer-hints-join-order" title="Join-Order Optimizer Hints">
<code class="literal">
JOIN_ORDER
</code>
</a>
hint sets
table
<code class="literal">
t2
</code>
dependent on
<code class="literal">
t1
</code>
. The
<a class="link" href="optimizer-hints.html#optimizer-hints-join-order" title="Join-Order Optimizer Hints">
<code class="literal">
JOIN_PREFIX
</code>
</a>
hint is
ignored because table
<code class="literal">
t1
</code>
cannot be
dependent on
<code class="literal">
t2
</code>
. Ignored hints are not
displayed in extended
<a class="link" href="explain.html" title="15.8.2 EXPLAIN Statement">
<code class="literal">
EXPLAIN
</code>
</a>
output.
</p>
</li>
<li class="listitem">
<p>
Interaction with
<a class="link" href="explain-output.html#jointype_const">
<code class="literal">
const
</code>
</a>
tables
</p>
<p>
The MySQL optimizer places
<code class="literal">
const
</code>
tables
first in the join order, and the position of a
<code class="literal">
const
</code>
table cannot be affected by
hints. References to
<code class="literal">
const
</code>
tables in
join-order hints are ignored, although the hint is still
applicable. For example, these are equivalent:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa16459369"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql">JOIN_ORDER<span class="token punctuation">(</span>t1<span class="token punctuation">,</span> <em class="replaceable">const_tbl</em><span class="token punctuation">,</span> t2<span class="token punctuation">)</span>
JOIN_ORDER<span class="token punctuation">(</span>t1<span class="token punctuation">,</span> t2<span class="token punctuation">)</span></code></pre>
</div>
<p>
Accepted hints shown in extended
<a class="link" href="explain.html" title="15.8.2 EXPLAIN Statement">
<code class="literal">
EXPLAIN
</code>
</a>
output include
<code class="literal">
const
</code>
tables as they were specified.
</p>
</li>
<li class="listitem">
<p>
Interaction with types of join operations
</p>
<p>
MySQL supports several type of joins:
<code class="literal">
LEFT
</code>
,
<code class="literal">
RIGHT
</code>
,
<code class="literal">
INNER
</code>
,
<code class="literal">
CROSS
</code>
,
<code class="literal">
STRAIGHT_JOIN
</code>
. A hint that conflicts
with the specified type of join is ignored with no
warning.
</p>
<p>
Example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa2295977"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ JOIN_PREFIX(t1, t2) */</span><span class="token keyword">FROM</span> t2 <span class="token keyword">LEFT</span> <span class="token keyword">JOIN</span> t1<span class="token punctuation">;</span></code></pre>
</div>
<p>
Here a conflict occurs between the requested join order in
the hint and the order required by the
<code class="literal">
LEFT
JOIN
</code>
. The hint is ignored with no warning.
</p>
</li>
</ul>
</div>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title">
<a name="optimizer-hints-table-level">
</a>
Table-Level Optimizer Hints
</h4>
</div>
</div>
</div>
<p>
Table-level hints affect:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
Use of the Block Nested-Loop (BNL) and Batched Key Access
(BKA) join-processing algorithms (see
<a class="xref" href="bnl-bka-optimization.html" title="10.2.1.12 Block Nested-Loop and Batched Key Access Joins">
Section 10.2.1.12, “Block Nested-Loop and Batched Key Access Joins”
</a>
).
</p>
</li>
<li class="listitem">
<p>
Whether derived tables, view references, or common table
expressions should be merged into the outer query block,
or materialized using an internal temporary table.
</p>
</li>
<li class="listitem">
<p>
Use of the derived table condition pushdown optimization.
See
<a class="xref" href="derived-condition-pushdown-optimization.html" title="10.2.2.5 Derived Condition Pushdown Optimization">
Section 10.2.2.5, “Derived Condition Pushdown Optimization”
</a>
.
</p>
</li>
</ul>
</div>
<p>
These hint types apply to specific tables, or all tables in a
query block.
</p>
<p>
Syntax of table-level hints:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa81427253"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><em class="replaceable">hint_name</em><span class="token punctuation">(</span><span class="token punctuation">[</span><span class="token variable">@<em class="replaceable">query_block_name</em></span><span class="token punctuation">]</span> <span class="token punctuation">[</span><em class="replaceable">tbl_name</em> <span class="token punctuation">[</span><span class="token punctuation">,</span> <em class="replaceable">tbl_name</em><span class="token punctuation">]</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">]</span><span class="token punctuation">)</span>
<em class="replaceable">hint_name</em><span class="token punctuation">(</span><span class="token punctuation">[</span><em class="replaceable">tbl_name</em><span class="token variable">@<em class="replaceable">query_block_name</em></span> <span class="token punctuation">[</span><span class="token punctuation">,</span> <em class="replaceable">tbl_name</em><span class="token variable">@<em class="replaceable">query_block_name</em></span><span class="token punctuation">]</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">]</span><span class="token punctuation">)</span></code></pre>
</div>
<p>
The syntax refers to these terms:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<em class="replaceable">
<code>
hint_name
</code>
</em>
: These hint names are
permitted:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
<a class="link" href="optimizer-hints.html#optimizer-hints-table-level" title="Table-Level Optimizer Hints">
<code class="literal">
BKA
</code>
</a>
,
<a class="link" href="optimizer-hints.html#optimizer-hints-table-level" title="Table-Level Optimizer Hints">
<code class="literal">
NO_BKA
</code>
</a>
: Enable or
disable batched key access for the specified tables.
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="optimizer-hints.html#optimizer-hints-table-level" title="Table-Level Optimizer Hints">
<code class="literal">
BNL
</code>
</a>
,
<a class="link" href="optimizer-hints.html#optimizer-hints-table-level" title="Table-Level Optimizer Hints">
<code class="literal">
NO_BNL
</code>
</a>
: Enable and
disable the hash join optimization.
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="optimizer-hints.html#optimizer-hints-table-level" title="Table-Level Optimizer Hints">
<code class="literal">
DERIVED_CONDITION_PUSHDOWN
</code>
</a>
,
<a class="link" href="optimizer-hints.html#optimizer-hints-table-level" title="Table-Level Optimizer Hints">
<code class="literal">
NO_DERIVED_CONDITION_PUSHDOWN
</code>
</a>
:
Enable or disable use of derived table condition
pushdown for the specified tables. For more
information, see
<a class="xref" href="derived-condition-pushdown-optimization.html" title="10.2.2.5 Derived Condition Pushdown Optimization">
Section 10.2.2.5, “Derived Condition Pushdown Optimization”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="optimizer-hints.html#optimizer-hints-table-level" title="Table-Level Optimizer Hints">
<code class="literal">
HASH_JOIN
</code>
</a>
,
<a class="link" href="optimizer-hints.html#optimizer-hints-table-level" title="Table-Level Optimizer Hints">
<code class="literal">
NO_HASH_JOIN
</code>
</a>
: These
hints have no effect in MySQL 8.4; use
<a class="link" href="optimizer-hints.html#optimizer-hints-table-level" title="Table-Level Optimizer Hints">
<code class="literal">
BNL
</code>
</a>
or
<a class="link" href="optimizer-hints.html#optimizer-hints-table-level" title="Table-Level Optimizer Hints">
<code class="literal">
NO_BNL
</code>
</a>
instead.
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="optimizer-hints.html#optimizer-hints-table-level" title="Table-Level Optimizer Hints">
<code class="literal">
MERGE
</code>
</a>
,
<a class="link" href="optimizer-hints.html#optimizer-hints-table-level" title="Table-Level Optimizer Hints">
<code class="literal">
NO_MERGE
</code>
</a>
: Enable
merging for the specified tables, view references or
common table expressions; or disable merging and use
materialization instead.
</p>
<a class="indexterm" name="idm46045223859952">
</a>
<a class="indexterm" name="idm46045223858464">
</a>
<a class="indexterm" name="idm46045223856976">
</a>
</li>
</ul>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
To use a block nested loop or batched key access hint to
enable join buffering for any inner table of an outer
join, join buffering must be enabled for all inner
tables of the outer join.
</p>
</div>
</li>
<li class="listitem">
<p>
<em class="replaceable">
<code>
tbl_name
</code>
</em>
: The name of a table
used in the statement. The hint applies to all tables that
it names. If the hint names no tables, it applies to all
tables of the query block in which it occurs.
</p>
<p>
If a table has an alias, hints must refer to the alias,
not the table name.
</p>
<p>
Table names in hints cannot be qualified with schema
names.
</p>
</li>
<li class="listitem">
<p>
<em class="replaceable">
<code>
query_block_name
</code>
</em>
: The query
block to which the hint applies. If the hint includes no
leading
<code class="literal">
@
<em class="replaceable">
<code>
query_block_name
</code>
</em>
</code>
,
the hint applies to the query block in which it occurs.
For
<code class="literal">
<em class="replaceable">
<code>
tbl_name
</code>
</em>
@
<em class="replaceable">
<code>
query_block_name
</code>
</em>
</code>
syntax, the hint applies to the named table in the named
query block. To assign a name to a query block, see
<a class="xref" href="optimizer-hints.html#optimizer-hints-query-block-naming" title="Optimizer Hints for Naming Query Blocks">
Optimizer Hints for Naming Query Blocks
</a>
.
</p>
</li>
</ul>
</div>
<p>
Examples:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa72585183"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ NO_BKA(t1, t2) */</span> t1<span class="token punctuation">.</span><span class="token operator">*</span> <span class="token keyword">FROM</span> t1 <span class="token keyword">INNER</span> <span class="token keyword">JOIN</span> t2 <span class="token keyword">INNER</span> <span class="token keyword">JOIN</span> t3<span class="token punctuation">;</span>
<span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ NO_BNL() BKA(t1) */</span> t1<span class="token punctuation">.</span><span class="token operator">*</span> <span class="token keyword">FROM</span> t1 <span class="token keyword">INNER</span> <span class="token keyword">JOIN</span> t2 <span class="token keyword">INNER</span> <span class="token keyword">JOIN</span> t3<span class="token punctuation">;</span>
<span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ NO_MERGE(dt) */</span> <span class="token operator">*</span> <span class="token keyword">FROM</span> <span class="token punctuation">(</span><span class="token keyword">SELECT</span> <span class="token operator">*</span> <span class="token keyword">FROM</span> t1<span class="token punctuation">)</span> <span class="token keyword">AS</span> dt<span class="token punctuation">;</span></code></pre>
</div>
<p>
A table-level hint applies to tables that receive records from
previous tables, not sender tables. Consider this statement:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa16737679"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ BNL(t2) */</span> <span class="token keyword">FROM</span> t1<span class="token punctuation">,</span> t2<span class="token punctuation">;</span></code></pre>
</div>
<p>
If the optimizer chooses to process
<code class="literal">
t1
</code>
first, it applies a Block Nested-Loop join to
<code class="literal">
t2
</code>
by buffering the rows from
<code class="literal">
t1
</code>
before starting to read from
<code class="literal">
t2
</code>
. If the optimizer instead chooses to
process
<code class="literal">
t2
</code>
first, the hint has no effect
because
<code class="literal">
t2
</code>
is a sender table.
</p>
<p>
For the
<a class="link" href="optimizer-hints.html#optimizer-hints-table-level" title="Table-Level Optimizer Hints">
<code class="literal">
MERGE
</code>
</a>
and
<a class="link" href="optimizer-hints.html#optimizer-hints-table-level" title="Table-Level Optimizer Hints">
<code class="literal">
NO_MERGE
</code>
</a>
hints, these
precedence rules apply:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
A hint takes precedence over any optimizer heuristic that
is not a technical constraint. (If providing a hint as a
suggestion has no effect, the optimizer has a reason for
ignoring it.)
</p>
</li>
<li class="listitem">
<p>
A hint takes precedence over the
<a class="link" href="switchable-optimizations.html#optflag_derived-merge">
<code class="literal">
derived_merge
</code>
</a>
flag of
the
<a class="link" href="server-system-variables.html#sysvar_optimizer_switch">
<code class="literal">
optimizer_switch
</code>
</a>
system variable.
</p>
</li>
<li class="listitem">
<p>
For view references, an
<code class="literal">
ALGORITHM={MERGE|TEMPTABLE}
</code>
clause in
the view definition takes precedence over a hint specified
in the query referencing the view.
</p>
</li>
</ul>
</div>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title">
<a name="optimizer-hints-index-level">
</a>
Index-Level Optimizer Hints
</h4>
</div>
</div>
</div>
<p>
Index-level hints affect which index-processing strategies the
optimizer uses for particular tables or indexes. These hint
types affect use of Index Condition Pushdown (ICP),
Multi-Range Read (MRR), Index Merge, and range optimizations
(see
<a class="xref" href="select-optimization.html" title="10.2.1 Optimizing SELECT Statements">
Section 10.2.1, “Optimizing SELECT Statements”
</a>
).
</p>
<p>
Syntax of index-level hints:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa9244306"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><em class="replaceable">hint_name</em><span class="token punctuation">(</span><span class="token punctuation">[</span><span class="token variable">@<em class="replaceable">query_block_name</em></span><span class="token punctuation">]</span> <em class="replaceable">tbl_name</em> <span class="token punctuation">[</span><em class="replaceable">index_name</em> <span class="token punctuation">[</span><span class="token punctuation">,</span> <em class="replaceable">index_name</em><span class="token punctuation">]</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">]</span><span class="token punctuation">)</span>
<em class="replaceable">hint_name</em><span class="token punctuation">(</span><em class="replaceable">tbl_name</em><span class="token variable">@<em class="replaceable">query_block_name</em></span> <span class="token punctuation">[</span><em class="replaceable">index_name</em> <span class="token punctuation">[</span><span class="token punctuation">,</span> <em class="replaceable">index_name</em><span class="token punctuation">]</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">]</span><span class="token punctuation">)</span></code></pre>
</div>
<p>
The syntax refers to these terms:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<em class="replaceable">
<code>
hint_name
</code>
</em>
: These hint names are
permitted:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
<a class="indexterm" name="idm46045223818832">
</a>
<a class="indexterm" name="idm46045223817760">
</a>
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
GROUP_INDEX
</code>
</a>
,
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
NO_GROUP_INDEX
</code>
</a>
:
Enable or disable the specified index or indexes for
index scans for
<code class="literal">
GROUP BY
</code>
operations. Equivalent to the index hints
<code class="literal">
FORCE INDEX FOR GROUP BY
</code>
,
<code class="literal">
IGNORE INDEX FOR GROUP BY
</code>
.
</p>
</li>
<li class="listitem">
<p>
<a class="indexterm" name="idm46045223811040">
</a>
<a class="indexterm" name="idm46045223809968">
</a>
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
INDEX
</code>
</a>
,
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
NO_INDEX
</code>
</a>
: Acts as
the combination of
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
JOIN_INDEX
</code>
</a>
,
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
GROUP_INDEX
</code>
</a>
, and
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
ORDER_INDEX
</code>
</a>
, forcing
the server to use the specified index or indexes for
any and all scopes, or as the combination of
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
NO_JOIN_INDEX
</code>
</a>
,
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
NO_GROUP_INDEX
</code>
</a>
, and
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
NO_ORDER_INDEX
</code>
</a>
,
which causes the server to ignore the specified index
or indexes for any and all scopes. Equivalent to
<code class="literal">
FORCE INDEX
</code>
,
<code class="literal">
IGNORE
INDEX
</code>
.
</p>
</li>
<li class="listitem">
<p>
<a class="indexterm" name="idm46045223796224">
</a>
<a class="indexterm" name="idm46045223795152">
</a>
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
INDEX_MERGE
</code>
</a>
,
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
NO_INDEX_MERGE
</code>
</a>
:
Enable or disable the Index Merge access method for
the specified table or indexes. For information about
this access method, see
<a class="xref" href="index-merge-optimization.html" title="10.2.1.3 Index Merge Optimization">
Section 10.2.1.3, “Index Merge Optimization”
</a>
. These
hints apply to all three Index Merge algorithms.
</p>
<p>
The
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
INDEX_MERGE
</code>
</a>
hint
forces the optimizer to use Index Merge for the
specified table using the specified set of indexes. If
no index is specified, the optimizer considers all
possible index combinations and selects the least
expensive one. The hint may be ignored if the index
combination is inapplicable to the given statement.
</p>
<p>
The
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
NO_INDEX_MERGE
</code>
</a>
hint disables Index Merge combinations that involve
any of the specified indexes. If the hint specifies no
indexes, Index Merge is not permitted for the table.
</p>
</li>
<li class="listitem">
<p>
<a class="indexterm" name="idm46045223785776">
</a>
<a class="indexterm" name="idm46045223784704">
</a>
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
JOIN_INDEX
</code>
</a>
,
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
NO_JOIN_INDEX
</code>
</a>
:
Forces MySQL to use or ignore the specified index or
indexes for any access method, such as
<code class="literal">
ref
</code>
,
<code class="literal">
range
</code>
,
<a class="link" href="switchable-optimizations.html#optflag_index-merge">
<code class="literal">
index_merge
</code>
</a>
, and so
on. Equivalent to
<code class="literal">
FORCE INDEX FOR
JOIN
</code>
,
<code class="literal">
IGNORE INDEX FOR
JOIN
</code>
.
</p>
</li>
<li class="listitem">
<p>
<a class="indexterm" name="idm46045223776176">
</a>
<a class="indexterm" name="idm46045223775136">
</a>
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
MRR
</code>
</a>
,
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
NO_MRR
</code>
</a>
: Enable or
disable MRR for the specified table or indexes. MRR
hints apply only to
<code class="literal">
InnoDB
</code>
and
<code class="literal">
MyISAM
</code>
tables. For information
about this access method, see
<a class="xref" href="mrr-optimization.html" title="10.2.1.11 Multi-Range Read Optimization">
Section 10.2.1.11, “Multi-Range Read Optimization”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a class="indexterm" name="idm46045223768496">
</a>
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
NO_ICP
</code>
</a>
: Disable ICP
for the specified table or indexes. By default, ICP is
a candidate optimization strategy, so there is no hint
for enabling it. For information about this access
method, see
<a class="xref" href="index-condition-pushdown-optimization.html" title="10.2.1.6 Index Condition Pushdown Optimization">
Section 10.2.1.6, “Index Condition Pushdown Optimization”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a class="indexterm" name="idm46045223764384">
</a>
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
NO_RANGE_OPTIMIZATION
</code>
</a>
:
Disable index range access for the specified table or
indexes. This hint also disables Index Merge and Loose
Index Scan for the table or indexes. By default, range
access is a candidate optimization strategy, so there
is no hint for enabling it.
</p>
<p>
This hint may be useful when the number of ranges may
be high and range optimization would require many
resources.
</p>
</li>
<li class="listitem">
<p>
<a class="indexterm" name="idm46045223760352">
</a>
<a class="indexterm" name="idm46045223759280">
</a>
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
ORDER_INDEX
</code>
</a>
,
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
NO_ORDER_INDEX
</code>
</a>
:
Cause MySQL to use or to ignore the specified index or
indexes for sorting rows. Equivalent to
<code class="literal">
FORCE
INDEX FOR ORDER BY
</code>
,
<code class="literal">
IGNORE INDEX
FOR ORDER BY
</code>
.
</p>
</li>
<li class="listitem">
<p>
<a class="indexterm" name="idm46045223753328">
</a>
<a class="indexterm" name="idm46045223752256">
</a>
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
SKIP_SCAN
</code>
</a>
,
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
NO_SKIP_SCAN
</code>
</a>
: Enable
or disable the Skip Scan access method for the
specified table or indexes. For information about this
access method, see
<a class="xref" href="range-optimization.html#range-access-skip-scan" title="Skip Scan Range Access Method">
Skip Scan Range Access Method
</a>
.
</p>
<p>
The
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
SKIP_SCAN
</code>
</a>
hint
forces the optimizer to use Skip Scan for the
specified table using the specified set of indexes. If
no index is specified, the optimizer considers all
possible indexes and selects the least expensive one.
The hint may be ignored if the index is inapplicable
to the given statement.
</p>
<p>
The
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
NO_SKIP_SCAN
</code>
</a>
hint disables Skip Scan for the specified indexes. If
the hint specifies no indexes, Skip Scan is not
permitted for the table.
</p>
</li>
</ul>
</div>
</li>
<li class="listitem">
<p>
<em class="replaceable">
<code>
tbl_name
</code>
</em>
: The table to which
the hint applies.
</p>
</li>
<li class="listitem">
<p>
<em class="replaceable">
<code>
index_name
</code>
</em>
: The name of an
index in the named table. The hint applies to all indexes
that it names. If the hint names no indexes, it applies to
all indexes in the table.
</p>
<p>
To refer to a primary key, use the name
<code class="literal">
PRIMARY
</code>
. To see the index names for a
table, use
<a class="link" href="show-index.html" title="15.7.7.23 SHOW INDEX Statement">
<code class="literal">
SHOW INDEX
</code>
</a>
.
</p>
</li>
<li class="listitem">
<p>
<em class="replaceable">
<code>
query_block_name
</code>
</em>
: The query
block to which the hint applies. If the hint includes no
leading
<code class="literal">
@
<em class="replaceable">
<code>
query_block_name
</code>
</em>
</code>
,
the hint applies to the query block in which it occurs.
For
<code class="literal">
<em class="replaceable">
<code>
tbl_name
</code>
</em>
@
<em class="replaceable">
<code>
query_block_name
</code>
</em>
</code>
syntax, the hint applies to the named table in the named
query block. To assign a name to a query block, see
<a class="xref" href="optimizer-hints.html#optimizer-hints-query-block-naming" title="Optimizer Hints for Naming Query Blocks">
Optimizer Hints for Naming Query Blocks
</a>
.
</p>
</li>
</ul>
</div>
<p>
Examples:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa48305550"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ INDEX_MERGE(t1 f3, PRIMARY) */</span> f2 <span class="token keyword">FROM</span> t1
<span class="token keyword">WHERE</span> f1 <span class="token operator">=</span> <span class="token string">'o'</span> <span class="token operator">AND</span> f2 <span class="token operator">=</span> f3 <span class="token operator">AND</span> f3 <span class="token operator"><=</span> <span class="token number">4</span><span class="token punctuation">;</span>
<span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ MRR(t1) */</span> <span class="token operator">*</span> <span class="token keyword">FROM</span> t1 <span class="token keyword">WHERE</span> f2 <span class="token operator"><=</span> <span class="token number">3</span> <span class="token operator">AND</span> <span class="token number">3</span> <span class="token operator"><=</span> f3<span class="token punctuation">;</span>
<span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ NO_RANGE_OPTIMIZATION(t3 PRIMARY, f2_idx) */</span> f1
<span class="token keyword">FROM</span> t3 <span class="token keyword">WHERE</span> f1 <span class="token operator">></span> <span class="token number">30</span> <span class="token operator">AND</span> f1 <span class="token operator"><</span> <span class="token number">33</span><span class="token punctuation">;</span>
<span class="token keyword">INSERT</span> <span class="token keyword">INTO</span> t3<span class="token punctuation">(</span>f1<span class="token punctuation">,</span> f2<span class="token punctuation">,</span> f3<span class="token punctuation">)</span>
<span class="token punctuation">(</span><span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ NO_ICP(t2) */</span> t2<span class="token punctuation">.</span>f1<span class="token punctuation">,</span> t2<span class="token punctuation">.</span>f2<span class="token punctuation">,</span> t2<span class="token punctuation">.</span>f3 <span class="token keyword">FROM</span> t1<span class="token punctuation">,</span>t2
<span class="token keyword">WHERE</span> t1<span class="token punctuation">.</span>f1<span class="token operator">=</span>t2<span class="token punctuation">.</span>f1 <span class="token operator">AND</span> t2<span class="token punctuation">.</span>f2 <span class="token operator">BETWEEN</span> t1<span class="token punctuation">.</span>f1
<span class="token operator">AND</span> t1<span class="token punctuation">.</span>f2 <span class="token operator">AND</span> t2<span class="token punctuation">.</span>f2 <span class="token operator">+</span> <span class="token number">1</span> <span class="token operator">>=</span> t1<span class="token punctuation">.</span>f1 <span class="token operator">+</span> <span class="token number">1</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ SKIP_SCAN(t1 PRIMARY) */</span> f1<span class="token punctuation">,</span> f2
<span class="token keyword">FROM</span> t1 <span class="token keyword">WHERE</span> f2 <span class="token operator">></span> <span class="token number">40</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
The following examples use the Index Merge hints, but other
index-level hints follow the same principles regarding hint
ignoring and precedence of optimizer hints in relation to the
<a class="link" href="server-system-variables.html#sysvar_optimizer_switch">
<code class="literal">
optimizer_switch
</code>
</a>
system
variable or index hints.
</p>
<p>
Assume that table
<code class="literal">
t1
</code>
has columns
<code class="literal">
a
</code>
,
<code class="literal">
b
</code>
,
<code class="literal">
c
</code>
, and
<code class="literal">
d
</code>
; and that
indexes named
<code class="literal">
i_a
</code>
,
<code class="literal">
i_b
</code>
,
and
<code class="literal">
i_c
</code>
exist on
<code class="literal">
a
</code>
,
<code class="literal">
b
</code>
, and
<code class="literal">
c
</code>
, respectively:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa99732889"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ INDEX_MERGE(t1 i_a, i_b, i_c)*/</span> <span class="token operator">*</span> <span class="token keyword">FROM</span> t1
<span class="token keyword">WHERE</span> a <span class="token operator">=</span> <span class="token number">1</span> <span class="token operator">AND</span> b <span class="token operator">=</span> <span class="token number">2</span> <span class="token operator">AND</span> c <span class="token operator">=</span> <span class="token number">3</span> <span class="token operator">AND</span> d <span class="token operator">=</span> <span class="token number">4</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
Index Merge is used for
<code class="literal">
(i_a, i_b, i_c)
</code>
in
this case.
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa7580419"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ INDEX_MERGE(t1 i_a, i_b, i_c)*/</span> <span class="token operator">*</span> <span class="token keyword">FROM</span> t1
<span class="token keyword">WHERE</span> b <span class="token operator">=</span> <span class="token number">1</span> <span class="token operator">AND</span> c <span class="token operator">=</span> <span class="token number">2</span> <span class="token operator">AND</span> d <span class="token operator">=</span> <span class="token number">3</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
Index Merge is used for
<code class="literal">
(i_b, i_c)
</code>
in this
case.
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa52627283"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token comment" spellcheck="true">/*+ INDEX_MERGE(t1 i_a, i_b) NO_INDEX_MERGE(t1 i_b) */</span></code></pre>
</div>
<p>
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
NO_INDEX_MERGE
</code>
</a>
is ignored
because there is a preceding hint for the same table.
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa97399002"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token comment" spellcheck="true">/*+ NO_INDEX_MERGE(t1 i_a, i_b) INDEX_MERGE(t1 i_b) */</span></code></pre>
</div>
<p>
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
INDEX_MERGE
</code>
</a>
is ignored
because there is a preceding hint for the same table.
</p>
<p>
For the
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
INDEX_MERGE
</code>
</a>
and
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
NO_INDEX_MERGE
</code>
</a>
optimizer
hints, these precedence rules apply:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
If an optimizer hint is specified and is applicable, it
takes precedence over the Index Merge-related flags of the
<a class="link" href="server-system-variables.html#sysvar_optimizer_switch">
<code class="literal">
optimizer_switch
</code>
</a>
system
variable.
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa64115511"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SET</span> optimizer_switch<span class="token operator">=</span><span class="token string">'index_merge_intersection=off'</span><span class="token punctuation">;</span>
<span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ INDEX_MERGE(t1 i_b, i_c) */</span> <span class="token operator">*</span> <span class="token keyword">FROM</span> t1
<span class="token keyword">WHERE</span> b <span class="token operator">=</span> <span class="token number">1</span> <span class="token operator">AND</span> c <span class="token operator">=</span> <span class="token number">2</span> <span class="token operator">AND</span> d <span class="token operator">=</span> <span class="token number">3</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
The hint takes precedence over
<a class="link" href="server-system-variables.html#sysvar_optimizer_switch">
<code class="literal">
optimizer_switch
</code>
</a>
. Index
Merge is used for
<code class="literal">
(i_b, i_c)
</code>
in this
case.
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa9673671"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SET</span> optimizer_switch<span class="token operator">=</span><span class="token string">'index_merge_intersection=on'</span><span class="token punctuation">;</span>
<span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ INDEX_MERGE(t1 i_b) */</span> <span class="token operator">*</span> <span class="token keyword">FROM</span> t1
<span class="token keyword">WHERE</span> b <span class="token operator">=</span> <span class="token number">1</span> <span class="token operator">AND</span> c <span class="token operator">=</span> <span class="token number">2</span> <span class="token operator">AND</span> d <span class="token operator">=</span> <span class="token number">3</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
The hint specifies only one index, so it is inapplicable,
and the
<a class="link" href="server-system-variables.html#sysvar_optimizer_switch">
<code class="literal">
optimizer_switch
</code>
</a>
flag (
<code class="literal">
on
</code>
) applies. Index Merge is used
if the optimizer assesses it to be cost efficient.
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa11860701"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SET</span> optimizer_switch<span class="token operator">=</span><span class="token string">'index_merge_intersection=off'</span><span class="token punctuation">;</span>
<span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ INDEX_MERGE(t1 i_b) */</span> <span class="token operator">*</span> <span class="token keyword">FROM</span> t1
<span class="token keyword">WHERE</span> b <span class="token operator">=</span> <span class="token number">1</span> <span class="token operator">AND</span> c <span class="token operator">=</span> <span class="token number">2</span> <span class="token operator">AND</span> d <span class="token operator">=</span> <span class="token number">3</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
The hint specifies only one index, so it is inapplicable,
and the
<a class="link" href="server-system-variables.html#sysvar_optimizer_switch">
<code class="literal">
optimizer_switch
</code>
</a>
flag (
<code class="literal">
off
</code>
) applies. Index Merge is not
used.
</p>
</li>
<li class="listitem">
<p>
The index-level optimizer hints
<code class="literal">
GROUP_INDEX
</code>
,
<code class="literal">
INDEX
</code>
,
<code class="literal">
JOIN_INDEX
</code>
, and
<code class="literal">
ORDER_INDEX
</code>
all take precedence over
the equivalent
<code class="literal">
FORCE INDEX
</code>
hints; that
is, they cause the
<code class="literal">
FORCE INDEX
</code>
hints to
be ignored. Likewise, the
<code class="literal">
NO_GROUP_INDEX
</code>
,
<code class="literal">
NO_INDEX
</code>
,
<code class="literal">
NO_JOIN_INDEX
</code>
, and
<code class="literal">
NO_ORDER_INDEX
</code>
hints all take
precedence over any
<code class="literal">
IGNORE INDEX
</code>
equivalents, also causing them to be ignored.
</p>
<p>
The index-level optimizer hints
<code class="literal">
GROUP_INDEX
</code>
,
<code class="literal">
NO_GROUP_INDEX
</code>
,
<code class="literal">
INDEX
</code>
,
<code class="literal">
NO_INDEX
</code>
,
<code class="literal">
JOIN_INDEX
</code>
,
<code class="literal">
NO_JOIN_INDEX
</code>
,
<code class="literal">
ORDER_INDEX
</code>
, and
<code class="literal">
NO_ORDER_INDEX
</code>
hints all take
precedence over all other optimizer hints, including other
index-level optimizer hints. Any other optimizer hints are
applied only to the indexes permitted by these.
</p>
<p>
The
<code class="literal">
GROUP_INDEX
</code>
,
<code class="literal">
INDEX
</code>
,
<code class="literal">
JOIN_INDEX
</code>
,
and
<code class="literal">
ORDER_INDEX
</code>
hints are all
equivalent to
<code class="literal">
FORCE INDEX
</code>
and not to
<code class="literal">
USE INDEX
</code>
. This is because using one or
more of these hints means that a table scan is used only
if there is no way to use one of the named indexes to find
rows in the table. To cause MySQL to use the same index or
set of indexes as with a given instance of
<code class="literal">
USE
INDEX
</code>
, you can use
<code class="literal">
NO_INDEX
</code>
,
<code class="literal">
NO_JOIN_INDEX
</code>
,
<code class="literal">
NO_GROUP_INDEX
</code>
,
<code class="literal">
NO_ORDER_INDEX
</code>
, or some combination of
these.
</p>
<p>
To replicate the effect that
<code class="literal">
USE INDEX
</code>
has in the query
<code class="literal">
SELECT a,c FROM t1 USE INDEX FOR
ORDER BY (i_a) ORDER BY a
</code>
, you can use the
<code class="literal">
NO_ORDER_INDEX
</code>
optimizer hint to cover
all indexes on the table except the one that is desired
like this:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa33888857"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ NO_ORDER_INDEX(t1 i_b,i_c) */</span> a<span class="token punctuation">,</span>c
<span class="token keyword">FROM</span> t1
<span class="token keyword">ORDER</span> <span class="token keyword">BY</span> a<span class="token punctuation">;</span></code></pre>
</div>
<p>
Attempting to combine
<code class="literal">
NO_ORDER_INDEX
</code>
for the table as a whole with
<code class="literal">
USE INDEX FOR ORDER
BY
</code>
does not work to do this, because
<code class="literal">
NO_ORDER_BY
</code>
causes
<code class="literal">
USE
INDEX
</code>
to be ignored, as shown here:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa13949209"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">EXPLAIN</span> <span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ NO_ORDER_INDEX(t1) */</span> a<span class="token punctuation">,</span>c <span class="token keyword">FROM</span> t1
<span class="token prompt"> -></span> <span class="token keyword">USE</span> <span class="token keyword">INDEX</span> <span class="token keyword">FOR</span> <span class="token keyword">ORDER</span> <span class="token keyword">BY</span> <span class="token punctuation">(</span>i_a<span class="token punctuation">)</span> <span class="token keyword">ORDER</span> <span class="token keyword">BY</span> a\G
<span class="token output"><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 1. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
id<span class="token punctuation">:</span> 1
select_type<span class="token punctuation">:</span> SIMPLE
table<span class="token punctuation">:</span> t1
partitions<span class="token punctuation">:</span> NULL
type<span class="token punctuation">:</span> ALL
possible_keys<span class="token punctuation">:</span> NULL
key<span class="token punctuation">:</span> NULL
key_len<span class="token punctuation">:</span> NULL
ref<span class="token punctuation">:</span> NULL
rows<span class="token punctuation">:</span> 256
filtered<span class="token punctuation">:</span> 100.00
Extra<span class="token punctuation">:</span> Using filesort</span></code></pre>
</div>
</li>
<li class="listitem">
<p>
The
<code class="literal">
USE INDEX
</code>
,
<code class="literal">
FORCE
INDEX
</code>
, and
<code class="literal">
IGNORE INDEX
</code>
index
hints have higher priority than the
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
INDEX_MERGE
</code>
</a>
and
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
NO_INDEX_MERGE
</code>
</a>
optimizer
hints.
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa20681468"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token comment" spellcheck="true">/*+ INDEX_MERGE(t1 i_a, i_b, i_c) */</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span> <span class="token keyword">IGNORE</span> <span class="token keyword">INDEX</span> i_a</code></pre>
</div>
<p>
<code class="literal">
IGNORE INDEX
</code>
takes precedence over
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
INDEX_MERGE
</code>
</a>
, so index
<code class="literal">
i_a
</code>
is excluded from the possible
ranges for Index Merge.
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa84769950"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token comment" spellcheck="true">/*+ NO_INDEX_MERGE(t1 i_a, i_b) */</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span> <span class="token keyword">FORCE</span> <span class="token keyword">INDEX</span> i_a<span class="token punctuation">,</span> i_b</code></pre>
</div>
<p>
Index Merge is disallowed for
<code class="literal">
i_a, i_b
</code>
because of
<code class="literal">
FORCE INDEX
</code>
, but the
optimizer is forced to use either
<code class="literal">
i_a
</code>
or
<code class="literal">
i_b
</code>
for
<a class="link" href="explain-output.html#jointype_range">
<code class="literal">
range
</code>
</a>
or
<a class="link" href="explain-output.html#jointype_ref">
<code class="literal">
ref
</code>
</a>
access. There are
no conflicts; both hints are applicable.
</p>
</li>
<li class="listitem">
<p>
If an
<code class="literal">
IGNORE INDEX
</code>
hint names multiple
indexes, those indexes are unavailable for Index Merge.
</p>
</li>
<li class="listitem">
<p>
The
<code class="literal">
FORCE INDEX
</code>
and
<code class="literal">
USE
INDEX
</code>
hints make only the named indexes to be
available for Index Merge.
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa26171502"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ INDEX_MERGE(t1 i_a, i_b, i_c) */</span> a <span class="token keyword">FROM</span> t1
<span class="token keyword">FORCE</span> <span class="token keyword">INDEX</span> <span class="token punctuation">(</span>i_a<span class="token punctuation">,</span> i_b<span class="token punctuation">)</span> <span class="token keyword">WHERE</span> c <span class="token operator">=</span> <span class="token string">'h'</span> <span class="token operator">AND</span> a <span class="token operator">=</span> <span class="token number">2</span> <span class="token operator">AND</span> b <span class="token operator">=</span> <span class="token string">'b'</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
The Index Merge intersection access algorithm is used for
<code class="literal">
(i_a, i_b)
</code>
. The same is true if
<code class="literal">
FORCE INDEX
</code>
is changed to
<code class="literal">
USE
INDEX
</code>
.
</p>
</li>
</ul>
</div>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title">
<a name="optimizer-hints-subquery">
</a>
Subquery Optimizer Hints
</h4>
</div>
</div>
</div>
<p>
Subquery hints affect whether to use semijoin transformations
and which semijoin strategies to permit, and, when semijoins
are not used, whether to use subquery materialization or
<code class="literal">
IN
</code>
-to-
<code class="literal">
EXISTS
</code>
transformations. For more information about these
optimizations, see
<a class="xref" href="subquery-optimization.html" title="10.2.2 Optimizing Subqueries, Derived Tables, View References, and Common Table Expressions">
Section 10.2.2, “Optimizing Subqueries, Derived Tables, View References, and Common Table
Expressions”
</a>
.
</p>
<p>
Syntax of hints that affect semijoin strategies:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa98800033"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><em class="replaceable">hint_name</em><span class="token punctuation">(</span><span class="token punctuation">[</span><span class="token variable">@<em class="replaceable">query_block_name</em></span><span class="token punctuation">]</span> <span class="token punctuation">[</span><em class="replaceable">strategy</em> <span class="token punctuation">[</span><span class="token punctuation">,</span> <em class="replaceable">strategy</em><span class="token punctuation">]</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">]</span><span class="token punctuation">)</span></code></pre>
</div>
<p>
The syntax refers to these terms:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<em class="replaceable">
<code>
hint_name
</code>
</em>
: These hint names are
permitted:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
<a class="link" href="optimizer-hints.html#optimizer-hints-subquery" title="Subquery Optimizer Hints">
<code class="literal">
SEMIJOIN
</code>
</a>
,
<a class="link" href="optimizer-hints.html#optimizer-hints-subquery" title="Subquery Optimizer Hints">
<code class="literal">
NO_SEMIJOIN
</code>
</a>
: Enable
or disable the named semijoin strategies.
</p>
</li>
</ul>
</div>
</li>
<li class="listitem">
<p>
<em class="replaceable">
<code>
strategy
</code>
</em>
: A semijoin strategy
to be enabled or disabled. These strategy names are
permitted:
<code class="literal">
DUPSWEEDOUT
</code>
,
<code class="literal">
FIRSTMATCH
</code>
,
<code class="literal">
LOOSESCAN
</code>
,
<code class="literal">
MATERIALIZATION
</code>
.
</p>
<p>
For
<a class="link" href="optimizer-hints.html#optimizer-hints-subquery" title="Subquery Optimizer Hints">
<code class="literal">
SEMIJOIN
</code>
</a>
hints, if
no strategies are named, semijoin is used if possible
based on the strategies enabled according to the
<a class="link" href="server-system-variables.html#sysvar_optimizer_switch">
<code class="literal">
optimizer_switch
</code>
</a>
system
variable. If strategies are named but inapplicable for the
statement,
<code class="literal">
DUPSWEEDOUT
</code>
is used.
</p>
<p>
For
<a class="link" href="optimizer-hints.html#optimizer-hints-subquery" title="Subquery Optimizer Hints">
<code class="literal">
NO_SEMIJOIN
</code>
</a>
hints,
if no strategies are named, semijoin is not used. If
strategies are named that rule out all applicable
strategies for the statement,
<code class="literal">
DUPSWEEDOUT
</code>
is used.
</p>
</li>
</ul>
</div>
<p>
If one subquery is nested within another and both are merged
into a semijoin of an outer query, any specification of
semijoin strategies for the innermost query are ignored.
<a class="link" href="optimizer-hints.html#optimizer-hints-subquery" title="Subquery Optimizer Hints">
<code class="literal">
SEMIJOIN
</code>
</a>
and
<a class="link" href="optimizer-hints.html#optimizer-hints-subquery" title="Subquery Optimizer Hints">
<code class="literal">
NO_SEMIJOIN
</code>
</a>
hints can still
be used to enable or disable semijoin transformations for such
nested subqueries.
</p>
<p>
If
<code class="literal">
DUPSWEEDOUT
</code>
is disabled, on occasion the
optimizer may generate a query plan that is far from optimal.
This occurs due to heuristic pruning during greedy search,
which can be avoided by setting
<a class="link" href="server-system-variables.html#sysvar_optimizer_prune_level">
<code class="literal">
optimizer_prune_level=0
</code>
</a>
.
</p>
<p>
Examples:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa96647553"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ NO_SEMIJOIN(@subq1 FIRSTMATCH, LOOSESCAN) */</span> <span class="token operator">*</span> <span class="token keyword">FROM</span> t2
<span class="token keyword">WHERE</span> t2<span class="token punctuation">.</span>a <span class="token keyword">IN</span> <span class="token punctuation">(</span><span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ QB_NAME(subq1) */</span> a <span class="token keyword">FROM</span> t3<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ SEMIJOIN(@subq1 MATERIALIZATION, DUPSWEEDOUT) */</span> <span class="token operator">*</span> <span class="token keyword">FROM</span> t2
<span class="token keyword">WHERE</span> t2<span class="token punctuation">.</span>a <span class="token keyword">IN</span> <span class="token punctuation">(</span><span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ QB_NAME(subq1) */</span> a <span class="token keyword">FROM</span> t3<span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
Syntax of hints that affect whether to use subquery
materialization or
<code class="literal">
IN
</code>
-to-
<code class="literal">
EXISTS
</code>
transformations:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa43648737"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql">SUBQUERY<span class="token punctuation">(</span><span class="token punctuation">[</span><span class="token variable">@<em class="replaceable">query_block_name</em></span><span class="token punctuation">]</span> <em class="replaceable">strategy</em><span class="token punctuation">)</span></code></pre>
</div>
<p>
The hint name is always
<a class="link" href="optimizer-hints.html#optimizer-hints-subquery" title="Subquery Optimizer Hints">
<code class="literal">
SUBQUERY
</code>
</a>
.
</p>
<p>
For
<a class="link" href="optimizer-hints.html#optimizer-hints-subquery" title="Subquery Optimizer Hints">
<code class="literal">
SUBQUERY
</code>
</a>
hints, these
<em class="replaceable">
<code>
strategy
</code>
</em>
values are permitted:
<code class="literal">
INTOEXISTS
</code>
,
<code class="literal">
MATERIALIZATION
</code>
.
</p>
<p>
Examples:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa32323990"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SELECT</span> id<span class="token punctuation">,</span> a <span class="token keyword">IN</span> <span class="token punctuation">(</span><span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ SUBQUERY(MATERIALIZATION) */</span> a <span class="token keyword">FROM</span> t1<span class="token punctuation">)</span> <span class="token keyword">FROM</span> t2<span class="token punctuation">;</span>
<span class="token keyword">SELECT</span> <span class="token operator">*</span> <span class="token keyword">FROM</span> t2 <span class="token keyword">WHERE</span> t2<span class="token punctuation">.</span>a <span class="token keyword">IN</span> <span class="token punctuation">(</span><span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ SUBQUERY(INTOEXISTS) */</span> a <span class="token keyword">FROM</span> t1<span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
For semijoin and
<a class="link" href="optimizer-hints.html#optimizer-hints-subquery" title="Subquery Optimizer Hints">
<code class="literal">
SUBQUERY
</code>
</a>
hints, a leading
<code class="literal">
@
<em class="replaceable">
<code>
query_block_name
</code>
</em>
</code>
specifies the query block to which the hint applies. If the
hint includes no leading
<code class="literal">
@
<em class="replaceable">
<code>
query_block_name
</code>
</em>
</code>
,
the hint applies to the query block in which it occurs. To
assign a name to a query block, see
<a class="xref" href="optimizer-hints.html#optimizer-hints-query-block-naming" title="Optimizer Hints for Naming Query Blocks">
Optimizer Hints for Naming Query Blocks
</a>
.
</p>
<p>
If a hint comment contains multiple subquery hints, the first
is used. If there are other following hints of that type, they
produce a warning. Following hints of other types are silently
ignored.
</p>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title">
<a name="optimizer-hints-execution-time">
</a>
Statement Execution Time Optimizer Hints
</h4>
</div>
</div>
</div>
<p>
The
<a class="link" href="optimizer-hints.html#optimizer-hints-execution-time" title="Statement Execution Time Optimizer Hints">
<code class="literal">
MAX_EXECUTION_TIME
</code>
</a>
hint
is permitted only for
<a class="link" href="select.html" title="15.2.13 SELECT Statement">
<code class="literal">
SELECT
</code>
</a>
statements. It places a limit
<em class="replaceable">
<code>
N
</code>
</em>
(a
timeout value in milliseconds) on how long a statement is
permitted to execute before the server terminates it:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa5294290"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql">MAX_EXECUTION_TIME<span class="token punctuation">(</span><em class="replaceable">N</em><span class="token punctuation">)</span></code></pre>
</div>
<p>
Example with a timeout of 1 second (1000 milliseconds):
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa20901840"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ MAX_EXECUTION_TIME(1000) */</span> <span class="token operator">*</span> <span class="token keyword">FROM</span> t1 <span class="token keyword">INNER</span> <span class="token keyword">JOIN</span> t2 <span class="token keyword">WHERE</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span></code></pre>
</div>
<p>
The
<a class="link" href="optimizer-hints.html#optimizer-hints-execution-time" title="Statement Execution Time Optimizer Hints">
<code class="literal">
MAX_EXECUTION_TIME(
<em class="replaceable">
<code>
N
</code>
</em>
)
</code>
</a>
hint sets a statement execution timeout of
<em class="replaceable">
<code>
N
</code>
</em>
milliseconds. If this option is
absent or
<em class="replaceable">
<code>
N
</code>
</em>
is 0, the statement
timeout established by the
<a class="link" href="server-system-variables.html#sysvar_max_execution_time">
<code class="literal">
max_execution_time
</code>
</a>
system
variable applies.
</p>
<p>
The
<a class="link" href="optimizer-hints.html#optimizer-hints-execution-time" title="Statement Execution Time Optimizer Hints">
<code class="literal">
MAX_EXECUTION_TIME
</code>
</a>
hint
is applicable as follows:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
For statements with multiple
<code class="literal">
SELECT
</code>
keywords, such as unions or statements with subqueries,
<a class="link" href="optimizer-hints.html#optimizer-hints-execution-time" title="Statement Execution Time Optimizer Hints">
<code class="literal">
MAX_EXECUTION_TIME
</code>
</a>
applies to the entire statement and must appear after the
first
<a class="link" href="select.html" title="15.2.13 SELECT Statement">
<code class="literal">
SELECT
</code>
</a>
.
</p>
</li>
<li class="listitem">
<p>
It applies to read-only
<a class="link" href="select.html" title="15.2.13 SELECT Statement">
<code class="literal">
SELECT
</code>
</a>
statements.
Statements that are not read only are those that invoke a
stored function that modifies data as a side effect.
</p>
</li>
<li class="listitem">
<p>
It does not apply to
<a class="link" href="select.html" title="15.2.13 SELECT Statement">
<code class="literal">
SELECT
</code>
</a>
statements in stored programs and is ignored.
</p>
</li>
</ul>
</div>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title">
<a name="optimizer-hints-set-var">
</a>
Variable-Setting Hint Syntax
</h4>
</div>
</div>
</div>
<a class="indexterm" name="idm46045223567536">
</a>
<a class="indexterm" name="idm46045223566496">
</a>
<a class="indexterm" name="idm46045223565008">
</a>
<a class="indexterm" name="idm46045223563520">
</a>
<p>
The
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
hint sets the
session value of a system variable temporarily (for the
duration of a single statement). Examples:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa59533008"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ SET_VAR(sort_buffer_size = 16M) */</span> <span class="token keyword">name</span> <span class="token keyword">FROM</span> people <span class="token keyword">ORDER</span> <span class="token keyword">BY</span> <span class="token keyword">name</span><span class="token punctuation">;</span>
<span class="token keyword">INSERT</span> <span class="token comment" spellcheck="true">/*+ SET_VAR(foreign_key_checks=OFF) */</span> <span class="token keyword">INTO</span> t2 <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token number">2</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ SET_VAR(optimizer_switch = 'mrr_cost_based=off') */</span> <span class="token number">1</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
Syntax of the
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
hint:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa31251002"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql">SET_VAR<span class="token punctuation">(</span><em class="replaceable">var_name</em> <span class="token operator">=</span> <span class="token keyword"><em class="replaceable">value</em></span><span class="token punctuation">)</span></code></pre>
</div>
<p>
<em class="replaceable">
<code>
var_name
</code>
</em>
names a system variable
that has a session value (although not all such variables can
be named, as explained later).
<em class="replaceable">
<code>
value
</code>
</em>
is the value to assign to the
variable; the value must be a scalar.
</p>
<p>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
makes a temporary
variable change, as demonstrated by these statements:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa79866756"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> <span class="token variable">@@unique_checks</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> @@unique_checks <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> 1 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ SET_VAR(unique_checks=OFF) */</span> <span class="token variable">@@unique_checks</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> @@unique_checks <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> 0 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> <span class="token variable">@@unique_checks</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> @@unique_checks <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> 1 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
<p>
With
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
, there is no
need to save and restore the variable value. This enables you
to replace multiple statements by a single statement. Consider
this sequence of statements:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa56896115"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SET</span> <span class="token variable">@saved_val</span> <span class="token operator">=</span> <span class="token variable">@@SESSION.<em class="replaceable">var_name</em></span><span class="token punctuation">;</span>
<span class="token keyword">SET</span> <span class="token variable">@@SESSION.<em class="replaceable">var_name</em></span> <span class="token operator">=</span> <span class="token keyword"><em class="replaceable">value</em></span><span class="token punctuation">;</span>
<span class="token keyword">SELECT</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>
<span class="token keyword">SET</span> <span class="token variable">@@SESSION.<em class="replaceable">var_name</em></span> <span class="token operator">=</span> <span class="token variable">@saved_val</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
The sequence can be replaced by this single statement:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa33920158"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SELECT</span> <span class="token operator">/</span><span class="token operator">*</span><span class="token operator">+</span> SET_VAR<span class="token punctuation">(</span><em class="replaceable">var_name</em> <span class="token operator">=</span> <span class="token keyword"><em class="replaceable">value</em></span><span class="token punctuation">)</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span></code></pre>
</div>
<p>
Standalone
<a class="link" href="set-variable.html" title="15.7.6.1 SET Syntax for Variable Assignment">
<code class="literal">
SET
</code>
</a>
statements permit any of these syntaxes for naming session
variables:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa5628596"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SET</span> <span class="token keyword">SESSION</span> <em class="replaceable">var_name</em> <span class="token operator">=</span> <span class="token keyword"><em class="replaceable">value</em></span><span class="token punctuation">;</span>
<span class="token keyword">SET</span> <span class="token variable">@@SESSION.<em class="replaceable">var_name</em></span> <span class="token operator">=</span> <span class="token keyword"><em class="replaceable">value</em></span><span class="token punctuation">;</span>
<span class="token keyword">SET</span> <span class="token variable">@@.<em class="replaceable">var_name</em></span> <span class="token operator">=</span> <span class="token keyword"><em class="replaceable">value</em></span><span class="token punctuation">;</span></code></pre>
</div>
<p>
Because the
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
hint
applies only to session variables, session scope is implicit,
and
<code class="literal">
SESSION
</code>
,
<code class="literal">
@@SESSION.
</code>
,
and
<code class="literal">
@@
</code>
are neither needed nor permitted.
Including explicit session-indicator syntax results in the
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
hint being ignored
with a warning.
</p>
<p>
Not all session variables are permitted for use with
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
. Individual system
variable descriptions indicate whether each variable is
hintable; see
<a class="xref" href="server-system-variables.html" title="7.1.8 Server System Variables">
Section 7.1.8, “Server System Variables”
</a>
. You
can also check a system variable at runtime by attempting to
use it with
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
. If the
variable is not hintable, a warning occurs:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa95545002"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ SET_VAR(collation_server = 'utf8mb4') */</span> <span class="token number">1</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> 1 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> 1 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output">1 row in set, 1 warning (0.00 sec)</span>
<span class="token prompt">mysql></span> <span class="token keyword">SHOW</span> <span class="token keyword">WARNINGS</span>\G
<span class="token output"><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 1. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
Level<span class="token punctuation">:</span> Warning
Code<span class="token punctuation">:</span> 4537
Message<span class="token punctuation">:</span> Variable 'collation_server' cannot be set using SET_VAR hint.</span></code></pre>
</div>
<p>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
syntax permits
setting only a single variable, but multiple hints can be
given to set multiple variables:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa45650358"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ SET_VAR(optimizer_switch = 'mrr_cost_based=off')
SET_VAR(max_heap_table_size = 1G) */</span> <span class="token number">1</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
If several hints with the same variable name appear in the
same statement, the first one is applied and the others are
ignored with a warning:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa46428061"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ SET_VAR(max_heap_table_size = 1G)
SET_VAR(max_heap_table_size = 3G) */</span> <span class="token number">1</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
In this case, the second hint is ignored with a warning that
it is conflicting.
</p>
<p>
A
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
hint is ignored
with a warning if no system variable has the specified name or
the variable value is incorrect:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa95397663"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ SET_VAR(max_size = 1G) */</span> <span class="token number">1</span><span class="token punctuation">;</span>
<span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ SET_VAR(optimizer_switch = 'mrr_cost_based=yes') */</span> <span class="token number">1</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
For the first statement, there is no
<code class="literal">
max_size
</code>
variable. For the second
statement,
<a class="link" href="switchable-optimizations.html#optflag_mrr-cost-based">
<code class="literal">
mrr_cost_based
</code>
</a>
takes values of
<code class="literal">
on
</code>
or
<code class="literal">
off
</code>
, so attempting to set it to
<code class="literal">
yes
</code>
is incorrect. In each case, the hint is
ignored with a warning.
</p>
<p>
The
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
hint is
permitted only at the statement level. If used in a subquery,
the hint is ignored with a warning.
</p>
<p>
Replicas ignore
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
hints in replicated statements to avoid the potential for
security issues.
</p>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title">
<a name="optimizer-hints-resource-group">
</a>
Resource Group Hint Syntax
</h4>
</div>
</div>
</div>
<p>
The
<a class="link" href="optimizer-hints.html#optimizer-hints-resource-group" title="Resource Group Hint Syntax">
<code class="literal">
RESOURCE_GROUP
</code>
</a>
optimizer
hint is used for resource group management (see
<a class="xref" href="resource-groups.html" title="7.1.16 Resource Groups">
Section 7.1.16, “Resource Groups”
</a>
). This hint assigns the
thread that executes a statement to the named resource group
temporarily (for the duration of the statement). It requires
the
<a class="link" href="privileges-provided.html#priv_resource-group-admin">
<code class="literal">
RESOURCE_GROUP_ADMIN
</code>
</a>
or
<a class="link" href="privileges-provided.html#priv_resource-group-user">
<code class="literal">
RESOURCE_GROUP_USER
</code>
</a>
privilege.
</p>
<p>
Examples:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa31416534"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ RESOURCE_GROUP(USR_default) */</span> <span class="token keyword">name</span> <span class="token keyword">FROM</span> people <span class="token keyword">ORDER</span> <span class="token keyword">BY</span> <span class="token keyword">name</span><span class="token punctuation">;</span>
<span class="token keyword">INSERT</span> <span class="token comment" spellcheck="true">/*+ RESOURCE_GROUP(Batch) */</span> <span class="token keyword">INTO</span> t2 <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token number">2</span><span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
Syntax of the
<a class="link" href="optimizer-hints.html#optimizer-hints-resource-group" title="Resource Group Hint Syntax">
<code class="literal">
RESOURCE_GROUP
</code>
</a>
hint:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa83148283"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql">RESOURCE_GROUP<span class="token punctuation">(</span><em class="replaceable">group_name</em><span class="token punctuation">)</span></code></pre>
</div>
<p>
<em class="replaceable">
<code>
group_name
</code>
</em>
indicates the resource
group to which the thread should be assigned for the duration
of statement execution. If the group is nonexistent, a warning
occurs and the hint is ignored.
</p>
<p>
The
<a class="link" href="optimizer-hints.html#optimizer-hints-resource-group" title="Resource Group Hint Syntax">
<code class="literal">
RESOURCE_GROUP
</code>
</a>
hint must
appear after the initial statement keyword
(
<code class="literal">
SELECT
</code>
,
<code class="literal">
INSERT
</code>
,
<code class="literal">
REPLACE
</code>
,
<code class="literal">
UPDATE
</code>
, or
<code class="literal">
DELETE
</code>
).
</p>
<p>
An alternative to
<a class="link" href="optimizer-hints.html#optimizer-hints-resource-group" title="Resource Group Hint Syntax">
<code class="literal">
RESOURCE_GROUP
</code>
</a>
is the
<a class="link" href="set-resource-group.html" title="15.7.2.4 SET RESOURCE GROUP Statement">
<code class="literal">
SET RESOURCE GROUP
</code>
</a>
statement,
which nontemporarily assigns threads to a resource group. See
<a class="xref" href="set-resource-group.html" title="15.7.2.4 SET RESOURCE GROUP Statement">
Section 15.7.2.4, “SET RESOURCE GROUP Statement”
</a>
.
</p>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h4 class="title">
<a name="optimizer-hints-query-block-naming">
</a>
Optimizer Hints for Naming Query Blocks
</h4>
</div>
</div>
</div>
<p>
Table-level, index-level, and subquery optimizer hints permit
specific query blocks to be named as part of their argument
syntax. To create these names, use the
<a class="link" href="optimizer-hints.html#optimizer-hints-query-block-naming" title="Optimizer Hints for Naming Query Blocks">
<code class="literal">
QB_NAME
</code>
</a>
hint, which assigns
a name to the query block in which it occurs:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa94013876"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql">QB_NAME<span class="token punctuation">(</span><span class="token keyword"><em class="replaceable">name</em></span><span class="token punctuation">)</span></code></pre>
</div>
<p>
<a class="link" href="optimizer-hints.html#optimizer-hints-query-block-naming" title="Optimizer Hints for Naming Query Blocks">
<code class="literal">
QB_NAME
</code>
</a>
hints can be used to
make explicit in a clear way which query blocks other hints
apply to. They also permit all non-query block name hints to
be specified within a single hint comment for easier
understanding of complex statements. Consider the following
statement:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa78327739"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SELECT</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>
<span class="token keyword">FROM</span> <span class="token punctuation">(</span><span class="token keyword">SELECT</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>
<span class="token keyword">FROM</span> <span class="token punctuation">(</span><span class="token keyword">SELECT</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span> <span class="token keyword">FROM</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">)</span><span class="token punctuation">)</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span></code></pre>
</div>
<p>
<a class="link" href="optimizer-hints.html#optimizer-hints-query-block-naming" title="Optimizer Hints for Naming Query Blocks">
<code class="literal">
QB_NAME
</code>
</a>
hints assign names
to query blocks in the statement:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa59528538"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ QB_NAME(qb1) */</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>
<span class="token keyword">FROM</span> <span class="token punctuation">(</span><span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ QB_NAME(qb2) */</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>
<span class="token keyword">FROM</span> <span class="token punctuation">(</span><span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ QB_NAME(qb3) */</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span> <span class="token keyword">FROM</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">)</span><span class="token punctuation">)</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span></code></pre>
</div>
<p>
Then other hints can use those names to refer to the
appropriate query blocks:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa91041312"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ QB_NAME(qb1) MRR(@qb1 t1) BKA(@qb2) NO_MRR(@qb3t1 idx1, id2) */</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>
<span class="token keyword">FROM</span> <span class="token punctuation">(</span><span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ QB_NAME(qb2) */</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>
<span class="token keyword">FROM</span> <span class="token punctuation">(</span><span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ QB_NAME(qb3) */</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span> <span class="token keyword">FROM</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">)</span><span class="token punctuation">)</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span></code></pre>
</div>
<p>
The resulting effect is as follows:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
MRR(@qb1 t1)
</code>
</a>
applies to
table
<code class="literal">
t1
</code>
in query block
<code class="literal">
qb1
</code>
.
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="optimizer-hints.html#optimizer-hints-table-level" title="Table-Level Optimizer Hints">
<code class="literal">
BKA(@qb2)
</code>
</a>
applies to
query block
<code class="literal">
qb2
</code>
.
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="optimizer-hints.html#optimizer-hints-index-level" title="Index-Level Optimizer Hints">
<code class="literal">
NO_MRR(@qb3 t1 idx1,
id2)
</code>
</a>
applies to indexes
<code class="literal">
idx1
</code>
and
<code class="literal">
idx2
</code>
in table
<code class="literal">
t1
</code>
in query block
<code class="literal">
qb3
</code>
.
</p>
</li>
</ul>
</div>
<p>
Query block names are identifiers and follow the usual rules
about what names are valid and how to quote them (see
<a class="xref" href="identifiers.html" title="11.2 Schema Object Names">
Section 11.2, “Schema Object Names”
</a>
). For example, a query block
name that contains spaces must be quoted, which can be done
using backticks:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa91611930"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ BKA(@`my hint name`) */</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>
<span class="token keyword">FROM</span> <span class="token punctuation">(</span><span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ QB_NAME(`my hint name`) */</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">)</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span></code></pre>
</div>
<p>
If the
<a class="link" href="sql-mode.html#sqlmode_ansi_quotes">
<code class="literal">
ANSI_QUOTES
</code>
</a>
SQL mode
is enabled, it is also possible to quote query block names
within double quotation marks:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa76318250"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ BKA(@"my hint name") */</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>
<span class="token keyword">FROM</span> <span class="token punctuation">(</span><span class="token keyword">SELECT</span> <span class="token comment" spellcheck="true">/*+ QB_NAME("my hint name") */</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">)</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span></code></pre>
</div>
</div>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/sys-ps-statement-avg-latency-histogram.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title">
<a name="sys-ps-statement-avg-latency-histogram">
</a>
30.4.4.21 The ps_statement_avg_latency_histogram() Procedure
</h4>
</div>
</div>
</div>
<a class="indexterm" name="idm46045061307392">
</a>
<a class="indexterm" name="idm46045061305872">
</a>
<p>
Displays a textual histogram graph of the average latency
values across all normalized statements tracked within the
Performance Schema
<a class="link" href="performance-schema-statement-summary-tables.html" title="29.12.20.3 Statement Summary Tables">
<code class="literal">
events_statements_summary_by_digest
</code>
</a>
table.
</p>
<p>
This procedure can be used to display a very high-level
picture of the latency distribution of statements running
within this MySQL instance.
</p>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h5 class="title">
<a name="sys-ps-statement-avg-latency-histogram-parameters">
</a>
Parameters
</h5>
</div>
</div>
</div>
<p>
None.
</p>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h5 class="title">
<a name="sys-ps-statement-avg-latency-histogram-example">
</a>
Example
</h5>
</div>
</div>
</div>
<p>
The histogram output in statement units. For example,
<code class="literal">
* = 2 units
</code>
in the histogram legend means
that each
<code class="literal">
*
</code>
character represents 2
statements.
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa1173718"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">CALL</span> sys<span class="token punctuation">.</span>ps_statement_avg_latency_histogram<span class="token punctuation">(</span><span class="token punctuation">)</span>\G
<span class="token output"><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 1. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
Performance Schema Statement Digest Average Latency Histogram<span class="token punctuation">:</span>
. = 1 unit
<span class="token punctuation">*</span> = 2 units
# = 3 units
(0 - 66ms) 88 | #############################
(66 - 133ms) 14 | ..............
(133 - 199ms) 4 | ....
(199 - 265ms) 5 | <span class="token punctuation">*</span><span class="token punctuation">*</span>
(265 - 332ms) 1 | .
(332 - 398ms) 0 |
(398 - 464ms) 1 | .
(464 - 531ms) 0 |
(531 - 597ms) 0 |
(597 - 663ms) 0 |
(663 - 730ms) 0 |
(730 - 796ms) 0 |
(796 - 863ms) 0 |
(863 - 929ms) 0 |
(929 - 995ms) 0 |
(995 - 1062ms) 0 |
Total Statements<span class="token punctuation">:</span> 114; Buckets<span class="token punctuation">:</span> 16; Bucket Size<span class="token punctuation">:</span> 66 ms;</span></code></pre>
</div>
</div>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/replication-bugs.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a name="replication-bugs">
</a>
19.5.5 How to Report Replication Bugs or Problems
</h3>
</div>
</div>
</div>
<p>
When you have determined that there is no user error involved, and
replication still either does not work at all or is unstable, it
is time to send us a bug report. We need to obtain as much
information as possible from you to be able to track down the bug.
Please spend some time and effort in preparing a good bug report.
</p>
<p>
If you have a repeatable test case that demonstrates the bug,
please enter it into our bugs database using the instructions
given in
<a class="xref" href="bug-reports.html" title="1.6 How to Report Bugs or Problems">
Section 1.6, “How to Report Bugs or Problems”
</a>
. If you have a
<span class="quote">
“
<span class="quote">
phantom
</span>
”
</span>
problem (one that you cannot duplicate at
will), use the following procedure:
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1">
<li class="listitem">
<p>
Verify that no user error is involved. For example, if you
update the replica outside of the replication threads, the
data goes out of synchrony, and you can have unique key
violations on updates. In this case, the replication thread
stops and waits for you to clean up the tables manually to
bring them into synchrony.
<span class="emphasis">
<em>
This is not a replication
problem. It is a problem of outside interference causing
replication to fail.
</em>
</span>
</p>
</li>
<li class="listitem">
<p>
Ensure that the replica is running with binary logging enabled
(the
<a class="link" href="replication-options-binary-log.html#sysvar_log_bin">
<code class="literal">
log_bin
</code>
</a>
system
variable), and with the
<a class="link" href="replication-options-binary-log.html#sysvar_log_replica_updates">
<code class="option">
--log-replica-updates
</code>
</a>
option
enabled, which causes the replica to log the updates that it
receives from the source into its own binary logs. These
settings are the defaults.
</p>
</li>
<li class="listitem">
<p>
Save all evidence before resetting the replication state. If
we have no information or only sketchy information, it becomes
difficult or impossible for us to track down the problem. The
evidence you should collect is:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
All binary log files from the source
</p>
</li>
<li class="listitem">
<p>
All binary log files from the replica
</p>
</li>
<li class="listitem">
<p>
The output of
<a class="link" href="show-binary-log-status.html" title="15.7.7.1 SHOW BINARY LOG STATUS Statement">
<code class="literal">
SHOW BINARY LOG
STATUS
</code>
</a>
from the source at the time you
discovered the problem
</p>
</li>
<li class="listitem">
<p>
The output of
<a class="link" href="show-replica-status.html" title="15.7.7.35 SHOW REPLICA STATUS Statement">
<code class="literal">
SHOW REPLICA
STATUS
</code>
</a>
from the replica at the time you
discovered the problem
</p>
</li>
<li class="listitem">
<p>
Error logs from the source and the replica
</p>
</li>
</ul>
</div>
</li>
<li class="listitem">
<p>
Use
<a class="link" href="mysqlbinlog.html" title="6.6.9 mysqlbinlog — Utility for Processing Binary Log Files">
<span class="command">
<strong>
mysqlbinlog
</strong>
</span>
</a>
to examine the binary logs.
The following should be helpful to find the problem statement.
<em class="replaceable">
<code>
log_file
</code>
</em>
and
<em class="replaceable">
<code>
log_pos
</code>
</em>
are the
<code class="literal">
Master_Log_File
</code>
and
<code class="literal">
Read_Master_Log_Pos
</code>
values from
<a class="link" href="show-replica-status.html" title="15.7.7.35 SHOW REPLICA STATUS Statement">
<code class="literal">
SHOW REPLICA STATUS
</code>
</a>
.
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa24352195"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal"><span class="token prompt">$> </span><span class="token command">mysqlbinlog</span> <span class="token constant">--start-position</span><span class="token attr-value"><span class="token punctuation">=</span><em class="replaceable">log_pos</em></span> <em class="replaceable">log_file</em> | head</code></pre>
</div>
</li>
</ol>
</div>
<p>
After you have collected the evidence for the problem, try to
isolate it as a separate test case first. Then enter the problem
with as much information as possible into our bugs database using
the instructions at
<a class="xref" href="bug-reports.html" title="1.6 How to Report Bugs or Problems">
Section 1.6, “How to Report Bugs or Problems”
</a>
.
</p>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/execution-plan-information.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title">
<a name="execution-plan-information">
</a>
10.8 Understanding the Query Execution Plan
</h2>
</div>
</div>
</div>
<div class="toc">
<dl class="toc">
<dt>
<span class="section">
<a href="using-explain.html">
10.8.1 Optimizing Queries with EXPLAIN
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="explain-output.html">
10.8.2 EXPLAIN Output Format
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="explain-extended.html">
10.8.3 Extended EXPLAIN Output Format
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="explain-for-connection.html">
10.8.4 Obtaining Execution Plan Information for a Named Connection
</a>
</span>
</dt>
<dt>
<span class="section">
<a href="estimating-performance.html">
10.8.5 Estimating Query Performance
</a>
</span>
</dt>
</dl>
</div>
<p>
Depending on the details of your tables, columns, indexes, and the
conditions in your
<code class="literal">
WHERE
</code>
clause, the MySQL
optimizer considers many techniques to efficiently perform the
lookups involved in an SQL query. A query on a huge table can be
performed without reading all the rows; a join involving several
tables can be performed without comparing every combination of
rows. The set of operations that the optimizer chooses to perform
the most efficient query is called the
<span class="quote">
“
<span class="quote">
query execution
plan
</span>
”
</span>
, also known as the
<a class="link" href="explain.html" title="15.8.2 EXPLAIN Statement">
<code class="literal">
EXPLAIN
</code>
</a>
plan. Your goals are to
recognize the aspects of the
<a class="link" href="explain.html" title="15.8.2 EXPLAIN Statement">
<code class="literal">
EXPLAIN
</code>
</a>
plan that indicate a query
is optimized well, and to learn the SQL syntax and indexing
techniques to improve the plan if you see some inefficient
operations.
</p>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/mysql-cluster-ndbinfo-config-values.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title">
<a name="mysql-cluster-ndbinfo-config-values">
</a>
25.6.17.12 The ndbinfo config_values Table
</h4>
</div>
</div>
</div>
<a class="indexterm" name="idm46045090166992">
</a>
<p>
The
<code class="literal">
config_values
</code>
table provides information
about the current state of node configuration parameter values.
Each row in the table corresponds to the current value of a
parameter on a given node.
</p>
<p>
The
<code class="literal">
config_values
</code>
table contains the
following columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<code class="literal">
node_id
</code>
</p>
<p>
ID of the node in the cluster
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
config_param
</code>
</p>
<p>
The parameter's internal ID number
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
config_value
</code>
</p>
<p>
Current value of the parameter
</p>
</li>
</ul>
</div>
<h5>
<a name="idm46045090156896">
</a>
Notes
</h5>
<p>
This table's
<code class="literal">
config_param
</code>
column and the
<a class="link" href="mysql-cluster-ndbinfo-config-params.html" title="25.6.17.11 The ndbinfo config_params Table">
<code class="literal">
config_params
</code>
</a>
table's
<code class="literal">
param_number
</code>
column use the same parameter
identifiers. By joining the two tables on these columns, you can
obtain detailed information about desired node configuration
parameters. The query shown here provides the current values for
all parameters on each data node in the cluster, ordered by node
ID and parameter name:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa75964658"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SELECT</span> v<span class="token punctuation">.</span>node_id <span class="token keyword">AS</span> <span class="token string">'Node Id'</span><span class="token punctuation">,</span>
p<span class="token punctuation">.</span>param_name <span class="token keyword">AS</span> <span class="token string">'Parameter'</span><span class="token punctuation">,</span>
v<span class="token punctuation">.</span>config_value <span class="token keyword">AS</span> <span class="token string">'Value'</span>
<span class="token keyword">FROM</span> config_values v
<span class="token keyword">JOIN</span> config_params p
<span class="token keyword">ON</span> v<span class="token punctuation">.</span>config_param<span class="token operator">=</span>p<span class="token punctuation">.</span>param_number
<span class="token keyword">WHERE</span> p<span class="token punctuation">.</span>param_name <span class="token operator">NOT</span> <span class="token operator">LIKE</span> <span class="token string">'\_\_%'</span>
<span class="token keyword">ORDER</span> <span class="token keyword">BY</span> v<span class="token punctuation">.</span>node_id<span class="token punctuation">,</span> p<span class="token punctuation">.</span>param_name<span class="token punctuation">;</span></code></pre>
</div>
<p>
Partial output from the previous query when run on a small
example cluster used for simple testing:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa89485376"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Node Id <span class="token punctuation">|</span> Parameter <span class="token punctuation">|</span> Value <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> 2 <span class="token punctuation">|</span> Arbitration <span class="token punctuation">|</span> 1 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> 2 <span class="token punctuation">|</span> ArbitrationTimeout <span class="token punctuation">|</span> 7500 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> 2 <span class="token punctuation">|</span> BackupDataBufferSize <span class="token punctuation">|</span> 16777216 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> 2 <span class="token punctuation">|</span> BackupDataDir <span class="token punctuation">|</span> /home/jon/data <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> 2 <span class="token punctuation">|</span> BackupDiskWriteSpeedPct <span class="token punctuation">|</span> 50 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> 2 <span class="token punctuation">|</span> BackupLogBufferSize <span class="token punctuation">|</span> 16777216 <span class="token punctuation">|</span></span>
<span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>
<span class="token output"><span class="token punctuation">|</span> 3 <span class="token punctuation">|</span> TotalSendBufferMemory <span class="token punctuation">|</span> 0 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> 3 <span class="token punctuation">|</span> TransactionBufferMemory <span class="token punctuation">|</span> 1048576 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> 3 <span class="token punctuation">|</span> TransactionDeadlockDetectionTimeout <span class="token punctuation">|</span> 1200 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> 3 <span class="token punctuation">|</span> TransactionInactiveTimeout <span class="token punctuation">|</span> 4294967039 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> 3 <span class="token punctuation">|</span> TwoPassInitialNodeRestartCopy <span class="token punctuation">|</span> 0 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> 3 <span class="token punctuation">|</span> UndoDataBuffer <span class="token punctuation">|</span> 16777216 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> 3 <span class="token punctuation">|</span> UndoIndexBuffer <span class="token punctuation">|</span> 2097152 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output">248 rows in set (0.02 sec)</span></code></pre>
</div>
<p>
The
<code class="literal">
WHERE
</code>
clause filters out parameters whose
names begin with a double underscore (
<code class="literal">
__
</code>
);
these parameters are reserved for testing and other internal
uses by the NDB developers, and are not intended for use in a
production NDB Cluster.
</p>
<p>
You can obtain output that is more specific, more detailed, or
both by issuing the proper queries. This example provides all
types of available information about the
<a class="link" href="mysql-cluster-ndbd-definition.html#ndbparam-ndbd-nodeid">
<code class="literal">
NodeId
</code>
</a>
,
<a class="link" href="mysql-cluster-ndbd-definition.html#ndbparam-ndbd-noofreplicas">
<code class="literal">
NoOfReplicas
</code>
</a>
,
<a class="link" href="mysql-cluster-ndbd-definition.html#ndbparam-ndbd-hostname">
<code class="literal">
HostName
</code>
</a>
,
<a class="link" href="mysql-cluster-ndbd-definition.html#ndbparam-ndbd-datamemory">
<code class="literal">
DataMemory
</code>
</a>
,
<a class="link" href="mysql-cluster-ndbd-definition.html#ndbparam-ndbd-indexmemory">
<code class="literal">
IndexMemory
</code>
</a>
, and
<a class="link" href="mysql-cluster-ndbd-definition.html#ndbparam-ndbd-totalsendbuffermemory">
<code class="literal">
TotalSendBufferMemory
</code>
</a>
parameters as currently set for all data nodes in the cluster:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa23420348"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SELECT</span> p<span class="token punctuation">.</span>param_name <span class="token keyword">AS</span> <span class="token keyword">Name</span><span class="token punctuation">,</span>
v<span class="token punctuation">.</span>node_id <span class="token keyword">AS</span> Node<span class="token punctuation">,</span>
p<span class="token punctuation">.</span>param_type <span class="token keyword">AS</span> <span class="token keyword">Type</span><span class="token punctuation">,</span>
p<span class="token punctuation">.</span>param_default <span class="token keyword">AS</span> <span class="token string">'Default'</span><span class="token punctuation">,</span>
p<span class="token punctuation">.</span>param_min <span class="token keyword">AS</span> Minimum<span class="token punctuation">,</span>
p<span class="token punctuation">.</span>param_max <span class="token keyword">AS</span> Maximum<span class="token punctuation">,</span>
<span class="token operator">CASE</span> p<span class="token punctuation">.</span>param_mandatory <span class="token keyword">WHEN</span> <span class="token number">1</span> <span class="token keyword">THEN</span> <span class="token string">'Y'</span> <span class="token keyword">ELSE</span> <span class="token string">'N'</span> <span class="token keyword">END</span> <span class="token keyword">AS</span> <span class="token string">'Required'</span><span class="token punctuation">,</span>
v<span class="token punctuation">.</span>config_value <span class="token keyword">AS</span> <span class="token keyword">Current</span>
<span class="token keyword">FROM</span> config_params p
<span class="token keyword">JOIN</span> config_values v
<span class="token keyword">ON</span> p<span class="token punctuation">.</span>param_number <span class="token operator">=</span> v<span class="token punctuation">.</span>config_param
<span class="token keyword">WHERE</span> p<span class="token punctuation">.</span> param_name
<span class="token keyword">IN</span> <span class="token punctuation">(</span><span class="token string">'NodeId'</span><span class="token punctuation">,</span> <span class="token string">'NoOfReplicas'</span><span class="token punctuation">,</span> <span class="token string">'HostName'</span><span class="token punctuation">,</span>
<span class="token string">'DataMemory'</span><span class="token punctuation">,</span> <span class="token string">'IndexMemory'</span><span class="token punctuation">,</span> <span class="token string">'TotalSendBufferMemory'</span><span class="token punctuation">)</span>\G</code></pre>
</div>
<p>
The output from this query when run on a small NDB Cluster with
2 data nodes used for simple testing is shown here:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa80841519"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token output"><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 1. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
Name<span class="token punctuation">:</span> NodeId
Node<span class="token punctuation">:</span> 2
Type<span class="token punctuation">:</span> unsigned
Default<span class="token punctuation">:</span>
Minimum<span class="token punctuation">:</span> 1
Maximum<span class="token punctuation">:</span> 144
Required<span class="token punctuation">:</span> Y
Current<span class="token punctuation">:</span> 2
<span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 2. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
Name<span class="token punctuation">:</span> HostName
Node<span class="token punctuation">:</span> 2
Type<span class="token punctuation">:</span> string
Default<span class="token punctuation">:</span> localhost
Minimum<span class="token punctuation">:</span>
Maximum<span class="token punctuation">:</span>
Required<span class="token punctuation">:</span> N
Current<span class="token punctuation">:</span> 127.0.0.1
<span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 3. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
Name<span class="token punctuation">:</span> TotalSendBufferMemory
Node<span class="token punctuation">:</span> 2
Type<span class="token punctuation">:</span> unsigned
Default<span class="token punctuation">:</span> 0
Minimum<span class="token punctuation">:</span> 262144
Maximum<span class="token punctuation">:</span> 4294967039
Required<span class="token punctuation">:</span> N
Current<span class="token punctuation">:</span> 0
<span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 4. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
Name<span class="token punctuation">:</span> NoOfReplicas
Node<span class="token punctuation">:</span> 2
Type<span class="token punctuation">:</span> unsigned
Default<span class="token punctuation">:</span> 2
Minimum<span class="token punctuation">:</span> 1
Maximum<span class="token punctuation">:</span> 4
Required<span class="token punctuation">:</span> N
Current<span class="token punctuation">:</span> 2
<span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 5. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
Name<span class="token punctuation">:</span> DataMemory
Node<span class="token punctuation">:</span> 2
Type<span class="token punctuation">:</span> unsigned
Default<span class="token punctuation">:</span> 102760448
Minimum<span class="token punctuation">:</span> 1048576
Maximum<span class="token punctuation">:</span> 1099511627776
Required<span class="token punctuation">:</span> N
Current<span class="token punctuation">:</span> 524288000
<span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 6. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
Name<span class="token punctuation">:</span> NodeId
Node<span class="token punctuation">:</span> 3
Type<span class="token punctuation">:</span> unsigned
Default<span class="token punctuation">:</span>
Minimum<span class="token punctuation">:</span> 1
Maximum<span class="token punctuation">:</span> 144
Required<span class="token punctuation">:</span> Y
Current<span class="token punctuation">:</span> 3
<span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 7. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
Name<span class="token punctuation">:</span> HostName
Node<span class="token punctuation">:</span> 3
Type<span class="token punctuation">:</span> string
Default<span class="token punctuation">:</span> localhost
Minimum<span class="token punctuation">:</span>
Maximum<span class="token punctuation">:</span>
Required<span class="token punctuation">:</span> N
Current<span class="token punctuation">:</span> 127.0.0.1
<span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 8. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
Name<span class="token punctuation">:</span> TotalSendBufferMemory
Node<span class="token punctuation">:</span> 3
Type<span class="token punctuation">:</span> unsigned
Default<span class="token punctuation">:</span> 0
Minimum<span class="token punctuation">:</span> 262144
Maximum<span class="token punctuation">:</span> 4294967039
Required<span class="token punctuation">:</span> N
Current<span class="token punctuation">:</span> 0
<span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 9. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
Name<span class="token punctuation">:</span> NoOfReplicas
Node<span class="token punctuation">:</span> 3
Type<span class="token punctuation">:</span> unsigned
Default<span class="token punctuation">:</span> 2
Minimum<span class="token punctuation">:</span> 1
Maximum<span class="token punctuation">:</span> 4
Required<span class="token punctuation">:</span> N
Current<span class="token punctuation">:</span> 2
<span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 10. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
Name<span class="token punctuation">:</span> DataMemory
Node<span class="token punctuation">:</span> 3
Type<span class="token punctuation">:</span> unsigned
Default<span class="token punctuation">:</span> 102760448
Minimum<span class="token punctuation">:</span> 1048576
Maximum<span class="token punctuation">:</span> 1099511627776
Required<span class="token punctuation">:</span> N
Current<span class="token punctuation">:</span> 524288000
</span><span class="token output">10 rows in set (0.01 sec)</span></code></pre>
</div>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/sys-ps-setup-enable-background-threads.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title">
<a name="sys-ps-setup-enable-background-threads">
</a>
30.4.4.8 The ps_setup_enable_background_threads() Procedure
</h4>
</div>
</div>
</div>
<a class="indexterm" name="idm46045061488208">
</a>
<a class="indexterm" name="idm46045061486688">
</a>
<p>
Enables Performance Schema instrumentation for all background
threads. Produces a result set indicating how many background
threads were enabled. Already enabled threads do not count.
</p>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h5 class="title">
<a name="sys-ps-setup-enable-background-threads-parameters">
</a>
Parameters
</h5>
</div>
</div>
</div>
<p>
None.
</p>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h5 class="title">
<a name="sys-ps-setup-enable-background-threads-example">
</a>
Example
</h5>
</div>
</div>
</div>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa81758202"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">CALL</span> sys<span class="token punctuation">.</span>ps_setup_enable_background_threads<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> summary <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Enabled 24 background threads <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
</div>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/replication-privilege-checks-gr.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title">
<a name="replication-privilege-checks-gr">
</a>
19.3.3.2 Privilege Checks For Group Replication Channels
</h4>
</div>
</div>
</div>
<p>
You can also use a
<code class="literal">
PRIVILEGE_CHECKS_USER
</code>
account to secure the two replication applier threads used by
Group Replication. The
<code class="literal">
group_replication_applier
</code>
thread on each
group member is used for applying group transactions, and the
<code class="literal">
group_replication_recovery
</code>
thread on each
group member is used for state transfer from the binary log as
part of distributed recovery when the member joins or rejoins
the group.
</p>
<p>
To secure one of these threads, stop Group Replication, then
issue the
<a class="link" href="change-replication-source-to.html" title="15.4.2.2 CHANGE REPLICATION SOURCE TO Statement">
<code class="literal">
CHANGE REPLICATION SOURCE
TO
</code>
</a>
statement with the
<code class="literal">
PRIVILEGE_CHECKS_USER
</code>
option, specifying
<code class="literal">
group_replication_applier
</code>
or
<code class="literal">
group_replication_recovery
</code>
as the channel
name. For example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa26865968"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">STOP</span> <span class="token keyword">GROUP_REPLICATION</span><span class="token punctuation">;</span>
<span class="token prompt">mysql></span> <span class="token keyword">CHANGE</span> <span class="token keyword">REPLICATION</span> <span class="token keyword">SOURCE</span> <span class="token keyword">TO</span> <span class="token keyword">PRIVILEGE_CHECKS_USER</span> <span class="token operator">=</span> <span class="token string">'gr_repl'</span>@<span class="token string">'%.example.com'</span>
<span class="token keyword">FOR</span> <span class="token keyword">CHANNEL</span> <span class="token string">'group_replication_recovery'</span><span class="token punctuation">;</span>
<span class="token prompt">mysql></span> <span class="token keyword">FLUSH</span> <span class="token keyword">PRIVILEGES</span><span class="token punctuation">;</span>
<span class="token prompt">mysql></span> <span class="token keyword">START</span> <span class="token keyword">GROUP_REPLICATION</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
For Group Replication channels, the
<code class="literal">
REQUIRE_ROW_FORMAT
</code>
setting is automatically
enabled when the channel is created, and cannot be disabled, so
you do not need to specify this.
</p>
<p>
Group Replication requires every table that is to be replicated
by the group to have a defined primary key, or primary key
equivalent where the equivalent is a non-null unique key. Rather
than using the checks carried out by the
<a class="link" href="server-system-variables.html#sysvar_sql_require_primary_key">
<code class="literal">
sql_require_primary_key
</code>
</a>
system
variable, Group Replication has its own built-in set of checks
for primary keys or primary key equivalents. You may set the
<code class="literal">
REQUIRE_TABLE_PRIMARY_KEY_CHECK
</code>
option of the
<a class="link" href="change-replication-source-to.html" title="15.4.2.2 CHANGE REPLICATION SOURCE TO Statement">
<code class="literal">
CHANGE REPLICATION SOURCE TO
</code>
</a>
statement to
<code class="literal">
ON
</code>
for a Group Replication
channel. However, be aware that you might find some transactions
that are permitted under Group Replication's built-in checks are
not permitted under the checks carried out when you set
<code class="literal">
sql_require_primary_key = ON
</code>
or
<code class="literal">
REQUIRE_TABLE_PRIMARY_KEY_CHECK = ON
</code>
. For
this reason, new and upgraded Group Replication channels have
<code class="literal">
REQUIRE_TABLE_PRIMARY_KEY_CHECK
</code>
set to the
default value
<code class="literal">
STREAM
</code>
, rather than
<code class="literal">
ON
</code>
.
</p>
<p>
If a remote cloning operation is used for distributed recovery
in Group Replication (see
<a class="xref" href="group-replication-cloning.html" title="20.5.4.2 Cloning for Distributed Recovery">
Section 20.5.4.2, “Cloning for Distributed Recovery”
</a>
), the
<code class="literal">
PRIVILEGE_CHECKS_USER
</code>
account and related
settings from the donor are cloned to the joining member. If the
joining member is set to start Group Replication on boot, it
automatically uses the account for privilege checks on the
appropriate replication channels.
</p>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/show-create-event.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title">
<a name="show-create-event">
</a>
15.7.7.8 SHOW CREATE EVENT Statement
</h4>
</div>
</div>
</div>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa83061489"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SHOW</span> <span class="token keyword">CREATE</span> <span class="token keyword">EVENT</span> <em class="replaceable">event_name</em></code></pre>
</div>
<p>
This statement displays the
<a class="link" href="create-event.html" title="15.1.13 CREATE EVENT Statement">
<code class="literal">
CREATE
EVENT
</code>
</a>
statement needed to re-create a given event. It
requires the
<a class="link" href="privileges-provided.html#priv_event">
<code class="literal">
EVENT
</code>
</a>
privilege for
the database from which the event is to be shown. For example
(using the same event
<code class="literal">
e_daily
</code>
defined and
then altered in
<a class="xref" href="show-events.html" title="15.7.7.19 SHOW EVENTS Statement">
Section 15.7.7.19, “SHOW EVENTS Statement”
</a>
):
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa32082356"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SHOW</span> <span class="token keyword">CREATE</span> <span class="token keyword">EVENT</span> myschema<span class="token punctuation">.</span>e_daily\G
<span class="token output"><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 1. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
Event<span class="token punctuation">:</span> e_daily
sql_mode<span class="token punctuation">:</span> ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,
NO_ZERO_IN_DATE,NO_ZERO_DATE,
ERROR_FOR_DIVISION_BY_ZERO,
NO_ENGINE_SUBSTITUTION
time_zone<span class="token punctuation">:</span> SYSTEM
Create Event<span class="token punctuation">:</span> CREATE DEFINER=`jon`@`ghidora` EVENT `e_daily`
ON SCHEDULE EVERY 1 DAY
STARTS CURRENT_TIMESTAMP + INTERVAL 6 HOUR
ON COMPLETION NOT PRESERVE
ENABLE
COMMENT 'Saves total number of sessions then
clears the table each day'
DO BEGIN
INSERT INTO site_activity.totals (time, total)
SELECT CURRENT_TIMESTAMP, COUNT(<span class="token punctuation">*</span>)
FROM site_activity.sessions;
DELETE FROM site_activity.sessions;
END
character_set_client<span class="token punctuation">:</span> utf8mb4
collation_connection<span class="token punctuation">:</span> utf8mb4_0900_ai_ci
Database Collation<span class="token punctuation">:</span> utf8mb4_0900_ai_ci</span></code></pre>
</div>
<p>
<code class="literal">
character_set_client
</code>
is the session value of
the
<a class="link" href="server-system-variables.html#sysvar_character_set_client">
<code class="literal">
character_set_client
</code>
</a>
system
variable when the event was created.
<code class="literal">
collation_connection
</code>
is the session value of
the
<a class="link" href="server-system-variables.html#sysvar_collation_connection">
<code class="literal">
collation_connection
</code>
</a>
system
variable when the event was created.
<code class="literal">
Database
Collation
</code>
is the collation of the database with which
the event is associated.
</p>
<p>
The output reflects the current status of the event
(
<code class="literal">
ENABLE
</code>
) rather than the status with which it
was created.
</p>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/innodb-architecture.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title">
<a name="innodb-architecture">
</a>
17.4 InnoDB Architecture
</h2>
</div>
</div>
</div>
<a class="indexterm" name="idm46045167194368">
</a>
<p>
The following diagram shows in-memory and on-disk structures that
comprise the
<code class="literal">
InnoDB
</code>
storage engine
architecture. For information about each structure, see
<a class="xref" href="innodb-in-memory-structures.html" title="17.5 InnoDB In-Memory Structures">
Section 17.5, “InnoDB In-Memory Structures”
</a>
, and
<a class="xref" href="innodb-on-disk-structures.html" title="17.6 InnoDB On-Disk Structures">
Section 17.6, “InnoDB On-Disk Structures”
</a>
.
</p>
<div class="figure">
<a name="innodb-architecture-diagram">
</a>
<p class="title">
<b>
Figure 17.1 InnoDB Architecture
</b>
</p>
<div class="figure-contents">
<div class="mediaobject">
<img alt="InnoDB architecture diagram showing in-memory and on-disk structures. In-memory structures include the buffer pool, adaptive hash index, change buffer, and log buffer. On-disk structures include tablespaces, redo logs, and doublewrite buffer files." src="images/innodb-architecture-8-0.png" style="width: 100%; max-width: 856px;"/>
</div>
</div>
</div>
<br class="figure-break"/>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/case.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title">
<a name="case">
</a>
15.6.5.1 CASE Statement
</h4>
</div>
</div>
</div>
<a class="indexterm" name="idm46045176357024">
</a>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa78574239"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token operator">CASE</span> <em class="replaceable">case_value</em>
<span class="token keyword">WHEN</span> <em class="replaceable">when_value</em> <span class="token keyword">THEN</span> <em class="replaceable">statement_list</em>
<span class="token punctuation">[</span><span class="token keyword">WHEN</span> <em class="replaceable">when_value</em> <span class="token keyword">THEN</span> <em class="replaceable">statement_list</em><span class="token punctuation">]</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>
<span class="token punctuation">[</span><span class="token keyword">ELSE</span> <em class="replaceable">statement_list</em><span class="token punctuation">]</span>
<span class="token keyword">END</span> <span class="token operator">CASE</span></code></pre>
</div>
<p>
Or:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa32545953"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token operator">CASE</span>
<span class="token keyword">WHEN</span> <em class="replaceable">search_condition</em> <span class="token keyword">THEN</span> <em class="replaceable">statement_list</em>
<span class="token punctuation">[</span><span class="token keyword">WHEN</span> <em class="replaceable">search_condition</em> <span class="token keyword">THEN</span> <em class="replaceable">statement_list</em><span class="token punctuation">]</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>
<span class="token punctuation">[</span><span class="token keyword">ELSE</span> <em class="replaceable">statement_list</em><span class="token punctuation">]</span>
<span class="token keyword">END</span> <span class="token operator">CASE</span></code></pre>
</div>
<p>
The
<a class="link" href="case.html" title="15.6.5.1 CASE Statement">
<code class="literal">
CASE
</code>
</a>
statement for stored
programs implements a complex conditional construct.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
There is also a
<a class="link" href="flow-control-functions.html#operator_case">
<code class="literal">
CASE
</code>
</a>
<span class="emphasis">
<em>
operator
</em>
</span>
, which differs from the
<a class="link" href="case.html" title="15.6.5.1 CASE Statement">
<code class="literal">
CASE
</code>
</a>
<span class="emphasis">
<em>
statement
</em>
</span>
described here. See
<a class="xref" href="flow-control-functions.html" title="14.5 Flow Control Functions">
Section 14.5, “Flow Control Functions”
</a>
. The
<a class="link" href="case.html" title="15.6.5.1 CASE Statement">
<code class="literal">
CASE
</code>
</a>
statement cannot have an
<code class="literal">
ELSE NULL
</code>
clause, and it is terminated with
<code class="literal">
END CASE
</code>
instead of
<code class="literal">
END
</code>
.
</p>
</div>
<p>
For the first syntax,
<em class="replaceable">
<code>
case_value
</code>
</em>
is
an expression. This value is compared to the
<em class="replaceable">
<code>
when_value
</code>
</em>
expression in each
<code class="literal">
WHEN
</code>
clause until one of them is equal. When
an equal
<em class="replaceable">
<code>
when_value
</code>
</em>
is found, the
corresponding
<code class="literal">
THEN
</code>
clause
<em class="replaceable">
<code>
statement_list
</code>
</em>
executes. If no
<em class="replaceable">
<code>
when_value
</code>
</em>
is equal, the
<code class="literal">
ELSE
</code>
clause
<em class="replaceable">
<code>
statement_list
</code>
</em>
executes, if there is
one.
</p>
<p>
This syntax cannot be used to test for equality with
<code class="literal">
NULL
</code>
because
<code class="literal">
NULL = NULL
</code>
is false. See
<a class="xref" href="working-with-null.html" title="5.3.4.6 Working with NULL Values">
Section 5.3.4.6, “Working with NULL Values”
</a>
.
</p>
<p>
For the second syntax, each
<code class="literal">
WHEN
</code>
clause
<em class="replaceable">
<code>
search_condition
</code>
</em>
expression is
evaluated until one is true, at which point its corresponding
<code class="literal">
THEN
</code>
clause
<em class="replaceable">
<code>
statement_list
</code>
</em>
executes. If no
<em class="replaceable">
<code>
search_condition
</code>
</em>
is equal, the
<code class="literal">
ELSE
</code>
clause
<em class="replaceable">
<code>
statement_list
</code>
</em>
executes, if there is
one.
</p>
<p>
If no
<em class="replaceable">
<code>
when_value
</code>
</em>
or
<em class="replaceable">
<code>
search_condition
</code>
</em>
matches the value
tested and the
<a class="link" href="case.html" title="15.6.5.1 CASE Statement">
<code class="literal">
CASE
</code>
</a>
statement
contains no
<code class="literal">
ELSE
</code>
clause, a
<span class="errortext">
Case
not found for CASE statement
</span>
error results.
</p>
<p>
Each
<em class="replaceable">
<code>
statement_list
</code>
</em>
consists of one
or more SQL statements; an empty
<em class="replaceable">
<code>
statement_list
</code>
</em>
is not permitted.
</p>
<p>
To handle situations where no value is matched by any
<code class="literal">
WHEN
</code>
clause, use an
<code class="literal">
ELSE
</code>
containing an empty
<a class="link" href="begin-end.html" title="15.6.1 BEGIN ... END Compound Statement">
<code class="literal">
BEGIN ...
END
</code>
</a>
block, as shown in this example. (The indentation
used here in the
<code class="literal">
ELSE
</code>
clause is for purposes
of clarity only, and is not otherwise significant.)
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa67921940"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">DELIMITER</span> <span class="token operator">|</span>
<span class="token keyword">CREATE</span> <span class="token keyword">PROCEDURE</span> p<span class="token punctuation">(</span><span class="token punctuation">)</span>
<span class="token keyword">BEGIN</span>
<span class="token keyword">DECLARE</span> v <span class="token datatype">INT</span> <span class="token keyword">DEFAULT</span> <span class="token number">1</span><span class="token punctuation">;</span>
<span class="token operator">CASE</span> v
<span class="token keyword">WHEN</span> <span class="token number">2</span> <span class="token keyword">THEN</span> <span class="token keyword">SELECT</span> v<span class="token punctuation">;</span>
<span class="token keyword">WHEN</span> <span class="token number">3</span> <span class="token keyword">THEN</span> <span class="token keyword">SELECT</span> <span class="token number">0</span><span class="token punctuation">;</span>
<span class="token keyword">ELSE</span>
<span class="token keyword">BEGIN</span>
<span class="token keyword">END</span><span class="token punctuation">;</span>
<span class="token keyword">END</span> <span class="token operator">CASE</span><span class="token punctuation">;</span>
<span class="token keyword">END</span><span class="token punctuation">;</span>
<span class="token operator">|</span></code></pre>
</div>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/spatial-relation-functions-mbr.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title">
<a name="spatial-relation-functions-mbr">
</a>
14.16.9.2 Spatial Relation Functions That Use Minimum Bounding Rectangles
</h4>
</div>
</div>
</div>
<a class="indexterm" name="idm46045196393744">
</a>
<a class="indexterm" name="idm46045196392704">
</a>
<p>
MySQL provides several MySQL-specific functions that test the
relationship between minimum bounding rectangles (MBRs) of two
geometries
<em class="replaceable">
<code>
g1
</code>
</em>
and
<em class="replaceable">
<code>
g2
</code>
</em>
. The return values 1 and 0
indicate true and false, respectively.
</p>
<p>
The bounding box of a point is interpreted as a point that is
both boundary and interior.
</p>
<p>
The bounding box of a straight horizontal or vertical line is
interpreted as a line where the interior of the line is also
boundary. The endpoints are boundary points.
</p>
<p>
If any of the parameters are geometry collections, the interior,
boundary, and exterior of those parameters are those of the
union of all elements in the collection.
</p>
<p>
Functions in this section detect arguments in either Cartesian
or geographic spatial reference systems (SRSs), and return
results appropriate to the SRS.
</p>
<p>
Unless otherwise specified, functions in this section handle
their geometry arguments as follows:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
If any argument is
<code class="literal">
NULL
</code>
or an empty
geometry, the return value is
<code class="literal">
NULL
</code>
.
</p>
</li>
<li class="listitem">
<p>
If any geometry argument is not a syntactically well-formed
geometry, an
<a class="ulink" href="/doc/mysql-errors/8.4/en/server-error-reference.html#error_er_gis_invalid_data" target="_top">
<code class="literal">
ER_GIS_INVALID_DATA
</code>
</a>
error
occurs.
</p>
</li>
<li class="listitem">
<p>
If any geometry argument is a syntactically well-formed
geometry in an undefined spatial reference system (SRS), an
<a class="ulink" href="/doc/mysql-errors/8.4/en/server-error-reference.html#error_er_srs_not_found" target="_top">
<code class="literal">
ER_SRS_NOT_FOUND
</code>
</a>
error
occurs.
</p>
</li>
<li class="listitem">
<p>
For functions that take multiple geometry arguments, if
those arguments are not in the same SRS, an
<a class="ulink" href="/doc/mysql-errors/8.4/en/server-error-reference.html#error_er_gis_different_srids" target="_top">
<code class="literal">
ER_GIS_DIFFERENT_SRIDS
</code>
</a>
error
occurs.
</p>
</li>
<li class="listitem">
<p>
If any argument is geometrically invalid, either the result
is true or false (it is undefined which), or an error
occurs.
</p>
</li>
<li class="listitem">
<p>
For geographic SRS geometry arguments, if any argument has a
longitude or latitude that is out of range, an error occurs:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
If a longitude value is not in the range (−180,
180], an
<a class="ulink" href="/doc/mysql-errors/8.4/en/server-error-reference.html#error_er_geometry_param_longitude_out_of_range" target="_top">
<code class="literal">
ER_GEOMETRY_PARAM_LONGITUDE_OUT_OF_RANGE
</code>
</a>
error occurs.
</p>
</li>
<li class="listitem">
<p>
If a latitude value is not in the range [−90, 90],
an
<a class="ulink" href="/doc/mysql-errors/8.4/en/server-error-reference.html#error_er_geometry_param_latitude_out_of_range" target="_top">
<code class="literal">
ER_GEOMETRY_PARAM_LATITUDE_OUT_OF_RANGE
</code>
</a>
error occurs.
</p>
</li>
</ul>
</div>
<p>
Ranges shown are in degrees. If an SRS uses another unit,
the range uses the corresponding values in its unit. The
exact range limits deviate slightly due to floating-point
arithmetic.
</p>
</li>
<li class="listitem">
<p>
Otherwise, the return value is non-
<code class="literal">
NULL
</code>
.
</p>
</li>
</ul>
</div>
<p>
These MBR functions are available for testing geometry
relationships:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<a name="function_mbrcontains">
</a>
<p>
<a class="link" href="spatial-relation-functions-mbr.html#function_mbrcontains">
<code class="literal">
MBRContains(
<em class="replaceable">
<code>
g1
</code>
</em>
,
<em class="replaceable">
<code>
g2
</code>
</em>
)
</code>
</a>
</p>
<a class="indexterm" name="idm46045196362592">
</a>
<p>
Returns 1 or 0 to indicate whether the minimum bounding
rectangle of
<em class="replaceable">
<code>
g1
</code>
</em>
contains the
minimum bounding rectangle of
<em class="replaceable">
<code>
g2
</code>
</em>
.
This tests the opposite relationship as
<a class="link" href="spatial-relation-functions-mbr.html#function_mbrwithin">
<code class="literal">
MBRWithin()
</code>
</a>
.
</p>
<p>
<a class="link" href="spatial-relation-functions-mbr.html#function_mbrcontains">
<code class="literal">
MBRContains()
</code>
</a>
handles its
arguments as described in the introduction to this section.
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa23967878"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SET</span> <span class="token variable">@g1</span> <span class="token operator">=</span> <span class="token function">ST_GeomFromText</span><span class="token punctuation">(</span><span class="token string">'Polygon((0 0,0 3,3 3,3 0,0 0))'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token prompt">mysql></span> <span class="token keyword">SET</span> <span class="token variable">@g2</span> <span class="token operator">=</span> <span class="token function">ST_GeomFromText</span><span class="token punctuation">(</span><span class="token string">'Point(1 1)'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> <span class="token function">MBRContains</span><span class="token punctuation">(</span><span class="token variable">@g1</span><span class="token punctuation">,</span><span class="token variable">@g2</span><span class="token punctuation">)</span><span class="token punctuation">,</span> <span class="token function">MBRWithin</span><span class="token punctuation">(</span><span class="token variable">@g2</span><span class="token punctuation">,</span><span class="token variable">@g1</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> MBRContains(@g1,@g2) <span class="token punctuation">|</span> MBRWithin(@g2,@g1) <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> 1 <span class="token punctuation">|</span> 1 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
</li>
<li class="listitem">
<a name="function_mbrcoveredby">
</a>
<p>
<a class="link" href="spatial-relation-functions-mbr.html#function_mbrcoveredby">
<code class="literal">
MBRCoveredBy(
<em class="replaceable">
<code>
g1
</code>
</em>
,
<em class="replaceable">
<code>
g2
</code>
</em>
)
</code>
</a>
</p>
<a class="indexterm" name="idm46045196347472">
</a>
<p>
Returns 1 or 0 to indicate whether the minimum bounding
rectangle of
<em class="replaceable">
<code>
g1
</code>
</em>
is covered by the
minimum bounding rectangle of
<em class="replaceable">
<code>
g2
</code>
</em>
.
This tests the opposite relationship as
<a class="link" href="spatial-relation-functions-mbr.html#function_mbrcovers">
<code class="literal">
MBRCovers()
</code>
</a>
.
</p>
<p>
<a class="link" href="spatial-relation-functions-mbr.html#function_mbrcoveredby">
<code class="literal">
MBRCoveredBy()
</code>
</a>
handles its
arguments as described in the introduction to this section.
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa33485396"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SET</span> <span class="token variable">@g1</span> <span class="token operator">=</span> <span class="token function">ST_GeomFromText</span><span class="token punctuation">(</span><span class="token string">'Polygon((0 0,0 3,3 3,3 0,0 0))'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token prompt">mysql></span> <span class="token keyword">SET</span> <span class="token variable">@g2</span> <span class="token operator">=</span> <span class="token function">ST_GeomFromText</span><span class="token punctuation">(</span><span class="token string">'Point(1 1)'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> <span class="token function">MBRCovers</span><span class="token punctuation">(</span><span class="token variable">@g1</span><span class="token punctuation">,</span><span class="token variable">@g2</span><span class="token punctuation">)</span><span class="token punctuation">,</span> <span class="token function">MBRCoveredby</span><span class="token punctuation">(</span><span class="token variable">@g1</span><span class="token punctuation">,</span><span class="token variable">@g2</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> MBRCovers(@g1,@g2) <span class="token punctuation">|</span> MBRCoveredby(@g1,@g2) <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> 1 <span class="token punctuation">|</span> 0 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> <span class="token function">MBRCovers</span><span class="token punctuation">(</span><span class="token variable">@g2</span><span class="token punctuation">,</span><span class="token variable">@g1</span><span class="token punctuation">)</span><span class="token punctuation">,</span> <span class="token function">MBRCoveredby</span><span class="token punctuation">(</span><span class="token variable">@g2</span><span class="token punctuation">,</span><span class="token variable">@g1</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> MBRCovers(@g2,@g1) <span class="token punctuation">|</span> MBRCoveredby(@g2,@g1) <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> 0 <span class="token punctuation">|</span> 1 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
</li>
<li class="listitem">
<a name="function_mbrcovers">
</a>
<p>
<a class="link" href="spatial-relation-functions-mbr.html#function_mbrcovers">
<code class="literal">
MBRCovers(
<em class="replaceable">
<code>
g1
</code>
</em>
,
<em class="replaceable">
<code>
g2
</code>
</em>
)
</code>
</a>
</p>
<a class="indexterm" name="idm46045196331120">
</a>
<p>
Returns 1 or 0 to indicate whether the minimum bounding
rectangle of
<em class="replaceable">
<code>
g1
</code>
</em>
covers the
minimum bounding rectangle of
<em class="replaceable">
<code>
g2
</code>
</em>
.
This tests the opposite relationship as
<a class="link" href="spatial-relation-functions-mbr.html#function_mbrcoveredby">
<code class="literal">
MBRCoveredBy()
</code>
</a>
. See the
description of
<a class="link" href="spatial-relation-functions-mbr.html#function_mbrcoveredby">
<code class="literal">
MBRCoveredBy()
</code>
</a>
for examples.
</p>
<p>
<a class="link" href="spatial-relation-functions-mbr.html#function_mbrcovers">
<code class="literal">
MBRCovers()
</code>
</a>
handles its
arguments as described in the introduction to this section.
</p>
</li>
<li class="listitem">
<a name="function_mbrdisjoint">
</a>
<p>
<a class="link" href="spatial-relation-functions-mbr.html#function_mbrdisjoint">
<code class="literal">
MBRDisjoint(
<em class="replaceable">
<code>
g1
</code>
</em>
,
<em class="replaceable">
<code>
g2
</code>
</em>
)
</code>
</a>
</p>
<a class="indexterm" name="idm46045196318688">
</a>
<p>
Returns 1 or 0 to indicate whether the minimum bounding
rectangles of the two geometries
<em class="replaceable">
<code>
g1
</code>
</em>
and
<em class="replaceable">
<code>
g2
</code>
</em>
are disjoint (do not
intersect).
</p>
<p>
<a class="link" href="spatial-relation-functions-mbr.html#function_mbrdisjoint">
<code class="literal">
MBRDisjoint()
</code>
</a>
handles its
arguments as described in the introduction to this section.
</p>
</li>
<li class="listitem">
<a name="function_mbrequals">
</a>
<p>
<a class="link" href="spatial-relation-functions-mbr.html#function_mbrequals">
<code class="literal">
MBREquals(
<em class="replaceable">
<code>
g1
</code>
</em>
,
<em class="replaceable">
<code>
g2
</code>
</em>
)
</code>
</a>
</p>
<a class="indexterm" name="idm46045196308752">
</a>
<p>
Returns 1 or 0 to indicate whether the minimum bounding
rectangles of the two geometries
<em class="replaceable">
<code>
g1
</code>
</em>
and
<em class="replaceable">
<code>
g2
</code>
</em>
are the same.
</p>
<p>
<a class="link" href="spatial-relation-functions-mbr.html#function_mbrequals">
<code class="literal">
MBREquals()
</code>
</a>
handles its
arguments as described in the introduction to this section,
except that it does not return
<code class="literal">
NULL
</code>
for
empty geometry arguments.
</p>
</li>
<li class="listitem">
<a name="function_mbrintersects">
</a>
<p>
<a class="link" href="spatial-relation-functions-mbr.html#function_mbrintersects">
<code class="literal">
MBRIntersects(
<em class="replaceable">
<code>
g1
</code>
</em>
,
<em class="replaceable">
<code>
g2
</code>
</em>
)
</code>
</a>
</p>
<a class="indexterm" name="idm46045196298064">
</a>
<p>
Returns 1 or 0 to indicate whether the minimum bounding
rectangles of the two geometries
<em class="replaceable">
<code>
g1
</code>
</em>
and
<em class="replaceable">
<code>
g2
</code>
</em>
intersect.
</p>
<p>
<a class="link" href="spatial-relation-functions-mbr.html#function_mbrintersects">
<code class="literal">
MBRIntersects()
</code>
</a>
handles its
arguments as described in the introduction to this section.
</p>
</li>
<li class="listitem">
<a name="function_mbroverlaps">
</a>
<p>
<a class="link" href="spatial-relation-functions-mbr.html#function_mbroverlaps">
<code class="literal">
MBROverlaps(
<em class="replaceable">
<code>
g1
</code>
</em>
,
<em class="replaceable">
<code>
g2
</code>
</em>
)
</code>
</a>
</p>
<a class="indexterm" name="idm46045196288176">
</a>
<p>
Two geometries
<span class="emphasis">
<em>
spatially overlap
</em>
</span>
if
they intersect and their intersection results in a geometry
of the same dimension but not equal to either of the given
geometries.
</p>
<p>
This function returns 1 or 0 to indicate whether the minimum
bounding rectangles of the two geometries
<em class="replaceable">
<code>
g1
</code>
</em>
and
<em class="replaceable">
<code>
g2
</code>
</em>
overlap.
</p>
<p>
<a class="link" href="spatial-relation-functions-mbr.html#function_mbroverlaps">
<code class="literal">
MBROverlaps()
</code>
</a>
handles its
arguments as described in the introduction to this section.
</p>
</li>
<li class="listitem">
<a name="function_mbrtouches">
</a>
<p>
<a class="link" href="spatial-relation-functions-mbr.html#function_mbrtouches">
<code class="literal">
MBRTouches(
<em class="replaceable">
<code>
g1
</code>
</em>
,
<em class="replaceable">
<code>
g2
</code>
</em>
)
</code>
</a>
</p>
<a class="indexterm" name="idm46045196277232">
</a>
<p>
Two geometries
<span class="emphasis">
<em>
spatially touch
</em>
</span>
if their
interiors do not intersect, but the boundary of one of the
geometries intersects either the boundary or the interior of
the other.
</p>
<p>
This function returns 1 or 0 to indicate whether the minimum
bounding rectangles of the two geometries
<em class="replaceable">
<code>
g1
</code>
</em>
and
<em class="replaceable">
<code>
g2
</code>
</em>
touch.
</p>
<p>
<a class="link" href="spatial-relation-functions-mbr.html#function_mbrtouches">
<code class="literal">
MBRTouches()
</code>
</a>
handles its
arguments as described in the introduction to this section.
</p>
</li>
<li class="listitem">
<a name="function_mbrwithin">
</a>
<p>
<a class="link" href="spatial-relation-functions-mbr.html#function_mbrwithin">
<code class="literal">
MBRWithin(
<em class="replaceable">
<code>
g1
</code>
</em>
,
<em class="replaceable">
<code>
g2
</code>
</em>
)
</code>
</a>
</p>
<a class="indexterm" name="idm46045196266336">
</a>
<p>
Returns 1 or 0 to indicate whether the minimum bounding
rectangle of
<em class="replaceable">
<code>
g1
</code>
</em>
is within the
minimum bounding rectangle of
<em class="replaceable">
<code>
g2
</code>
</em>
.
This tests the opposite relationship as
<a class="link" href="spatial-relation-functions-mbr.html#function_mbrcontains">
<code class="literal">
MBRContains()
</code>
</a>
.
</p>
<p>
<a class="link" href="spatial-relation-functions-mbr.html#function_mbrwithin">
<code class="literal">
MBRWithin()
</code>
</a>
handles its
arguments as described in the introduction to this section.
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa10484403"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SET</span> <span class="token variable">@g1</span> <span class="token operator">=</span> <span class="token function">ST_GeomFromText</span><span class="token punctuation">(</span><span class="token string">'Polygon((0 0,0 3,3 3,3 0,0 0))'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token prompt">mysql></span> <span class="token keyword">SET</span> <span class="token variable">@g2</span> <span class="token operator">=</span> <span class="token function">ST_GeomFromText</span><span class="token punctuation">(</span><span class="token string">'Polygon((0 0,0 5,5 5,5 0,0 0))'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> <span class="token function">MBRWithin</span><span class="token punctuation">(</span><span class="token variable">@g1</span><span class="token punctuation">,</span><span class="token variable">@g2</span><span class="token punctuation">)</span><span class="token punctuation">,</span> <span class="token function">MBRWithin</span><span class="token punctuation">(</span><span class="token variable">@g2</span><span class="token punctuation">,</span><span class="token variable">@g1</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> MBRWithin(@g1,@g2) <span class="token punctuation">|</span> MBRWithin(@g2,@g1) <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> 1 <span class="token punctuation">|</span> 0 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
</li>
</ul>
</div>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/leave.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title">
<a name="leave">
</a>
15.6.5.4 LEAVE Statement
</h4>
</div>
</div>
</div>
<a class="indexterm" name="idm46045176259088">
</a>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa78481888"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">LEAVE</span> <em class="replaceable">label</em></code></pre>
</div>
<p>
This statement is used to exit the flow control construct that
has the given label. If the label is for the outermost stored
program block,
<a class="link" href="leave.html" title="15.6.5.4 LEAVE Statement">
<code class="literal">
LEAVE
</code>
</a>
exits the
program.
</p>
<p>
<a class="link" href="leave.html" title="15.6.5.4 LEAVE Statement">
<code class="literal">
LEAVE
</code>
</a>
can be used within
<a class="link" href="begin-end.html" title="15.6.1 BEGIN ... END Compound Statement">
<code class="literal">
BEGIN ...
END
</code>
</a>
or loop constructs
(
<a class="link" href="loop.html" title="15.6.5.5 LOOP Statement">
<code class="literal">
LOOP
</code>
</a>
,
<a class="link" href="repeat.html" title="15.6.5.6 REPEAT Statement">
<code class="literal">
REPEAT
</code>
</a>
,
<a class="link" href="while.html" title="15.6.5.8 WHILE Statement">
<code class="literal">
WHILE
</code>
</a>
).
</p>
<p>
For an example, see
<a class="xref" href="loop.html" title="15.6.5.5 LOOP Statement">
Section 15.6.5.5, “LOOP Statement”
</a>
.
</p>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/performance-schema-replication-applier-status-table.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title">
<a name="performance-schema-replication-applier-status-table">
</a>
29.12.11.5 The replication_applier_status Table
</h4>
</div>
</div>
</div>
<a class="indexterm" name="idm46045071476832">
</a>
<a class="indexterm" name="idm46045071475328">
</a>
<p>
This table shows the current general transaction execution
status on the replica. The table provides information about
general aspects of transaction applier status that are not
specific to any thread involved. Thread-specific status
information is available in the
<a class="link" href="performance-schema-replication-applier-status-by-coordinator-table.html" title="29.12.11.6 The replication_applier_status_by_coordinator Table">
<code class="literal">
replication_applier_status_by_coordinator
</code>
</a>
table (and
<a class="link" href="performance-schema-replication-applier-status-by-worker-table.html" title="29.12.11.7 The replication_applier_status_by_worker Table">
<code class="literal">
replication_applier_status_by_worker
</code>
</a>
if the replica is multithreaded).
</p>
<p>
The
<a class="link" href="performance-schema-replication-applier-status-table.html" title="29.12.11.5 The replication_applier_status Table">
<code class="literal">
replication_applier_status
</code>
</a>
table has these columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<code class="literal">
CHANNEL_NAME
</code>
</p>
<p>
The replication channel which this row is displaying.
There is always a default replication channel, and more
replication channels can be added. See
<a class="xref" href="replication-channels.html" title="19.2.2 Replication Channels">
Section 19.2.2, “Replication Channels”
</a>
for more
information.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
SERVICE_STATE
</code>
</p>
<p>
Shows
<code class="literal">
ON
</code>
when the replication
channel's applier threads are active or idle,
<code class="literal">
OFF
</code>
means that the applier threads are
not active.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
REMAINING_DELAY
</code>
</p>
<p>
If the replica is waiting for
<code class="literal">
DESIRED_DELAY
</code>
seconds to pass since the
source applied a transaction, this field contains the
number of delay seconds remaining. At other times, this
field is
<code class="literal">
NULL
</code>
. (The
<code class="literal">
DESIRED_DELAY
</code>
value is stored in the
<a class="link" href="performance-schema-replication-applier-configuration-table.html" title="29.12.11.2 The replication_applier_configuration Table">
<code class="literal">
replication_applier_configuration
</code>
</a>
table.) See
<a class="xref" href="replication-delayed.html" title="19.4.11 Delayed Replication">
Section 19.4.11, “Delayed Replication”
</a>
for more
information.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
COUNT_TRANSACTIONS_RETRIES
</code>
</p>
<p>
Shows the number of retries that were made because the
replication SQL thread failed to apply a transaction. The
maximum number of retries for a given transaction is set
by the system variable
<a class="link" href="replication-options-replica.html#sysvar_replica_transaction_retries">
<code class="literal">
replica_transaction_retries
</code>
</a>
.
The
<a class="link" href="performance-schema-replication-applier-status-by-worker-table.html" title="29.12.11.7 The replication_applier_status_by_worker Table">
<code class="literal">
replication_applier_status_by_worker
</code>
</a>
table shows detailed information on transaction retries
for a single-threaded or multithreaded replica.
</p>
</li>
</ul>
</div>
<p>
The
<a class="link" href="performance-schema-replication-applier-status-table.html" title="29.12.11.5 The replication_applier_status Table">
<code class="literal">
replication_applier_status
</code>
</a>
table has these indexes:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
Primary key on (
<code class="literal">
CHANNEL_NAME
</code>
)
</p>
</li>
</ul>
</div>
<p>
<a class="link" href="truncate-table.html" title="15.1.37 TRUNCATE TABLE Statement">
<code class="literal">
TRUNCATE TABLE
</code>
</a>
is not permitted
for the
<a class="link" href="performance-schema-replication-applier-status-table.html" title="29.12.11.5 The replication_applier_status Table">
<code class="literal">
replication_applier_status
</code>
</a>
table.
</p>
<p>
The following table shows the correspondence between
<a class="link" href="performance-schema-replication-applier-status-table.html" title="29.12.11.5 The replication_applier_status Table">
<code class="literal">
replication_applier_status
</code>
</a>
columns and
<a class="link" href="show-replica-status.html" title="15.7.7.35 SHOW REPLICA STATUS Statement">
<code class="literal">
SHOW
REPLICA STATUS
</code>
</a>
columns.
</p>
<div class="informaltable">
<table summary="Correspondence between replication_applier_status columns and SHOW REPLICA STATUS columns">
<colgroup>
<col style="width: 60%"/>
<col style="width: 40%"/>
</colgroup>
<thead>
<tr>
<th>
<code class="literal">
replication_applier_status
</code>
Column
</th>
<th>
<code class="literal">
SHOW REPLICA STATUS
</code>
Column
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<code class="literal">
SERVICE_STATE
</code>
</td>
<td>
None
</td>
</tr>
<tr>
<td>
<code class="literal">
REMAINING_DELAY
</code>
</td>
<td>
<code class="literal">
SQL_Remaining_Delay
</code>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/mysqlshow.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a name="mysqlshow">
</a>
6.5.6 mysqlshow — Display Database, Table, and Column Information
</h3>
</div>
</div>
</div>
<a class="indexterm" name="idm46045310852144">
</a>
<a class="indexterm" name="idm46045310851232">
</a>
<a class="indexterm" name="idm46045310849872">
</a>
<a class="indexterm" name="idm46045310848512">
</a>
<a class="indexterm" name="idm46045310847152">
</a>
<a class="indexterm" name="idm46045310845792">
</a>
<p>
The
<a class="link" href="mysqlshow.html" title="6.5.6 mysqlshow — Display Database, Table, and Column Information">
<span class="command">
<strong>
mysqlshow
</strong>
</span>
</a>
client can be used to quickly
see which databases exist, their tables, or a table's columns or
indexes.
</p>
<p>
<a class="link" href="mysqlshow.html" title="6.5.6 mysqlshow — Display Database, Table, and Column Information">
<span class="command">
<strong>
mysqlshow
</strong>
</span>
</a>
provides a command-line interface
to several SQL
<a class="link" href="show.html" title="15.7.7 SHOW Statements">
<code class="literal">
SHOW
</code>
</a>
statements.
See
<a class="xref" href="show.html" title="15.7.7 SHOW Statements">
Section 15.7.7, “SHOW Statements”
</a>
. The same information can be obtained
by using those statements directly. For example, you can issue
them from the
<a class="link" href="mysql.html" title="6.5.1 mysql — The MySQL Command-Line Client">
<span class="command">
<strong>
mysql
</strong>
</span>
</a>
client program.
</p>
<p>
Invoke
<a class="link" href="mysqlshow.html" title="6.5.6 mysqlshow — Display Database, Table, and Column Information">
<span class="command">
<strong>
mysqlshow
</strong>
</span>
</a>
like this:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa51265905"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">mysqlshow <span class="token punctuation">[</span><em class="replaceable">options</em><span class="token punctuation">]</span> <span class="token punctuation">[</span><em class="replaceable">db_name</em> <span class="token punctuation">[</span><em class="replaceable">tbl_name</em> <span class="token punctuation">[</span><em class="replaceable">col_name</em><span class="token punctuation">]</span><span class="token punctuation">]</span><span class="token punctuation">]</span></code></pre>
</div>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
If no database is given, a list of database names is shown.
</p>
</li>
<li class="listitem">
<p>
If no table is given, all matching tables in the database
are shown.
</p>
</li>
<li class="listitem">
<p>
If no column is given, all matching columns and column types
in the table are shown.
</p>
</li>
</ul>
</div>
<p>
The output displays only the names of those databases, tables,
or columns for which you have some privileges.
</p>
<p>
If the last argument contains shell or SQL wildcard characters
(
<code class="literal">
*
</code>
,
<code class="literal">
?
</code>
,
<code class="literal">
%
</code>
, or
<code class="literal">
_
</code>
), only those names
that are matched by the wildcard are shown. If a database name
contains any underscores, those should be escaped with a
backslash (some Unix shells require two) to get a list of the
proper tables or columns.
<code class="literal">
*
</code>
and
<code class="literal">
?
</code>
characters are converted into SQL
<code class="literal">
%
</code>
and
<code class="literal">
_
</code>
wildcard
characters. This might cause some confusion when you try to
display the columns for a table with a
<code class="literal">
_
</code>
in
the name, because in this case,
<a class="link" href="mysqlshow.html" title="6.5.6 mysqlshow — Display Database, Table, and Column Information">
<span class="command">
<strong>
mysqlshow
</strong>
</span>
</a>
shows you only the table names that match the pattern. This is
easily fixed by adding an extra
<code class="literal">
%
</code>
last on the
command line as a separate argument.
</p>
<p>
<a class="link" href="mysqlshow.html" title="6.5.6 mysqlshow — Display Database, Table, and Column Information">
<span class="command">
<strong>
mysqlshow
</strong>
</span>
</a>
supports the following options,
which can be specified on the command line or in the
<code class="literal">
[mysqlshow]
</code>
and
<code class="literal">
[client]
</code>
groups of an option file. For information about option files
used by MySQL programs, see
<a class="xref" href="option-files.html" title="6.2.2.2 Using Option Files">
Section 6.2.2.2, “Using Option Files”
</a>
.
</p>
<div class="table">
<a name="idm46045310816704">
</a>
<p class="title">
<b>
Table 6.15 mysqlshow Options
</b>
</p>
<div class="table-contents">
<table frame="box" rules="all" summary="Command-line options available for mysqlshow.">
<colgroup>
<col style="width: 35%"/>
<col style="width: 64%"/>
</colgroup>
<thead>
<tr>
<th>
Option Name
</th>
<th>
Description
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_bind-address">
--bind-address
</a>
</td>
<td>
Use specified network interface to connect to MySQL Server
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_character-sets-dir">
--character-sets-dir
</a>
</td>
<td>
Directory where character sets can be found
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_compress">
--compress
</a>
</td>
<td>
Compress all information sent between client and server
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_compression-algorithms">
--compression-algorithms
</a>
</td>
<td>
Permitted compression algorithms for connections to server
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_count">
--count
</a>
</td>
<td>
Show the number of rows per table
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_debug">
--debug
</a>
</td>
<td>
Write debugging log
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_debug-check">
--debug-check
</a>
</td>
<td>
Print debugging information when program exits
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_debug-info">
--debug-info
</a>
</td>
<td>
Print debugging information, memory, and CPU statistics when program exits
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_default-auth">
--default-auth
</a>
</td>
<td>
Authentication plugin to use
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_default-character-set">
--default-character-set
</a>
</td>
<td>
Specify default character set
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_defaults-extra-file">
--defaults-extra-file
</a>
</td>
<td>
Read named option file in addition to usual option files
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_defaults-file">
--defaults-file
</a>
</td>
<td>
Read only named option file
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_defaults-group-suffix">
--defaults-group-suffix
</a>
</td>
<td>
Option group suffix value
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_enable-cleartext-plugin">
--enable-cleartext-plugin
</a>
</td>
<td>
Enable cleartext authentication plugin
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_get-server-public-key">
--get-server-public-key
</a>
</td>
<td>
Request RSA public key from server
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_help">
--help
</a>
</td>
<td>
Display help message and exit
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_host">
--host
</a>
</td>
<td>
Host on which MySQL server is located
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_keys">
--keys
</a>
</td>
<td>
Show table indexes
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_login-path">
--login-path
</a>
</td>
<td>
Read login path options from .mylogin.cnf
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_no-defaults">
--no-defaults
</a>
</td>
<td>
Read no option files
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_no-login-paths">
--no-login-paths
</a>
</td>
<td>
Do not read login paths from the login path file
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_password">
--password
</a>
</td>
<td>
Password to use when connecting to server
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_password1">
--password1
</a>
</td>
<td>
First multifactor authentication password to use when connecting to server
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_password2">
--password2
</a>
</td>
<td>
Second multifactor authentication password to use when connecting to server
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_password3">
--password3
</a>
</td>
<td>
Third multifactor authentication password to use when connecting to server
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_pipe">
--pipe
</a>
</td>
<td>
Connect to server using named pipe (Windows only)
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_plugin-dir">
--plugin-dir
</a>
</td>
<td>
Directory where plugins are installed
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_port">
--port
</a>
</td>
<td>
TCP/IP port number for connection
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_print-defaults">
--print-defaults
</a>
</td>
<td>
Print default options
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_protocol">
--protocol
</a>
</td>
<td>
Transport protocol to use
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_server-public-key-path">
--server-public-key-path
</a>
</td>
<td>
Path name to file containing RSA public key
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_shared-memory-base-name">
--shared-memory-base-name
</a>
</td>
<td>
Shared-memory name for shared-memory connections (Windows only)
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_show-table-type">
--show-table-type
</a>
</td>
<td>
Show a column indicating the table type
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_socket">
--socket
</a>
</td>
<td>
Unix socket file or Windows named pipe to use
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_ssl">
--ssl-ca
</a>
</td>
<td>
File that contains list of trusted SSL Certificate Authorities
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_ssl">
--ssl-capath
</a>
</td>
<td>
Directory that contains trusted SSL Certificate Authority certificate files
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_ssl">
--ssl-cert
</a>
</td>
<td>
File that contains X.509 certificate
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_ssl">
--ssl-cipher
</a>
</td>
<td>
Permissible ciphers for connection encryption
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_ssl">
--ssl-crl
</a>
</td>
<td>
File that contains certificate revocation lists
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_ssl">
--ssl-crlpath
</a>
</td>
<td>
Directory that contains certificate revocation-list files
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_ssl-fips-mode">
--ssl-fips-mode
</a>
</td>
<td>
Whether to enable FIPS mode on client side
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_ssl">
--ssl-key
</a>
</td>
<td>
File that contains X.509 key
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_ssl">
--ssl-mode
</a>
</td>
<td>
Desired security state of connection to server
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_ssl">
--ssl-session-data
</a>
</td>
<td>
File that contains SSL session data
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_ssl">
--ssl-session-data-continue-on-failed-reuse
</a>
</td>
<td>
Whether to establish connections if session reuse fails
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_status">
--status
</a>
</td>
<td>
Display extra information about each table
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_tls-ciphersuites">
--tls-ciphersuites
</a>
</td>
<td>
Permissible TLSv1.3 ciphersuites for encrypted connections
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_tls-sni-servername">
--tls-sni-servername
</a>
</td>
<td>
Server name supplied by the client
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_tls-version">
--tls-version
</a>
</td>
<td>
Permissible TLS protocols for encrypted connections
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_user">
--user
</a>
</td>
<td>
MySQL user name to use when connecting to server
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_verbose">
--verbose
</a>
</td>
<td>
Verbose mode
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_version">
--version
</a>
</td>
<td>
Display version information and exit
</td>
</tr>
<tr>
<td>
<a class="link" href="mysqlshow.html#option_mysqlshow_zstd-compression-level">
--zstd-compression-level
</a>
</td>
<td>
Compression level for connections to server that use zstd compression
</td>
</tr>
</tbody>
</table>
</div>
<div class="table-contents">
<table cellpadding="0" cellspacing="0" style="position: fixed; top: 0px; display: none; left: 401px; width: 739px;">
<thead>
<tr>
<th style="width: 260.906px;">
Option Name
</th>
<th style="width: 477.094px;">
Description
</th>
</tr>
</thead>
</table>
</div>
</div>
<br class="table-break"/>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<a name="option_mysqlshow_help">
</a>
<a class="link" href="mysqlshow.html#option_mysqlshow_help">
<code class="option">
--help
</code>
</a>
,
<code class="option">
-?
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for help">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--help
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045310657728">
</a>
<a class="indexterm" name="idm46045310656240">
</a>
<p>
Display a help message and exit.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlshow_bind-address">
</a>
<a class="link" href="mysqlshow.html#option_mysqlshow_bind-address">
<code class="option">
--bind-address=
<em class="replaceable">
<code>
ip_address
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for bind-address">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--bind-address=ip_address
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045310646272">
</a>
<a class="indexterm" name="idm46045310644784">
</a>
<p>
On a computer having multiple network interfaces, use this
option to select which interface to use for connecting to
the MySQL server.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlshow_character-sets-dir">
</a>
<a class="link" href="mysqlshow.html#option_mysqlshow_character-sets-dir">
<code class="option">
--character-sets-dir=
<em class="replaceable">
<code>
dir_name
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for character-sets-dir">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--character-sets-dir=path
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
[none]
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045310630208">
</a>
<a class="indexterm" name="idm46045310628704">
</a>
<p>
The directory where character sets are installed. See
<a class="xref" href="charset-configuration.html" title="12.15 Character Set Configuration">
Section 12.15, “Character Set Configuration”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlshow_compress">
</a>
<a class="link" href="mysqlshow.html#option_mysqlshow_compress">
<code class="option">
--compress
</code>
</a>
,
<code class="option">
-C
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for compress">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--compress[={OFF|ON}]
</code>
</td>
</tr>
<tr>
<th>
Deprecated
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
OFF
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045310611408">
</a>
<a class="indexterm" name="idm46045310609920">
</a>
<p>
Compress all information sent between the client and the
server if possible. See
<a class="xref" href="connection-compression-control.html" title="6.2.8 Connection Compression Control">
Section 6.2.8, “Connection Compression Control”
</a>
.
</p>
<p>
This option is deprecated. Expect it to be removed in a
future version of MySQL. See
<a class="xref" href="connection-compression-control.html#connection-compression-legacy-configuration" title="Configuring Legacy Connection Compression">
Configuring Legacy Connection Compression
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlshow_compression-algorithms">
</a>
<a class="link" href="mysqlshow.html#option_mysqlshow_compression-algorithms">
<code class="option">
--compression-algorithms=
<em class="replaceable">
<code>
value
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for compression-algorithms">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--compression-algorithms=value
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Set
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
uncompressed
</code>
</td>
</tr>
<tr>
<th>
Valid Values
</th>
<td>
<p class="valid-value">
<code class="literal">
zlib
</code>
</p>
<p class="valid-value">
<code class="literal">
zstd
</code>
</p>
<p class="valid-value">
<code class="literal">
uncompressed
</code>
</p>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045310588736">
</a>
<a class="indexterm" name="idm46045310587232">
</a>
<p>
The permitted compression algorithms for connections to the
server. The available algorithms are the same as for the
<a class="link" href="server-system-variables.html#sysvar_protocol_compression_algorithms">
<code class="literal">
protocol_compression_algorithms
</code>
</a>
system variable. The default value is
<code class="literal">
uncompressed
</code>
.
</p>
<p>
For more information, see
<a class="xref" href="connection-compression-control.html" title="6.2.8 Connection Compression Control">
Section 6.2.8, “Connection Compression Control”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlshow_count">
</a>
<a class="link" href="mysqlshow.html#option_mysqlshow_count">
<code class="option">
--count
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for count">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--count
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045310574336">
</a>
<a class="indexterm" name="idm46045310572848">
</a>
<p>
Show the number of rows per table. This can be slow for
non-
<code class="literal">
MyISAM
</code>
tables.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlshow_debug">
</a>
<a class="link" href="mysqlshow.html#option_mysqlshow_debug">
<code class="option">
--debug[=
<em class="replaceable">
<code>
debug_options
</code>
</em>
]
</code>
</a>
,
<code class="option">
-#
[
<em class="replaceable">
<code>
debug_options
</code>
</em>
]
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for debug">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--debug[=debug_options]
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
d:t:o
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045310556752">
</a>
<a class="indexterm" name="idm46045310555264">
</a>
<p>
Write a debugging log. A typical
<em class="replaceable">
<code>
debug_options
</code>
</em>
string is
<code class="literal">
d:t:o,
<em class="replaceable">
<code>
file_name
</code>
</em>
</code>
.
The default is
<code class="literal">
d:t:o
</code>
.
</p>
<p>
This option is available only if MySQL was built using
<a class="link" href="source-configuration-options.html#option_cmake_with_debug">
<code class="option">
WITH_DEBUG
</code>
</a>
. MySQL release
binaries provided by Oracle are
<span class="emphasis">
<em>
not
</em>
</span>
built using this option.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlshow_debug-check">
</a>
<a class="link" href="mysqlshow.html#option_mysqlshow_debug-check">
<code class="option">
--debug-check
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for debug-check">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--debug-check
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
FALSE
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045310536976">
</a>
<a class="indexterm" name="idm46045310535488">
</a>
<p>
Print some debugging information when the program exits.
</p>
<p>
This option is available only if MySQL was built using
<a class="link" href="source-configuration-options.html#option_cmake_with_debug">
<code class="option">
WITH_DEBUG
</code>
</a>
. MySQL release
binaries provided by Oracle are
<span class="emphasis">
<em>
not
</em>
</span>
built using this option.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlshow_debug-info">
</a>
<a class="link" href="mysqlshow.html#option_mysqlshow_debug-info">
<code class="option">
--debug-info
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for debug-info">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--debug-info
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
FALSE
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045310519376">
</a>
<a class="indexterm" name="idm46045310517888">
</a>
<p>
Print debugging information and memory and CPU usage
statistics when the program exits.
</p>
<p>
This option is available only if MySQL was built using
<a class="link" href="source-configuration-options.html#option_cmake_with_debug">
<code class="option">
WITH_DEBUG
</code>
</a>
. MySQL release
binaries provided by Oracle are
<span class="emphasis">
<em>
not
</em>
</span>
built using this option.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlshow_default-character-set">
</a>
<a class="link" href="mysqlshow.html#option_mysqlshow_default-character-set">
<code class="option">
--default-character-set=
<em class="replaceable">
<code>
charset_name
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for default-character-set">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--default-character-set=charset_name
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045310503856">
</a>
<a class="indexterm" name="idm46045310502352">
</a>
<p>
Use
<em class="replaceable">
<code>
charset_name
</code>
</em>
as the default
character set. See
<a class="xref" href="charset-configuration.html" title="12.15 Character Set Configuration">
Section 12.15, “Character Set Configuration”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlshow_default-auth">
</a>
<a class="link" href="mysqlshow.html#option_mysqlshow_default-auth">
<code class="option">
--default-auth=
<em class="replaceable">
<code>
plugin
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for default-auth">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--default-auth=plugin
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045310489232">
</a>
<a class="indexterm" name="idm46045310487744">
</a>
<p>
A hint about which client-side authentication plugin to use.
See
<a class="xref" href="pluggable-authentication.html" title="8.2.17 Pluggable Authentication">
Section 8.2.17, “Pluggable Authentication”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlshow_defaults-extra-file">
</a>
<a class="link" href="mysqlshow.html#option_mysqlshow_defaults-extra-file">
<code class="option">
--defaults-extra-file=
<em class="replaceable">
<code>
file_name
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for defaults-extra-file">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--defaults-extra-file=file_name
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
File name
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045310474992">
</a>
<a class="indexterm" name="idm46045310473488">
</a>
<p>
Read this option file after the global option file but (on
Unix) before the user option file. If the file does not
exist or is otherwise inaccessible, an error occurs. If
<em class="replaceable">
<code>
file_name
</code>
</em>
is not an absolute path
name, it is interpreted relative to the current directory.
</p>
<p>
For additional information about this and other option-file
options, see
<a class="xref" href="option-file-options.html" title="6.2.2.3 Command-Line Options that Affect Option-File Handling">
Section 6.2.2.3, “Command-Line Options that Affect Option-File Handling”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlshow_defaults-file">
</a>
<a class="link" href="mysqlshow.html#option_mysqlshow_defaults-file">
<code class="option">
--defaults-file=
<em class="replaceable">
<code>
file_name
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for defaults-file">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--defaults-file=file_name
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
File name
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045310459584">
</a>
<a class="indexterm" name="idm46045310458096">
</a>
<p>
Use only the given option file. If the file does not exist
or is otherwise inaccessible, an error occurs. If
<em class="replaceable">
<code>
file_name
</code>
</em>
is not an absolute path
name, it is interpreted relative to the current directory.
</p>
<p>
Exception: Even with
<a class="link" href="option-file-options.html#option_general_defaults-file">
<code class="option">
--defaults-file
</code>
</a>
, client
programs read
<code class="filename">
.mylogin.cnf
</code>
.
</p>
<p>
For additional information about this and other option-file
options, see
<a class="xref" href="option-file-options.html" title="6.2.2.3 Command-Line Options that Affect Option-File Handling">
Section 6.2.2.3, “Command-Line Options that Affect Option-File Handling”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlshow_defaults-group-suffix">
</a>
<a class="link" href="mysqlshow.html#option_mysqlshow_defaults-group-suffix">
<code class="option">
--defaults-group-suffix=
<em class="replaceable">
<code>
str
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for defaults-group-suffix">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--defaults-group-suffix=str
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045310442128">
</a>
<a class="indexterm" name="idm46045310440624">
</a>
<p>
Read not only the usual option groups, but also groups with
the usual names and a suffix of
<em class="replaceable">
<code>
str
</code>
</em>
. For example,
<a class="link" href="mysqlshow.html" title="6.5.6 mysqlshow — Display Database, Table, and Column Information">
<span class="command">
<strong>
mysqlshow
</strong>
</span>
</a>
normally reads the
<code class="literal">
[client]
</code>
and
<code class="literal">
[mysqlshow]
</code>
groups. If this option is
given as
<a class="link" href="mysqlshow.html#option_mysqlshow_defaults-group-suffix">
<code class="option">
--defaults-group-suffix=_other
</code>
</a>
,
<a class="link" href="mysqlshow.html" title="6.5.6 mysqlshow — Display Database, Table, and Column Information">
<span class="command">
<strong>
mysqlshow
</strong>
</span>
</a>
also reads the
<code class="literal">
[client_other]
</code>
and
<code class="literal">
[mysqlshow_other]
</code>
groups.
</p>
<p>
For additional information about this and other option-file
options, see
<a class="xref" href="option-file-options.html" title="6.2.2.3 Command-Line Options that Affect Option-File Handling">
Section 6.2.2.3, “Command-Line Options that Affect Option-File Handling”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlshow_enable-cleartext-plugin">
</a>
<a class="link" href="mysqlshow.html#option_mysqlshow_enable-cleartext-plugin">
<code class="option">
--enable-cleartext-plugin
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for enable-cleartext-plugin">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--enable-cleartext-plugin
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
FALSE
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045310418192">
</a>
<a class="indexterm" name="idm46045310416688">
</a>
<p>
Enable the
<code class="literal">
mysql_clear_password
</code>
cleartext
authentication plugin. (See
<a class="xref" href="cleartext-pluggable-authentication.html" title="8.4.1.4 Client-Side Cleartext Pluggable Authentication">
Section 8.4.1.4, “Client-Side Cleartext Pluggable Authentication”
</a>
.)
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlshow_get-server-public-key">
</a>
<a class="link" href="mysqlshow.html#option_mysqlshow_get-server-public-key">
<code class="option">
--get-server-public-key
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for get-server-public-key">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--get-server-public-key
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045310403584">
</a>
<a class="indexterm" name="idm46045310402080">
</a>
<p>
Request from the server the RSA public key that it uses for
key pair-based password exchange. This option applies to
clients that connect to the server using an account that
authenticates with the
<code class="literal">
caching_sha2_password
</code>
authentication
plugin. For connections by such accounts, the server does
not send the public key to the client unless requested. The
option is ignored for accounts that do not authenticate with
that plugin. It is also ignored if RSA-based password
exchange is not needed, as is the case when the client
connects to the server using a secure connection.
</p>
<p>
If
<a class="link" href="mysqlshow.html#option_mysqlshow_server-public-key-path">
<code class="option">
--server-public-key-path=
<em class="replaceable">
<code>
file_name
</code>
</em>
</code>
</a>
is given and specifies a valid public key file, it takes
precedence over
<a class="link" href="mysqlshow.html#option_mysqlshow_get-server-public-key">
<code class="option">
--get-server-public-key
</code>
</a>
.
</p>
<p>
For information about the
<code class="literal">
caching_sha2_password
</code>
plugin, see
<a class="xref" href="caching-sha2-pluggable-authentication.html" title="8.4.1.2 Caching SHA-2 Pluggable Authentication">
Section 8.4.1.2, “Caching SHA-2 Pluggable Authentication”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlshow_host">
</a>
<a class="link" href="mysqlshow.html#option_mysqlshow_host">
<code class="option">
--host=
<em class="replaceable">
<code>
host_name
</code>
</em>
</code>
</a>
,
<code class="option">
-h
<em class="replaceable">
<code>
host_name
</code>
</em>
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for host">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--host=host_name
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
localhost
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045310380960">
</a>
<a class="indexterm" name="idm46045310379472">
</a>
<p>
Connect to the MySQL server on the given host.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlshow_keys">
</a>
<a class="link" href="mysqlshow.html#option_mysqlshow_keys">
<code class="option">
--keys
</code>
</a>
,
<code class="option">
-k
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for keys">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--keys
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045310369424">
</a>
<a class="indexterm" name="idm46045310367936">
</a>
<p>
Show table indexes.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlshow_login-path">
</a>
<a class="link" href="mysqlshow.html#option_mysqlshow_login-path">
<code class="option">
--login-path=
<em class="replaceable">
<code>
name
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for login-path">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--login-path=name
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045310355952">
</a>
<a class="indexterm" name="idm46045310354464">
</a>
<p>
Read options from the named login path in the
<code class="filename">
.mylogin.cnf
</code>
login path file. A
<span class="quote">
“
<span class="quote">
login path
</span>
”
</span>
is an option group containing
options that specify which MySQL server to connect to and
which account to authenticate as. To create or modify a
login path file, use the
<a class="link" href="mysql-config-editor.html" title="6.6.7 mysql_config_editor — MySQL Configuration Utility">
<span class="command">
<strong>
mysql_config_editor
</strong>
</span>
</a>
utility. See
<a class="xref" href="mysql-config-editor.html" title="6.6.7 mysql_config_editor — MySQL Configuration Utility">
Section 6.6.7, “mysql_config_editor — MySQL Configuration Utility”
</a>
.
</p>
<p>
For additional information about this and other option-file
options, see
<a class="xref" href="option-file-options.html" title="6.2.2.3 Command-Line Options that Affect Option-File Handling">
Section 6.2.2.3, “Command-Line Options that Affect Option-File Handling”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlshow_no-login-paths">
</a>
<a class="link" href="mysqlshow.html#option_mysqlshow_no-login-paths">
<code class="option">
--no-login-paths
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for no-login-paths">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--no-login-paths
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045310340320">
</a>
<a class="indexterm" name="idm46045310338832">
</a>
<p>
Skips reading options from the login path file.
</p>
<p>
See
<a class="link" href="mysqlshow.html#option_mysqlshow_login-path">
<code class="option">
--login-path
</code>
</a>
for
related information.
</p>
<p>
For additional information about this and other option-file
options, see
<a class="xref" href="option-file-options.html" title="6.2.2.3 Command-Line Options that Affect Option-File Handling">
Section 6.2.2.3, “Command-Line Options that Affect Option-File Handling”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlshow_no-defaults">
</a>
<a class="link" href="mysqlshow.html#option_mysqlshow_no-defaults">
<code class="option">
--no-defaults
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for no-defaults">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--no-defaults
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045310326560">
</a>
<a class="indexterm" name="idm46045310325072">
</a>
<p>
Do not read any option files. If program startup fails due
to reading unknown options from an option file,
<a class="link" href="mysqlshow.html#option_mysqlshow_no-defaults">
<code class="option">
--no-defaults
</code>
</a>
can be used
to prevent them from being read.
</p>
<p>
The exception is that the
<code class="filename">
.mylogin.cnf
</code>
file is read in all cases, if it exists. This permits
passwords to be specified in a safer way than on the command
line even when
<a class="link" href="mysqlshow.html#option_mysqlshow_no-defaults">
<code class="option">
--no-defaults
</code>
</a>
is used. To
create
<code class="filename">
.mylogin.cnf
</code>
, use the
<a class="link" href="mysql-config-editor.html" title="6.6.7 mysql_config_editor — MySQL Configuration Utility">
<span class="command">
<strong>
mysql_config_editor
</strong>
</span>
</a>
utility. See
<a class="xref" href="mysql-config-editor.html" title="6.6.7 mysql_config_editor — MySQL Configuration Utility">
Section 6.6.7, “mysql_config_editor — MySQL Configuration Utility”
</a>
.
</p>
<p>
For additional information about this and other option-file
options, see
<a class="xref" href="option-file-options.html" title="6.2.2.3 Command-Line Options that Affect Option-File Handling">
Section 6.2.2.3, “Command-Line Options that Affect Option-File Handling”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlshow_password">
</a>
<a class="link" href="mysqlshow.html#option_mysqlshow_password">
<code class="option">
--password[=
<em class="replaceable">
<code>
password
</code>
</em>
]
</code>
</a>
,
<code class="option">
-p[
<em class="replaceable">
<code>
password
</code>
</em>
]
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for password">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--password[=password]
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045310304832">
</a>
<a class="indexterm" name="idm46045310303344">
</a>
<p>
The password of the MySQL account used for connecting to the
server. The password value is optional. If not given,
<a class="link" href="mysqlshow.html" title="6.5.6 mysqlshow — Display Database, Table, and Column Information">
<span class="command">
<strong>
mysqlshow
</strong>
</span>
</a>
prompts for one. If given,
there must be
<span class="emphasis">
<em>
no space
</em>
</span>
between
<a class="link" href="mysqlshow.html#option_mysqlshow_password">
<code class="option">
--password=
</code>
</a>
or
<code class="option">
-p
</code>
and the password following it. If no
password option is specified, the default is to send no
password.
</p>
<p>
Specifying a password on the command line should be
considered insecure. To avoid giving the password on the
command line, use an option file. See
<a class="xref" href="password-security-user.html" title="8.1.2.1 End-User Guidelines for Password Security">
Section 8.1.2.1, “End-User Guidelines for Password Security”
</a>
.
</p>
<p>
To explicitly specify that there is no password and that
<a class="link" href="mysqlshow.html" title="6.5.6 mysqlshow — Display Database, Table, and Column Information">
<span class="command">
<strong>
mysqlshow
</strong>
</span>
</a>
should not prompt for one, use
the
<a class="link" href="mysqlshow.html#option_mysqlshow_password">
<code class="option">
--skip-password
</code>
</a>
option.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlshow_password1">
</a>
<a class="link" href="mysqlshow.html#option_mysqlshow_password1">
<code class="option">
--password1[=
<em class="replaceable">
<code>
pass_val
</code>
</em>
]
</code>
</a>
</p>
<a class="indexterm" name="idm46045310291408">
</a>
<p>
The password for multifactor authentication factor 1 of the
MySQL account used for connecting to the server. The
password value is optional. If not given,
<a class="link" href="mysqlshow.html" title="6.5.6 mysqlshow — Display Database, Table, and Column Information">
<span class="command">
<strong>
mysqlshow
</strong>
</span>
</a>
prompts for one. If given,
there must be
<span class="emphasis">
<em>
no space
</em>
</span>
between
<a class="link" href="mysqlshow.html#option_mysqlshow_password1">
<code class="option">
--password1=
</code>
</a>
and the
password following it. If no password option is specified,
the default is to send no password.
</p>
<p>
Specifying a password on the command line should be
considered insecure. To avoid giving the password on the
command line, use an option file. See
<a class="xref" href="password-security-user.html" title="8.1.2.1 End-User Guidelines for Password Security">
Section 8.1.2.1, “End-User Guidelines for Password Security”
</a>
.
</p>
<p>
To explicitly specify that there is no password and that
<a class="link" href="mysqlshow.html" title="6.5.6 mysqlshow — Display Database, Table, and Column Information">
<span class="command">
<strong>
mysqlshow
</strong>
</span>
</a>
should not prompt for one, use
the
<a class="link" href="mysqlshow.html#option_mysqlshow_password1">
<code class="option">
--skip-password1
</code>
</a>
option.
</p>
<p>
<a class="link" href="mysqlshow.html#option_mysqlshow_password1">
<code class="option">
--password1
</code>
</a>
and
<a class="link" href="mysqlshow.html#option_mysqlshow_password">
<code class="option">
--password
</code>
</a>
are synonymous,
as are
<a class="link" href="mysqlshow.html#option_mysqlshow_password1">
<code class="option">
--skip-password1
</code>
</a>
and
<a class="link" href="mysqlshow.html#option_mysqlshow_password">
<code class="option">
--skip-password
</code>
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlshow_password2">
</a>
<a class="link" href="mysqlshow.html#option_mysqlshow_password2">
<code class="option">
--password2[=
<em class="replaceable">
<code>
pass_val
</code>
</em>
]
</code>
</a>
</p>
<a class="indexterm" name="idm46045310275856">
</a>
<p>
The password for multifactor authentication factor 2 of the
MySQL account used for connecting to the server. The
semantics of this option are similar to the semantics for
<a class="link" href="mysqlshow.html#option_mysqlshow_password1">
<code class="option">
--password1
</code>
</a>
; see the
description of that option for details.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlshow_password3">
</a>
<a class="link" href="mysqlshow.html#option_mysqlshow_password3">
<code class="option">
--password3[=
<em class="replaceable">
<code>
pass_val
</code>
</em>
]
</code>
</a>
</p>
<a class="indexterm" name="idm46045310270496">
</a>
<p>
The password for multifactor authentication factor 3 of the
MySQL account used for connecting to the server. The
semantics of this option are similar to the semantics for
<a class="link" href="mysqlshow.html#option_mysqlshow_password1">
<code class="option">
--password1
</code>
</a>
; see the
description of that option for details.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlshow_pipe">
</a>
<a class="link" href="mysqlshow.html#option_mysqlshow_pipe">
<code class="option">
--pipe
</code>
</a>
,
<code class="option">
-W
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for pipe">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--pipe
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045310257696">
</a>
<a class="indexterm" name="idm46045310256208">
</a>
<p>
On Windows, connect to the server using a named pipe. This
option applies only if the server was started with the
<a class="link" href="server-system-variables.html#sysvar_named_pipe">
<code class="literal">
named_pipe
</code>
</a>
system variable
enabled to support named-pipe connections. In addition, the
user making the connection must be a member of the Windows
group specified by the
<a class="link" href="server-system-variables.html#sysvar_named_pipe_full_access_group">
<code class="literal">
named_pipe_full_access_group
</code>
</a>
system variable.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlshow_plugin-dir">
</a>
<a class="link" href="mysqlshow.html#option_mysqlshow_plugin-dir">
<code class="option">
--plugin-dir=
<em class="replaceable">
<code>
dir_name
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for plugin-dir">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--plugin-dir=dir_name
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Directory name
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045310241392">
</a>
<a class="indexterm" name="idm46045310239904">
</a>
<p>
The directory in which to look for plugins. Specify this
option if the
<a class="link" href="mysqlshow.html#option_mysqlshow_default-auth">
<code class="option">
--default-auth
</code>
</a>
option is
used to specify an authentication plugin but
<a class="link" href="mysqlshow.html" title="6.5.6 mysqlshow — Display Database, Table, and Column Information">
<span class="command">
<strong>
mysqlshow
</strong>
</span>
</a>
does not find it. See
<a class="xref" href="pluggable-authentication.html" title="8.2.17 Pluggable Authentication">
Section 8.2.17, “Pluggable Authentication”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlshow_port">
</a>
<a class="link" href="mysqlshow.html#option_mysqlshow_port">
<code class="option">
--port=
<em class="replaceable">
<code>
port_num
</code>
</em>
</code>
</a>
,
<code class="option">
-P
<em class="replaceable">
<code>
port_num
</code>
</em>
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for port">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--port=port_num
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Numeric
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
3306
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045310221776">
</a>
<a class="indexterm" name="idm46045310220288">
</a>
<p>
For TCP/IP connections, the port number to use.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlshow_print-defaults">
</a>
<a class="link" href="mysqlshow.html#option_mysqlshow_print-defaults">
<code class="option">
--print-defaults
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for print-defaults">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--print-defaults
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045310210624">
</a>
<a class="indexterm" name="idm46045310209136">
</a>
<p>
Print the program name and all options that it gets from
option files.
</p>
<p>
For additional information about this and other option-file
options, see
<a class="xref" href="option-file-options.html" title="6.2.2.3 Command-Line Options that Affect Option-File Handling">
Section 6.2.2.3, “Command-Line Options that Affect Option-File Handling”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlshow_protocol">
</a>
<a class="link" href="mysqlshow.html#option_mysqlshow_protocol">
<code class="option">
--protocol={TCP|SOCKET|PIPE|MEMORY}
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for protocol">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--protocol=type
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
[see text]
</code>
</td>
</tr>
<tr>
<th>
Valid Values
</th>
<td>
<p class="valid-value">
<code class="literal">
TCP
</code>
</p>
<p class="valid-value">
<code class="literal">
SOCKET
</code>
</p>
<p class="valid-value">
<code class="literal">
PIPE
</code>
</p>
<p class="valid-value">
<code class="literal">
MEMORY
</code>
</p>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045310188064">
</a>
<a class="indexterm" name="idm46045310186576">
</a>
<p>
The transport protocol to use for connecting to the server.
It is useful when the other connection parameters normally
result in use of a protocol other than the one you want. For
details on the permissible values, see
<a class="xref" href="transport-protocols.html" title="6.2.7 Connection Transport Protocols">
Section 6.2.7, “Connection Transport Protocols”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlshow_server-public-key-path">
</a>
<a class="link" href="mysqlshow.html#option_mysqlshow_server-public-key-path">
<code class="option">
--server-public-key-path=
<em class="replaceable">
<code>
file_name
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for server-public-key-path">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--server-public-key-path=file_name
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
File name
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045310173648">
</a>
<a class="indexterm" name="idm46045310172144">
</a>
<p>
The path name to a file in PEM format containing a
client-side copy of the public key required by the server
for RSA key pair-based password exchange. This option
applies to clients that authenticate with the
<code class="literal">
sha256_password
</code>
(deprecated) or
<code class="literal">
caching_sha2_password
</code>
authentication
plugin. This option is ignored for accounts that do not
authenticate with one of those plugins. It is also ignored
if RSA-based password exchange is not used, as is the case
when the client connects to the server using a secure
connection.
</p>
<p>
If
<a class="link" href="mysqlshow.html#option_mysqlshow_server-public-key-path">
<code class="option">
--server-public-key-path=
<em class="replaceable">
<code>
file_name
</code>
</em>
</code>
</a>
is given and specifies a valid public key file, it takes
precedence over
<a class="link" href="mysqlshow.html#option_mysqlshow_get-server-public-key">
<code class="option">
--get-server-public-key
</code>
</a>
.
</p>
<p>
For
<code class="literal">
sha256_password
</code>
(deprecated), this
option applies only if MySQL was built using OpenSSL.
</p>
<p>
For information about the
<code class="literal">
sha256_password
</code>
and
<code class="literal">
caching_sha2_password
</code>
plugins, see
<a class="xref" href="sha256-pluggable-authentication.html" title="8.4.1.3 SHA-256 Pluggable Authentication">
Section 8.4.1.3, “SHA-256 Pluggable Authentication”
</a>
, and
<a class="xref" href="caching-sha2-pluggable-authentication.html" title="8.4.1.2 Caching SHA-2 Pluggable Authentication">
Section 8.4.1.2, “Caching SHA-2 Pluggable Authentication”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlshow_shared-memory-base-name">
</a>
<a class="link" href="mysqlshow.html#option_mysqlshow_shared-memory-base-name">
<code class="option">
--shared-memory-base-name=
<em class="replaceable">
<code>
name
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for shared-memory-base-name">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--shared-memory-base-name=name
</code>
</td>
</tr>
<tr>
<th>
Platform Specific
</th>
<td>
Windows
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045310150672">
</a>
<a class="indexterm" name="idm46045310149168">
</a>
<p>
On Windows, the shared-memory name to use for connections
made using shared memory to a local server. The default
value is
<code class="literal">
MYSQL
</code>
. The shared-memory name is
case-sensitive.
</p>
<p>
This option applies only if the server was started with the
<a class="link" href="server-system-variables.html#sysvar_shared_memory">
<code class="literal">
shared_memory
</code>
</a>
system
variable enabled to support shared-memory connections.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlshow_show-table-type">
</a>
<a class="link" href="mysqlshow.html#option_mysqlshow_show-table-type">
<code class="option">
--show-table-type
</code>
</a>
,
<code class="option">
-t
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for show-table-type">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--show-table-type
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045310136496">
</a>
<a class="indexterm" name="idm46045310135008">
</a>
<p>
Show a column indicating the table type, as in
<a class="link" href="show-tables.html" title="15.7.7.39 SHOW TABLES Statement">
<code class="literal">
SHOW FULL
TABLES
</code>
</a>
. The type is
<code class="literal">
BASE TABLE
</code>
or
<code class="literal">
VIEW
</code>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlshow_socket">
</a>
<a class="link" href="mysqlshow.html#option_mysqlshow_socket">
<code class="option">
--socket=
<em class="replaceable">
<code>
path
</code>
</em>
</code>
</a>
,
<code class="option">
-S
<em class="replaceable">
<code>
path
</code>
</em>
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for socket">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--socket={file_name|pipe_name}
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045310119664">
</a>
<a class="indexterm" name="idm46045310118176">
</a>
<p>
For connections to
<code class="literal">
localhost
</code>
, the Unix
socket file to use, or, on Windows, the name of the named
pipe to use.
</p>
<p>
On Windows, this option applies only if the server was
started with the
<a class="link" href="server-system-variables.html#sysvar_named_pipe">
<code class="literal">
named_pipe
</code>
</a>
system variable enabled to support named-pipe connections.
In addition, the user making the connection must be a member
of the Windows group specified by the
<a class="link" href="server-system-variables.html#sysvar_named_pipe_full_access_group">
<code class="literal">
named_pipe_full_access_group
</code>
</a>
system variable.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlshow_ssl">
</a>
<code class="option">
--ssl*
</code>
</p>
<a class="indexterm" name="idm46045310110592">
</a>
<a class="indexterm" name="idm46045310109104">
</a>
<p>
Options that begin with
<code class="option">
--ssl
</code>
specify
whether to connect to the server using encryption and
indicate where to find SSL keys and certificates. See
<a class="xref" href="connection-options.html#encrypted-connection-options" title="Command Options for Encrypted Connections">
Command Options for Encrypted Connections
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlshow_ssl-fips-mode">
</a>
<a class="link" href="mysqlshow.html#option_mysqlshow_ssl-fips-mode">
<code class="option">
--ssl-fips-mode={OFF|ON|STRICT}
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for ssl-fips-mode">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--ssl-fips-mode={OFF|ON|STRICT}
</code>
</td>
</tr>
<tr>
<th>
Deprecated
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Enumeration
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
OFF
</code>
</td>
</tr>
<tr>
<th>
Valid Values
</th>
<td>
<p class="valid-value">
<code class="literal">
OFF
</code>
</p>
<p class="valid-value">
<code class="literal">
ON
</code>
</p>
<p class="valid-value">
<code class="literal">
STRICT
</code>
</p>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045310086960">
</a>
<a class="indexterm" name="idm46045310085472">
</a>
<p>
Controls whether to enable FIPS mode on the client side. The
<a class="link" href="mysqlshow.html#option_mysqlshow_ssl-fips-mode">
<code class="option">
--ssl-fips-mode
</code>
</a>
option
differs from other
<code class="option">
--ssl-
<em class="replaceable">
<code>
xxx
</code>
</em>
</code>
options in that it is not used to establish encrypted
connections, but rather to affect which cryptographic
operations to permit. See
<a class="xref" href="fips-mode.html" title="8.8 FIPS Support">
Section 8.8, “FIPS Support”
</a>
.
</p>
<p>
These
<a class="link" href="mysqlshow.html#option_mysqlshow_ssl-fips-mode">
<code class="option">
--ssl-fips-mode
</code>
</a>
values are permitted:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
<code class="literal">
OFF
</code>
: Disable FIPS mode.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
ON
</code>
: Enable FIPS mode.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
STRICT
</code>
: Enable
<span class="quote">
“
<span class="quote">
strict
</span>
”
</span>
FIPS mode.
</p>
</li>
</ul>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
If the OpenSSL FIPS Object Module is not available, the
only permitted value for
<a class="link" href="mysqlshow.html#option_mysqlshow_ssl-fips-mode">
<code class="option">
--ssl-fips-mode
</code>
</a>
is
<code class="literal">
OFF
</code>
. In this case, setting
<a class="link" href="mysqlshow.html#option_mysqlshow_ssl-fips-mode">
<code class="option">
--ssl-fips-mode
</code>
</a>
to
<code class="literal">
ON
</code>
or
<code class="literal">
STRICT
</code>
causes
the client to produce a warning at startup and to operate
in non-FIPS mode.
</p>
</div>
<p>
This option is deprecated. Expect it to be removed in a
future version of MySQL.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlshow_status">
</a>
<a class="link" href="mysqlshow.html#option_mysqlshow_status">
<code class="option">
--status
</code>
</a>
,
<code class="option">
-i
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for status">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--status
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045310060528">
</a>
<a class="indexterm" name="idm46045310059040">
</a>
<p>
Display extra information about each table.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlshow_tls-ciphersuites">
</a>
<a class="link" href="mysqlshow.html#option_mysqlshow_tls-ciphersuites">
<code class="option">
--tls-ciphersuites=
<em class="replaceable">
<code>
ciphersuite_list
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for tls-ciphersuites">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--tls-ciphersuites=ciphersuite_list
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045310047024">
</a>
<a class="indexterm" name="idm46045310045536">
</a>
<p>
The permissible ciphersuites for encrypted connections that
use TLSv1.3. The value is a list of one or more
colon-separated ciphersuite names. The ciphersuites that can
be named for this option depend on the SSL library used to
compile MySQL. For details, see
<a class="xref" href="encrypted-connection-protocols-ciphers.html" title="8.3.2 Encrypted Connection TLS Protocols and Ciphers">
Section 8.3.2, “Encrypted Connection TLS Protocols and Ciphers”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlshow_tls-sni-servername">
</a>
<a class="link" href="mysqlshow.html#option_mysqlshow_tls-sni-servername">
<code class="option">
--tls-sni-servername=
<em class="replaceable">
<code>
server_name
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for tls-sni-servername">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--tls-sni-servername=server_name
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045310032544">
</a>
<a class="indexterm" name="idm46045310031040">
</a>
<p>
When specified, the name is passed to the
<code class="literal">
libmysqlclient
</code>
C API library using the
<code class="literal">
MYSQL_OPT_TLS_SNI_SERVERNAME
</code>
option of
<a class="ulink" href="/doc/c-api/8.4/en/mysql-options.html" target="_top">
<code class="literal">
mysql_options()
</code>
</a>
. The server
name is not case-sensitive. To show which server name the
client specified for the current session, if any, check the
<a class="link" href="server-status-variables.html#statvar_Tls_sni_server_name">
<code class="literal">
Tls_sni_server_name
</code>
</a>
status
variable.
</p>
<p>
Server Name Indication (SNI) is an extension to the TLS
protocol (OpenSSL must be compiled using TLS extensions for
this option to function). The MySQL implementation of SNI
represents the client-side only.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlshow_tls-version">
</a>
<a class="link" href="mysqlshow.html#option_mysqlshow_tls-version">
<code class="option">
--tls-version=
<em class="replaceable">
<code>
protocol_list
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for tls-version">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--tls-version=protocol_list
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<p class="valid-value">
<code class="literal">
TLSv1,TLSv1.1,TLSv1.2,TLSv1.3
</code>
(OpenSSL 1.1.1 or higher)
</p>
<p class="valid-value">
<code class="literal">
TLSv1,TLSv1.1,TLSv1.2
</code>
(otherwise)
</p>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045310010096">
</a>
<a class="indexterm" name="idm46045310008608">
</a>
<p>
The permissible TLS protocols for encrypted connections. The
value is a list of one or more comma-separated protocol
names. The protocols that can be named for this option
depend on the SSL library used to compile MySQL. For
details, see
<a class="xref" href="encrypted-connection-protocols-ciphers.html" title="8.3.2 Encrypted Connection TLS Protocols and Ciphers">
Section 8.3.2, “Encrypted Connection TLS Protocols and Ciphers”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlshow_user">
</a>
<a class="link" href="mysqlshow.html#option_mysqlshow_user">
<code class="option">
--user=
<em class="replaceable">
<code>
user_name
</code>
</em>
</code>
</a>
,
<code class="option">
-u
<em class="replaceable">
<code>
user_name
</code>
</em>
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for user">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--user=user_name,
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045309995040">
</a>
<a class="indexterm" name="idm46045309993552">
</a>
<p>
The user name of the MySQL account to use for connecting to
the server.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlshow_verbose">
</a>
<a class="link" href="mysqlshow.html#option_mysqlshow_verbose">
<code class="option">
--verbose
</code>
</a>
,
<code class="option">
-v
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for verbose">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--verbose
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045309983392">
</a>
<a class="indexterm" name="idm46045309981904">
</a>
<p>
Verbose mode. Print more information about what the program
does. This option can be used multiple times to increase the
amount of information.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlshow_version">
</a>
<a class="link" href="mysqlshow.html#option_mysqlshow_version">
<code class="option">
--version
</code>
</a>
,
<code class="option">
-V
</code>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for version">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--version
</code>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045309971712">
</a>
<a class="indexterm" name="idm46045309970224">
</a>
<p>
Display version information and exit.
</p>
</li>
<li class="listitem">
<p>
<a name="option_mysqlshow_zstd-compression-level">
</a>
<a class="link" href="mysqlshow.html#option_mysqlshow_zstd-compression-level">
<code class="option">
--zstd-compression-level=
<em class="replaceable">
<code>
level
</code>
</em>
</code>
</a>
</p>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for zstd-compression-level">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--zstd-compression-level=#
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm46045309958304">
</a>
<a class="indexterm" name="idm46045309956800">
</a>
<p>
The compression level to use for connections to the server
that use the
<code class="literal">
zstd
</code>
compression algorithm.
The permitted levels are from 1 to 22, with larger values
indicating increasing levels of compression. The default
<code class="literal">
zstd
</code>
compression level is 3. The
compression level setting has no effect on connections that
do not use
<code class="literal">
zstd
</code>
compression.
</p>
<p>
For more information, see
<a class="xref" href="connection-compression-control.html" title="6.2.8 Connection Compression Control">
Section 6.2.8, “Connection Compression Control”
</a>
.
</p>
</li>
</ul>
</div>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/audit-log-reference.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title">
<a name="audit-log-reference">
</a>
8.4.5.11 Audit Log Reference
</h4>
</div>
</div>
</div>
<p>
The following sections provide a reference to MySQL Enterprise Audit
elements:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<a class="xref" href="audit-log-reference.html#audit-log-tables" title="Audit Log Tables">
Audit Log Tables
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="xref" href="audit-log-reference.html#audit-log-routines" title="Audit Log Functions">
Audit Log Functions
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="xref" href="audit-log-reference.html#audit-log-option-variable-reference" title="Audit Log Option and Variable Reference">
Audit Log Option and Variable Reference
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="xref" href="audit-log-reference.html#audit-log-options-variables" title="Audit Log Options and Variables">
Audit Log Options and Variables
</a>
</p>
</li>
<li class="listitem">
<p>
<a class="xref" href="audit-log-reference.html#audit-log-status-variables" title="Audit Log Status Variables">
Audit Log Status Variables
</a>
</p>
</li>
</ul>
</div>
<p>
To install the audit log tables and functions, use the
instructions provided in
<a class="xref" href="audit-log-installation.html" title="8.4.5.2 Installing or Uninstalling MySQL Enterprise Audit">
Section 8.4.5.2, “Installing or Uninstalling MySQL Enterprise Audit”
</a>
. Unless those objects
are installed, the
<code class="literal">
audit_log
</code>
plugin operates
in (deprecated) legacy mode. See
<a class="xref" href="audit-log-legacy-filtering.html" title="8.4.5.10 Legacy Mode Audit Log Filtering">
Section 8.4.5.10, “Legacy Mode Audit Log Filtering”
</a>
.
</p>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h5 class="title">
<a name="audit-log-tables">
</a>
Audit Log Tables
</h5>
</div>
</div>
</div>
<p>
MySQL Enterprise Audit uses tables in the
<code class="literal">
mysql
</code>
system
database for persistent storage of filter and user account
data. The tables can be accessed only by users who have
privileges for that database. To use a different database, set
the
<a class="link" href="audit-log-reference.html#sysvar_audit_log_database">
<code class="literal">
audit_log_database
</code>
</a>
system
variable at server startup. The tables use the
<code class="literal">
InnoDB
</code>
storage engine.
</p>
<p>
If these tables are missing, the
<code class="literal">
audit_log
</code>
plugin operates in (deprecated) legacy mode. See
<a class="xref" href="audit-log-legacy-filtering.html" title="8.4.5.10 Legacy Mode Audit Log Filtering">
Section 8.4.5.10, “Legacy Mode Audit Log Filtering”
</a>
.
</p>
<p>
The
<code class="literal">
audit_log_filter
</code>
table stores filter
definitions. The table has these columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<code class="literal">
NAME
</code>
</p>
<p>
The filter name.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
FILTER
</code>
</p>
<p>
The filter definition associated with the filter name.
Definitions are stored as
<a class="link" href="json.html" title="13.5 The JSON Data Type">
<code class="literal">
JSON
</code>
</a>
values.
</p>
</li>
</ul>
</div>
<p>
The
<code class="literal">
audit_log_user
</code>
table stores user
account information. The table has these columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<code class="literal">
USER
</code>
</p>
<p>
The user name part of an account. For an account
<code class="literal">
user1@localhost
</code>
, the
<code class="literal">
USER
</code>
part is
<code class="literal">
user1
</code>
.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
HOST
</code>
</p>
<p>
The host name part of an account. For an account
<code class="literal">
user1@localhost
</code>
, the
<code class="literal">
HOST
</code>
part is
<code class="literal">
localhost
</code>
.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
FILTERNAME
</code>
</p>
<p>
The name of the filter assigned to the account. The filter
name associates the account with a filter defined in the
<code class="literal">
audit_log_filter
</code>
table.
</p>
</li>
</ul>
</div>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h5 class="title">
<a name="audit-log-routines">
</a>
Audit Log Functions
</h5>
</div>
</div>
</div>
<p>
This section describes, for each audit log function, its
purpose, calling sequence, and return value. For information
about the conditions under which these functions can be
invoked, see
<a class="xref" href="audit-log-filtering.html" title="8.4.5.7 Audit Log Filtering">
Section 8.4.5.7, “Audit Log Filtering”
</a>
.
</p>
<p>
Each audit log function returns a string that indicates
whether the operation succeeded.
<code class="literal">
OK
</code>
indicates success.
<code class="literal">
ERROR:
<em class="replaceable">
<code>
message
</code>
</em>
</code>
indicates
failure.
</p>
<p>
Audit log functions convert string arguments to
<code class="literal">
utf8mb4
</code>
and string return values are
<code class="literal">
utf8mb4
</code>
strings. Previously, audit log
functions treated string arguments as binary strings (which
means they did not distinguish lettercase), and string return
values were binary strings.
</p>
<p>
If an audit log function is invoked from within the
<a class="link" href="mysql.html" title="6.5.1 mysql — The MySQL Command-Line Client">
<span class="command">
<strong>
mysql
</strong>
</span>
</a>
client, binary string results display
using hexadecimal notation, depending on the value of the
<a class="link" href="mysql-command-options.html#option_mysql_binary-as-hex">
<code class="option">
--binary-as-hex
</code>
</a>
. For more
information about that option, see
<a class="xref" href="mysql.html" title="6.5.1 mysql — The MySQL Command-Line Client">
Section 6.5.1, “mysql — The MySQL Command-Line Client”
</a>
.
</p>
<p>
These audit log functions are available:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<a name="function_audit-log-encryption-password-get">
</a>
<a class="link" href="audit-log-reference.html#function_audit-log-encryption-password-get">
<code class="literal">
audit_log_encryption_password_get([
<em class="replaceable">
<code>
keyring_id
</code>
</em>
])
</code>
</a>
</p>
<a class="indexterm" name="idm46045236216080">
</a>
<a class="indexterm" name="idm46045236214960">
</a>
<p>
This function fetches an audit log encryption password
from the MySQL keyring, which must be enabled or an error
occurs. Any keyring component or plugin can be used; for
instructions, see
<a class="xref" href="keyring.html" title="8.4.4 The MySQL Keyring">
Section 8.4.4, “The MySQL Keyring”
</a>
.
</p>
<p>
With no argument, the function retrieves the current
encryption password as a binary string. An argument may be
given to specify which audit log encryption password to
retrieve. The argument must be the keyring ID of the
current password or an archived password.
</p>
<p>
For additional information about audit log encryption, see
<a class="xref" href="audit-log-logging-configuration.html#audit-log-file-encryption" title="Encrypting Audit Log Files">
Encrypting Audit Log Files
</a>
.
</p>
<p>
Arguments:
</p>
<p>
<em class="replaceable">
<code>
keyring_id
</code>
</em>
: This optional
argument indicates the keyring ID of the password to
retrieve. The maximum permitted length is 766 bytes. If
omitted, the function retrieves the current password.
</p>
<p>
Return value:
</p>
<p>
The password string for success (up to 766 bytes), or
<code class="literal">
NULL
</code>
and an error for failure.
</p>
<p>
Example:
</p>
<p>
Retrieve the current password:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa20471050"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> audit_log_encryption_password_get<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> audit_log_encryption_password_get() <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> secret <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
<p>
To retrieve a password by ID, you can determine which
audit log keyring IDs exist by querying the Performance
Schema
<a class="link" href="performance-schema-keyring-keys-table.html" title="29.12.18.2 The keyring_keys table">
<code class="literal">
keyring_keys
</code>
</a>
table:
</p>
<a class="indexterm" name="idm46045236202448">
</a>
<a class="indexterm" name="idm46045236200960">
</a>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa30855234"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> KEY_ID <span class="token keyword">FROM</span> performance_schema<span class="token punctuation">.</span>keyring_keys
<span class="token keyword">WHERE</span> KEY_ID <span class="token operator">LIKE</span> <span class="token string">'audit_log%'</span>
<span class="token keyword">ORDER</span> <span class="token keyword">BY</span> KEY_ID<span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> KEY_ID <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> audit_log<span class="token punctuation">-</span>20190415T152248<span class="token punctuation">-</span>1 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> audit_log<span class="token punctuation">-</span>20190415T153507<span class="token punctuation">-</span>1 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> audit_log<span class="token punctuation">-</span>20190416T125122<span class="token punctuation">-</span>1 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> audit_log<span class="token punctuation">-</span>20190416T141608<span class="token punctuation">-</span>1 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> audit_log_encryption_password_get<span class="token punctuation">(</span><span class="token string">'audit_log-20190416T125122-1'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> audit_log_encryption_password_get('audit_log<span class="token punctuation">-</span>20190416T125122<span class="token punctuation">-</span>1') <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> segreto <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
</li>
<li class="listitem">
<p>
<a name="function_audit-log-encryption-password-set">
</a>
<a class="link" href="audit-log-reference.html#function_audit-log-encryption-password-set">
<code class="literal">
audit_log_encryption_password_set(
<em class="replaceable">
<code>
password
</code>
</em>
)
</code>
</a>
</p>
<a class="indexterm" name="idm46045236191856">
</a>
<a class="indexterm" name="idm46045236190736">
</a>
<p>
Sets the current audit log encryption password to the
argument and stores the password in the MySQL keyring. The
password is stored as a
<code class="literal">
utf8mb4
</code>
string.
Previously, the password was stored in binary form.
</p>
<p>
If encryption is enabled, this function performs a log
file rotation operation that renames the current log file,
and begins a new log file encrypted with the password. The
keyring must be enabled or an error occurs. Any keyring
component or plugin can be used; for instructions, see
<a class="xref" href="keyring.html" title="8.4.4 The MySQL Keyring">
Section 8.4.4, “The MySQL Keyring”
</a>
.
</p>
<p>
For additional information about audit log encryption, see
<a class="xref" href="audit-log-logging-configuration.html#audit-log-file-encryption" title="Encrypting Audit Log Files">
Encrypting Audit Log Files
</a>
.
</p>
<p>
Arguments:
</p>
<p>
<em class="replaceable">
<code>
password
</code>
</em>
: The password string.
The maximum permitted length is 766 bytes.
</p>
<p>
Return value:
</p>
<p>
1 for success, 0 for failure.
</p>
<p>
Example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa97443230"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> audit_log_encryption_password_set<span class="token punctuation">(</span><span class="token keyword"><em class="replaceable">password</em></span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> audit_log_encryption_password_set(<em class="replaceable">password</em>) <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> 1 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
</li>
<li class="listitem">
<p>
<a name="function_audit-log-filter-flush">
</a>
<a class="link" href="audit-log-reference.html#function_audit-log-filter-flush">
<code class="literal">
audit_log_filter_flush()
</code>
</a>
</p>
<a class="indexterm" name="idm46045236177376">
</a>
<a class="indexterm" name="idm46045236176272">
</a>
<p>
Calling any of the other filtering functions affects
operational audit log filtering immediately and updates
the audit log tables. If instead you modify the contents
of those tables directly using statements such as
<a class="link" href="insert.html" title="15.2.7 INSERT Statement">
<code class="literal">
INSERT
</code>
</a>
,
<a class="link" href="update.html" title="15.2.17 UPDATE Statement">
<code class="literal">
UPDATE
</code>
</a>
, and
<a class="link" href="delete.html" title="15.2.2 DELETE Statement">
<code class="literal">
DELETE
</code>
</a>
, the changes do not
affect filtering immediately. To flush your changes and
make them operational, call
<a class="link" href="audit-log-reference.html#function_audit-log-filter-flush">
<code class="literal">
audit_log_filter_flush()
</code>
</a>
.
</p>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Warning
</div>
<p>
<a class="link" href="audit-log-reference.html#function_audit-log-filter-flush">
<code class="literal">
audit_log_filter_flush()
</code>
</a>
should be used only after modifying the audit tables
directly, to force reloading all filters. Otherwise,
this function should be avoided. It is, in effect, a
simplified version of unloading and reloading the
<code class="literal">
audit_log
</code>
plugin with
<a class="link" href="uninstall-plugin.html" title="15.7.4.6 UNINSTALL PLUGIN Statement">
<code class="literal">
UNINSTALL PLUGIN
</code>
</a>
plus
<a class="link" href="install-plugin.html" title="15.7.4.4 INSTALL PLUGIN Statement">
<code class="literal">
INSTALL PLUGIN
</code>
</a>
.
</p>
<p>
<a class="link" href="audit-log-reference.html#function_audit-log-filter-flush">
<code class="literal">
audit_log_filter_flush()
</code>
</a>
affects all current sessions and detaches them from
their previous filters. Current sessions are no longer
logged unless they disconnect and reconnect, or execute
a change-user operation.
</p>
</div>
<p>
If this function fails, an error message is returned and
the audit log is disabled until the next successful call
to
<a class="link" href="audit-log-reference.html#function_audit-log-filter-flush">
<code class="literal">
audit_log_filter_flush()
</code>
</a>
.
</p>
<p>
Arguments:
</p>
<p>
None.
</p>
<p>
Return value:
</p>
<p>
A string that indicates whether the operation succeeded.
<code class="literal">
OK
</code>
indicates success.
<code class="literal">
ERROR:
<em class="replaceable">
<code>
message
</code>
</em>
</code>
indicates
failure.
</p>
<p>
Example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa97859792"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> audit_log_filter_flush<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> audit_log_filter_flush() <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> OK <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
</li>
<li class="listitem">
<p>
<a name="function_audit-log-filter-remove-filter">
</a>
<a class="link" href="audit-log-reference.html#function_audit-log-filter-remove-filter">
<code class="literal">
audit_log_filter_remove_filter(
<em class="replaceable">
<code>
filter_name
</code>
</em>
)
</code>
</a>
</p>
<a class="indexterm" name="idm46045236151024">
</a>
<a class="indexterm" name="idm46045236149904">
</a>
<p>
Given a filter name, removes the filter from the current
set of filters. It is not an error for the filter not to
exist.
</p>
<p>
If a removed filter is assigned to any user accounts,
those users stop being filtered (they are removed from the
<code class="literal">
audit_log_user
</code>
table). Termination of
filtering includes any current sessions for those users:
They are detached from the filter and no longer logged.
</p>
<p>
Arguments:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
<em class="replaceable">
<code>
filter_name
</code>
</em>
: A string that
specifies the filter name.
</p>
</li>
</ul>
</div>
<p>
Return value:
</p>
<p>
A string that indicates whether the operation succeeded.
<code class="literal">
OK
</code>
indicates success.
<code class="literal">
ERROR:
<em class="replaceable">
<code>
message
</code>
</em>
</code>
indicates
failure.
</p>
<p>
Example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa6736471"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> audit_log_filter_remove_filter<span class="token punctuation">(</span><span class="token string">'SomeFilter'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> audit_log_filter_remove_filter('SomeFilter') <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> OK <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
</li>
<li class="listitem">
<p>
<a name="function_audit-log-filter-remove-user">
</a>
<a class="link" href="audit-log-reference.html#function_audit-log-filter-remove-user">
<code class="literal">
audit_log_filter_remove_user(
<em class="replaceable">
<code>
user_name
</code>
</em>
)
</code>
</a>
</p>
<a class="indexterm" name="idm46045236136384">
</a>
<a class="indexterm" name="idm46045236135264">
</a>
<p>
Given a user account name, cause the user to be no longer
assigned to a filter. It is not an error if the user has
no filter assigned. Filtering of current sessions for the
user remains unaffected. New connections for the user are
filtered using the default account filter if there is one,
and are not logged otherwise.
</p>
<p>
If the name is
<code class="literal">
%
</code>
, the function removes
the default account filter that is used for any user
account that has no explicitly assigned filter.
</p>
<p>
Arguments:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
<em class="replaceable">
<code>
user_name
</code>
</em>
: The user account
name as a string in
<code class="literal">
<em class="replaceable">
<code>
user_name
</code>
</em>
@
<em class="replaceable">
<code>
host_name
</code>
</em>
</code>
format, or
<code class="literal">
%
</code>
to represent the
default account.
</p>
</li>
</ul>
</div>
<p>
Return value:
</p>
<p>
A string that indicates whether the operation succeeded.
<code class="literal">
OK
</code>
indicates success.
<code class="literal">
ERROR:
<em class="replaceable">
<code>
message
</code>
</em>
</code>
indicates
failure.
</p>
<p>
Example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa1973355"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> audit_log_filter_remove_user<span class="token punctuation">(</span><span class="token string">'user1@localhost'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> audit_log_filter_remove_user('user1@localhost') <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> OK <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
</li>
<li class="listitem">
<p>
<a name="function_audit-log-filter-set-filter">
</a>
<a class="link" href="audit-log-reference.html#function_audit-log-filter-set-filter">
<code class="literal">
audit_log_filter_set_filter(
<em class="replaceable">
<code>
filter_name
</code>
</em>
,
<em class="replaceable">
<code>
definition
</code>
</em>
)
</code>
</a>
</p>
<a class="indexterm" name="idm46045236119200">
</a>
<a class="indexterm" name="idm46045236118080">
</a>
<p>
Given a filter name and definition, adds the filter to the
current set of filters. If the filter already exists and
is used by any current sessions, those sessions are
detached from the filter and are no longer logged. This
occurs because the new filter definition has a new filter
ID that differs from its previous ID.
</p>
<p>
Arguments:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
<em class="replaceable">
<code>
filter_name
</code>
</em>
: A string that
specifies the filter name.
</p>
</li>
<li class="listitem">
<p>
<em class="replaceable">
<code>
definition
</code>
</em>
: A
<a class="link" href="json.html" title="13.5 The JSON Data Type">
<code class="literal">
JSON
</code>
</a>
value that
specifies the filter definition.
</p>
</li>
</ul>
</div>
<p>
Return value:
</p>
<p>
A string that indicates whether the operation succeeded.
<code class="literal">
OK
</code>
indicates success.
<code class="literal">
ERROR:
<em class="replaceable">
<code>
message
</code>
</em>
</code>
indicates
failure.
</p>
<p>
Example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa58111734"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SET</span> <span class="token variable">@f</span> <span class="token operator">=</span> <span class="token string">'{ "filter": { "log": false } }'</span><span class="token punctuation">;</span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> audit_log_filter_set_filter<span class="token punctuation">(</span><span class="token string">'SomeFilter'</span><span class="token punctuation">,</span> <span class="token variable">@f</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> audit_log_filter_set_filter('SomeFilter', @f) <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> OK <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
</li>
<li class="listitem">
<p>
<a name="function_audit-log-filter-set-user">
</a>
<a class="link" href="audit-log-reference.html#function_audit-log-filter-set-user">
<code class="literal">
audit_log_filter_set_user(
<em class="replaceable">
<code>
user_name
</code>
</em>
,
<em class="replaceable">
<code>
filter_name
</code>
</em>
)
</code>
</a>
</p>
<a class="indexterm" name="idm46045236102096">
</a>
<a class="indexterm" name="idm46045236100976">
</a>
<p>
Given a user account name and a filter name, assigns the
filter to the user. A user can be assigned only one
filter, so if the user was already assigned a filter, the
assignment is replaced. Filtering of current sessions for
the user remains unaffected. New connections are filtered
using the new filter.
</p>
<p>
As a special case, the name
<code class="literal">
%
</code>
represents the default account. The filter is used for
connections from any user account that has no explicitly
assigned filter.
</p>
<p>
Arguments:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
<em class="replaceable">
<code>
user_name
</code>
</em>
: The user account
name as a string in
<code class="literal">
<em class="replaceable">
<code>
user_name
</code>
</em>
@
<em class="replaceable">
<code>
host_name
</code>
</em>
</code>
format, or
<code class="literal">
%
</code>
to represent the
default account.
</p>
</li>
<li class="listitem">
<p>
<em class="replaceable">
<code>
filter_name
</code>
</em>
: A string that
specifies the filter name.
</p>
</li>
</ul>
</div>
<p>
Return value:
</p>
<p>
A string that indicates whether the operation succeeded.
<code class="literal">
OK
</code>
indicates success.
<code class="literal">
ERROR:
<em class="replaceable">
<code>
message
</code>
</em>
</code>
indicates
failure.
</p>
<p>
Example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa64600506"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> audit_log_filter_set_user<span class="token punctuation">(</span><span class="token string">'user1@localhost'</span><span class="token punctuation">,</span> <span class="token string">'SomeFilter'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> audit_log_filter_set_user('user1@localhost', 'SomeFilter') <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> OK <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
</li>
<li class="listitem">
<p>
<a name="function_audit-log-read">
</a>
<a class="link" href="audit-log-reference.html#function_audit-log-read">
<code class="literal">
audit_log_read([
<em class="replaceable">
<code>
arg
</code>
</em>
])
</code>
</a>
</p>
<a class="indexterm" name="idm46045236084080">
</a>
<a class="indexterm" name="idm46045236082976">
</a>
<p>
Reads the audit log and returns a
<a class="link" href="json.html" title="13.5 The JSON Data Type">
<code class="literal">
JSON
</code>
</a>
string result. If the
audit log format is not
<a class="link" href="json.html" title="13.5 The JSON Data Type">
<code class="literal">
JSON
</code>
</a>
, an error occurs.
</p>
<p>
With no argument or a
<a class="link" href="json.html" title="13.5 The JSON Data Type">
<code class="literal">
JSON
</code>
</a>
hash argument,
<a class="link" href="audit-log-reference.html#function_audit-log-read">
<code class="literal">
audit_log_read()
</code>
</a>
reads
events from the audit log and returns a
<a class="link" href="json.html" title="13.5 The JSON Data Type">
<code class="literal">
JSON
</code>
</a>
string containing an
array of audit events. Items in the hash argument
influence how reading occurs, as described later. Each
element in the returned array is an event represented as a
<a class="link" href="json.html" title="13.5 The JSON Data Type">
<code class="literal">
JSON
</code>
</a>
hash, with the
exception that the last element may be a
<a class="link" href="json.html" title="13.5 The JSON Data Type">
<code class="literal">
JSON
</code>
</a>
<code class="literal">
null
</code>
value to indicate no following
events are available to read.
</p>
<p>
With an argument consisting of a
<a class="link" href="json.html" title="13.5 The JSON Data Type">
<code class="literal">
JSON
</code>
</a>
<code class="literal">
null
</code>
value,
<a class="link" href="audit-log-reference.html#function_audit-log-read">
<code class="literal">
audit_log_read()
</code>
</a>
closes the
current read sequence.
</p>
<p>
For additional details about the audit log-reading
process, see
<a class="xref" href="audit-log-file-reading.html" title="8.4.5.6 Reading Audit Log Files">
Section 8.4.5.6, “Reading Audit Log Files”
</a>
.
</p>
<p>
Arguments:
</p>
<p>
To obtain a bookmark for the most recently written event,
call
<a class="link" href="audit-log-reference.html#function_audit-log-read-bookmark">
<code class="literal">
audit_log_read_bookmark()
</code>
</a>
.
</p>
<p>
<em class="replaceable">
<code>
arg
</code>
</em>
: The argument is optional.
If omitted, the function reads events from the current
position. If present, the argument can be a
<a class="link" href="json.html" title="13.5 The JSON Data Type">
<code class="literal">
JSON
</code>
</a>
<code class="literal">
null
</code>
value to close the read sequence,
or a
<a class="link" href="json.html" title="13.5 The JSON Data Type">
<code class="literal">
JSON
</code>
</a>
hash. Within a
hash argument, items are optional and control aspects of
the read operation such as the position at which to begin
reading or how many events to read. The following items
are significant (other items are ignored):
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
<code class="literal">
start
</code>
: The position within the
audit log of the first event to read. The position is
given as a timestamp and the read starts from the
first event that occurs on or after the timestamp
value. The
<code class="literal">
start
</code>
item has this
format, where
<em class="replaceable">
<code>
value
</code>
</em>
is a
literal timestamp value:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-json"><div class="docs-select-all right" id="sa63194890"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-json"><span class="token property">"start"</span><span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token property">"timestamp"</span><span class="token operator">:</span> <span class="token string">"<em class="replaceable">value</em>"</span> <span class="token punctuation">}</span></code></pre>
</div>
</li>
<li class="listitem">
<p>
<code class="literal">
timestamp
</code>
,
<code class="literal">
id
</code>
:
The position within the audit log of the first event
to read. The
<code class="literal">
timestamp
</code>
and
<code class="literal">
id
</code>
items together comprise a
bookmark that uniquely identify a particular event. If
an
<a class="link" href="audit-log-reference.html#function_audit-log-read">
<code class="literal">
audit_log_read()
</code>
</a>
argument includes either item, it must include both to
completely specify a position or an error occurs.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
max_array_length
</code>
: The maximum
number of events to read from the log. If this item is
omitted, the default is to read to the end of the log
or until the read buffer is full, whichever comes
first.
</p>
</li>
</ul>
</div>
<p>
To specify a starting position to
<a class="link" href="audit-log-reference.html#function_audit-log-read">
<code class="literal">
audit_log_read()
</code>
</a>
, pass a
hash argument that includes either a
<code class="literal">
start
</code>
item or a bookmark consisting of
<code class="literal">
timestamp
</code>
and
<code class="literal">
id
</code>
items. If a hash argument includes both a
<code class="literal">
start
</code>
item and a bookmark, an error
occurs.
</p>
<p>
If a hash argument specifies no starting position, reading
continues from the current position.
</p>
<p>
If a timestamp value includes no time part, a time part of
<code class="literal">
00:00:00
</code>
is assumed.
</p>
<p>
Return value:
</p>
<p>
If the call succeeds, the return value is a
<a class="link" href="json.html" title="13.5 The JSON Data Type">
<code class="literal">
JSON
</code>
</a>
string containing an
array of audit events, or a
<a class="link" href="json.html" title="13.5 The JSON Data Type">
<code class="literal">
JSON
</code>
</a>
<code class="literal">
null
</code>
value if that was passed as the
argument to close the read sequence. If the call fails,
the return value is
<code class="literal">
NULL
</code>
and an error
occurs.
</p>
<p>
Example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa81128536"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> audit_log_read<span class="token punctuation">(</span>audit_log_read_bookmark<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> audit_log_read(audit_log_read_bookmark()) <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> [ {"timestamp":"2020<span class="token punctuation">-</span>05<span class="token punctuation">-</span>18 22:41:24","id":0,"class":"connection", ... <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> audit_log_read<span class="token punctuation">(</span><span class="token string">'null'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> audit_log_read('null') <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> null <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
<p>
Notes:
</p>
<p>
Prior to MySQL 8.4, string return values
could be binary
<a class="link" href="json.html" title="13.5 The JSON Data Type">
<code class="literal">
JSON
</code>
</a>
strings. For information about converting such values to
nonbinary strings, see
<a class="xref" href="audit-log-file-reading.html" title="8.4.5.6 Reading Audit Log Files">
Section 8.4.5.6, “Reading Audit Log Files”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="function_audit-log-read-bookmark">
</a>
<a class="link" href="audit-log-reference.html#function_audit-log-read-bookmark">
<code class="literal">
audit_log_read_bookmark()
</code>
</a>
</p>
<a class="indexterm" name="idm46045236026912">
</a>
<a class="indexterm" name="idm46045236025808">
</a>
<p>
Returns a
<a class="link" href="json.html" title="13.5 The JSON Data Type">
<code class="literal">
JSON
</code>
</a>
string
representing a bookmark for the most recently written
audit log event. If the audit log format is not
<a class="link" href="json.html" title="13.5 The JSON Data Type">
<code class="literal">
JSON
</code>
</a>
, an error occurs.
</p>
<p>
The bookmark is a
<a class="link" href="json.html" title="13.5 The JSON Data Type">
<code class="literal">
JSON
</code>
</a>
hash
with
<code class="literal">
timestamp
</code>
and
<code class="literal">
id
</code>
items that uniquely identify the
position of an event within the audit log. It is suitable
for passing to
<a class="link" href="audit-log-reference.html#function_audit-log-read">
<code class="literal">
audit_log_read()
</code>
</a>
to
indicate to that function the position at which to begin
reading.
</p>
<p>
For additional details about the audit log-reading
process, see
<a class="xref" href="audit-log-file-reading.html" title="8.4.5.6 Reading Audit Log Files">
Section 8.4.5.6, “Reading Audit Log Files”
</a>
.
</p>
<p>
Arguments:
</p>
<p>
None.
</p>
<p>
Return value:
</p>
<p>
A
<a class="link" href="json.html" title="13.5 The JSON Data Type">
<code class="literal">
JSON
</code>
</a>
string containing a
bookmark for success, or
<code class="literal">
NULL
</code>
and an
error for failure.
</p>
<p>
Example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa18833082"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> audit_log_read_bookmark<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> audit_log_read_bookmark() <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> { "timestamp": "2019<span class="token punctuation">-</span>10<span class="token punctuation">-</span>03 21:03:44", "id": 0 } <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
<p>
Notes:
</p>
<p>
Prior to MySQL 8.4, string return values
could be binary
<a class="link" href="json.html" title="13.5 The JSON Data Type">
<code class="literal">
JSON
</code>
</a>
strings. For information about converting such values to
nonbinary strings, see
<a class="xref" href="audit-log-file-reading.html" title="8.4.5.6 Reading Audit Log Files">
Section 8.4.5.6, “Reading Audit Log Files”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="function_audit-log-rotate">
</a>
<a class="link" href="audit-log-reference.html#function_audit-log-rotate">
<code class="literal">
audit_log_rotate()
</code>
</a>
</p>
<a class="indexterm" name="idm46045236003984">
</a>
<a class="indexterm" name="idm46045236002880">
</a>
<p>
Arguments:
</p>
<p>
None.
</p>
<p>
Return value:
</p>
<p>
The renamed file name.
</p>
<p>
Example:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa77774516"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> audit_log_rotate<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
Using
<code class="literal">
audit_log_rotate()
</code>
requires the
<a class="link" href="privileges-provided.html#priv_audit-admin">
<code class="literal">
AUDIT_ADMIN
</code>
</a>
privilege.
</p>
</li>
</ul>
</div>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h5 class="title">
<a name="audit-log-option-variable-reference">
</a>
Audit Log Option and Variable Reference
</h5>
</div>
</div>
</div>
<div class="table">
<a name="idm46045235994304">
</a>
<p class="title">
<b>
Table 8.43 Audit Log Option and Variable Reference
</b>
</p>
<div class="table-contents">
<table frame="box" rules="all" summary="Reference for audit log command-line options, system variables, and status variables.">
<colgroup>
<col style="width: 20%"/>
<col style="width: 15%"/>
<col style="width: 15%"/>
<col style="width: 15%"/>
<col style="width: 15%"/>
<col style="width: 15%"/>
<col style="width: 15%"/>
</colgroup>
<thead>
<tr>
<th scope="col">
Name
</th>
<th scope="col">
Cmd-Line
</th>
<th scope="col">
Option File
</th>
<th scope="col">
System Var
</th>
<th scope="col">
Status Var
</th>
<th scope="col">
Var Scope
</th>
<th scope="col">
Dynamic
</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#option_mysqld_audit-log">
audit-log
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_buffer_size">
audit_log_buffer_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_compression">
audit_log_compression
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_connection_policy">
audit_log_connection_policy
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_current_session">
audit_log_current_session
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Both
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#statvar_Audit_log_current_size">
Audit_log_current_size
</a>
</th>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_database">
audit_log_database
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#statvar_Audit_log_direct_writes">
Audit_log_direct_writes
</a>
</th>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_disable">
audit_log_disable
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_encryption">
audit_log_encryption
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#statvar_Audit_log_event_max_drop_size">
Audit_log_event_max_drop_size
</a>
</th>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#statvar_Audit_log_events">
Audit_log_events
</a>
</th>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#statvar_Audit_log_events_filtered">
Audit_log_events_filtered
</a>
</th>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#statvar_Audit_log_events_lost">
Audit_log_events_lost
</a>
</th>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#statvar_Audit_log_events_written">
Audit_log_events_written
</a>
</th>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_exclude_accounts">
audit_log_exclude_accounts
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_file">
audit_log_file
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_filter_id">
audit_log_filter_id
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Both
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_flush">
audit_log_flush
</a>
</th>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_flush_interval_seconds">
audit_log_flush_interval_seconds
</a>
</th>
<td>
Yes
</td>
<td>
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_format">
audit_log_format
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_include_accounts">
audit_log_include_accounts
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_max_size">
audit_log_max_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_password_history_keep_days">
audit_log_password_history_keep_days
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_policy">
audit_log_policy
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_prune_seconds">
audit_log_prune_seconds
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_read_buffer_size">
audit_log_read_buffer_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Both
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_rotate_on_size">
audit_log_rotate_on_size
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_statement_policy">
audit_log_statement_policy
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
Yes
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_strategy">
audit_log_strategy
</a>
</th>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
Yes
</td>
<td>
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#statvar_Audit_log_total_size">
Audit_log_total_size
</a>
</th>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
<tr>
<th scope="row">
<a class="link" href="audit-log-reference.html#statvar_Audit_log_write_waits">
Audit_log_write_waits
</a>
</th>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
Yes
</td>
<td>
Global
</td>
<td>
No
</td>
</tr>
</tbody>
</table>
</div>
<div class="table-contents">
<table cellpadding="0" cellspacing="0" style="position: fixed; top: 0px; display: none; left: 401px; width: 739px;">
<thead>
<tr>
<th scope="col" style="width: 280.672px;">
Name
</th>
<th scope="col" style="width: 73.0156px;">
Cmd-Line
</th>
<th scope="col" style="width: 80px;">
Option File
</th>
<th scope="col" style="width: 81.4219px;">
System Var
</th>
<th scope="col" style="width: 77.8594px;">
Status Var
</th>
<th scope="col" style="width: 75.6875px;">
Var Scope
</th>
<th scope="col" style="width: 69.3438px;">
Dynamic
</th>
</tr>
</thead>
</table>
</div>
</div>
<br class="table-break"/>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h5 class="title">
<a name="audit-log-options-variables">
</a>
Audit Log Options and Variables
</h5>
</div>
</div>
</div>
<p>
This section describes the command options and system
variables that configure operation of MySQL Enterprise Audit. If values
specified at startup time are incorrect, the
<code class="literal">
audit_log
</code>
plugin may fail to initialize
properly and the server does not load it. In this case, the
server may also produce error messages for other audit log
settings because it does not recognize them.
</p>
<p>
To configure activation of the audit log plugin, use this
option:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<a name="option_mysqld_audit-log">
</a>
<a class="link" href="audit-log-reference.html#option_mysqld_audit-log">
<code class="option">
--audit-log[=
<em class="replaceable">
<code>
value
</code>
</em>
]
</code>
</a>
</p>
<a class="indexterm" name="idm46045235751168">
</a>
<a class="indexterm" name="idm46045235749680">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for audit-log">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--audit-log[=value]
</code>
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Enumeration
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
ON
</code>
</td>
</tr>
<tr>
<th>
Valid Values
</th>
<td>
<p class="valid-value">
<code class="literal">
ON
</code>
</p>
<p class="valid-value">
<code class="literal">
OFF
</code>
</p>
<p class="valid-value">
<code class="literal">
FORCE
</code>
</p>
<p class="valid-value">
<code class="literal">
FORCE_PLUS_PERMANENT
</code>
</p>
</td>
</tr>
</tbody>
</table>
</div>
<p>
This option controls how the server loads the
<code class="literal">
audit_log
</code>
plugin at startup. It is
available only if the plugin has been previously
registered with
<a class="link" href="install-plugin.html" title="15.7.4.4 INSTALL PLUGIN Statement">
<code class="literal">
INSTALL
PLUGIN
</code>
</a>
or is loaded with
<a class="link" href="server-options.html#option_mysqld_plugin-load">
<code class="option">
--plugin-load
</code>
</a>
or
<a class="link" href="server-options.html#option_mysqld_plugin-load-add">
<code class="option">
--plugin-load-add
</code>
</a>
. See
<a class="xref" href="audit-log-installation.html" title="8.4.5.2 Installing or Uninstalling MySQL Enterprise Audit">
Section 8.4.5.2, “Installing or Uninstalling MySQL Enterprise Audit”
</a>
.
</p>
<p>
The option value should be one of those available for
plugin-loading options, as described in
<a class="xref" href="plugin-loading.html" title="7.6.1 Installing and Uninstalling Plugins">
Section 7.6.1, “Installing and Uninstalling Plugins”
</a>
. For example,
<a class="link" href="audit-log-reference.html#option_mysqld_audit-log">
<code class="option">
--audit-log=FORCE_PLUS_PERMANENT
</code>
</a>
tells the server to load the plugin and prevent it from
being removed while the server is running.
</p>
</li>
</ul>
</div>
<p>
If the audit log plugin is enabled, it exposes several system
variables that permit control over logging:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa14729248"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SHOW</span> <span class="token keyword">VARIABLES</span> <span class="token operator">LIKE</span> <span class="token string">'audit_log%'</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Variable_name <span class="token punctuation">|</span> Value <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> audit_log_buffer_size <span class="token punctuation">|</span> 1048576 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> audit_log_compression <span class="token punctuation">|</span> NONE <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> audit_log_connection_policy <span class="token punctuation">|</span> ALL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> audit_log_current_session <span class="token punctuation">|</span> OFF <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> audit_log_database <span class="token punctuation">|</span> mysql <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> audit_log_disable <span class="token punctuation">|</span> OFF <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> audit_log_encryption <span class="token punctuation">|</span> NONE <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> audit_log_exclude_accounts <span class="token punctuation">|</span> <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> audit_log_file <span class="token punctuation">|</span> audit.log <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> audit_log_filter_id <span class="token punctuation">|</span> 0 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> audit_log_flush <span class="token punctuation">|</span> OFF <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> audit_log_flush_interval_seconds <span class="token punctuation">|</span> 0 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> audit_log_format <span class="token punctuation">|</span> NEW <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> audit_log_format_unix_timestamp <span class="token punctuation">|</span> OFF <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> audit_log_include_accounts <span class="token punctuation">|</span> <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> audit_log_max_size <span class="token punctuation">|</span> 0 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> audit_log_password_history_keep_days <span class="token punctuation">|</span> 0 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> audit_log_policy <span class="token punctuation">|</span> ALL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> audit_log_prune_seconds <span class="token punctuation">|</span> 0 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> audit_log_read_buffer_size <span class="token punctuation">|</span> 32768 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> audit_log_rotate_on_size <span class="token punctuation">|</span> 0 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> audit_log_statement_policy <span class="token punctuation">|</span> ALL <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> audit_log_strategy <span class="token punctuation">|</span> ASYNCHRONOUS <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
<p>
You can set any of these variables at server startup, and some
of them at runtime. Those that are available only for legacy
mode audit log filtering are so noted.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<a name="sysvar_audit_log_buffer_size">
</a>
<a class="link" href="audit-log-reference.html#sysvar_audit_log_buffer_size">
<code class="literal">
audit_log_buffer_size
</code>
</a>
</p>
<a class="indexterm" name="idm46045235717792">
</a>
<a class="indexterm" name="idm46045235716752">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for audit_log_buffer_size">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--audit-log-buffer-size=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_buffer_size">
audit_log_buffer_size
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
No
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
1048576
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
4096
</code>
</td>
</tr>
<tr>
<th>
Maximum Value (64-bit platforms)
</th>
<td>
<code class="literal">
18446744073709547520
</code>
</td>
</tr>
<tr>
<th>
Maximum Value (32-bit platforms)
</th>
<td>
<code class="literal">
4294967295
</code>
</td>
</tr>
<tr>
<th>
Unit
</th>
<td>
bytes
</td>
</tr>
<tr>
<th>
<a class="link" href="server-system-variables.html#system-variables-block-size" title="Note">
Block Size
</a>
</th>
<td>
<code class="literal">
4096
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
When the audit log plugin writes events to the log
asynchronously, it uses a buffer to store event contents
prior to writing them. This variable controls the size of
that buffer, in bytes. The server adjusts the value to a
multiple of 4096. The plugin uses a single buffer, which
it allocates when it initializes and removes when it
terminates. The plugin allocates this buffer only if
logging is asynchronous.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_audit_log_compression">
</a>
<a class="link" href="audit-log-reference.html#sysvar_audit_log_compression">
<code class="literal">
audit_log_compression
</code>
</a>
</p>
<a class="indexterm" name="idm46045235679216">
</a>
<a class="indexterm" name="idm46045235678176">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for audit_log_compression">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--audit-log-compression=value
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_compression">
audit_log_compression
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
No
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Enumeration
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
NONE
</code>
</td>
</tr>
<tr>
<th>
Valid Values
</th>
<td>
<p class="valid-value">
<code class="literal">
NONE
</code>
</p>
<p class="valid-value">
<code class="literal">
GZIP
</code>
</p>
</td>
</tr>
</tbody>
</table>
</div>
<p>
The type of compression for the audit log file. Permitted
values are
<code class="literal">
NONE
</code>
(no compression; the
default) and
<code class="literal">
GZIP
</code>
(GNU Zip
compression). For more information, see
<a class="xref" href="audit-log-logging-configuration.html#audit-log-file-compression" title="Compressing Audit Log Files">
Compressing Audit Log Files
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_audit_log_connection_policy">
</a>
<a class="link" href="audit-log-reference.html#sysvar_audit_log_connection_policy">
<code class="literal">
audit_log_connection_policy
</code>
</a>
</p>
<a class="indexterm" name="idm46045235647488">
</a>
<a class="indexterm" name="idm46045235646384">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for audit_log_connection_policy">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--audit-log-connection-policy=value
</code>
</td>
</tr>
<tr>
<th>
Deprecated
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_connection_policy">
audit_log_connection_policy
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Enumeration
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
ALL
</code>
</td>
</tr>
<tr>
<th>
Valid Values
</th>
<td>
<p class="valid-value">
<code class="literal">
ALL
</code>
</p>
<p class="valid-value">
<code class="literal">
ERRORS
</code>
</p>
<p class="valid-value">
<code class="literal">
NONE
</code>
</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
This deprecated variable applies only to legacy mode
audit log filtering (see
<a class="xref" href="audit-log-legacy-filtering.html" title="8.4.5.10 Legacy Mode Audit Log Filtering">
Section 8.4.5.10, “Legacy Mode Audit Log Filtering”
</a>
).
</p>
</div>
<p>
The policy controlling how the audit log plugin writes
connection events to its log file. The following table
shows the permitted values.
</p>
<div class="informaltable">
<table summary="Permitted values for the audit_log_connection_policy variable.">
<colgroup>
<col style="width: 15%"/>
<col style="width: 85%"/>
</colgroup>
<thead>
<tr>
<th>
Value
</th>
<th>
Description
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<code class="literal">
ALL
</code>
</td>
<td>
Log all connection events
</td>
</tr>
<tr>
<td>
<code class="literal">
ERRORS
</code>
</td>
<td>
Log only failed connection events
</td>
</tr>
<tr>
<td>
<code class="literal">
NONE
</code>
</td>
<td>
Do not log connection events
</td>
</tr>
</tbody>
</table>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
At server startup, any explicit value given for
<a class="link" href="audit-log-reference.html#sysvar_audit_log_connection_policy">
<code class="literal">
audit_log_connection_policy
</code>
</a>
may be overridden if
<a class="link" href="audit-log-reference.html#sysvar_audit_log_policy">
<code class="literal">
audit_log_policy
</code>
</a>
is
also specified, as described in
<a class="xref" href="audit-log-logging-configuration.html" title="8.4.5.5 Configuring Audit Logging Characteristics">
Section 8.4.5.5, “Configuring Audit Logging Characteristics”
</a>
.
</p>
</div>
</li>
<li class="listitem">
<p>
<a name="sysvar_audit_log_current_session">
</a>
<a class="link" href="audit-log-reference.html#sysvar_audit_log_current_session">
<code class="literal">
audit_log_current_session
</code>
</a>
</p>
<a class="indexterm" name="idm46045235596176">
</a>
<a class="indexterm" name="idm46045235595072">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for audit_log_current_session">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_current_session">
audit_log_current_session
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global, Session
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
No
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
depends on filtering policy
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Whether audit logging is enabled for the current session.
The session value of this variable is read only. It is set
when the session begins based on the values of the
<a class="link" href="audit-log-reference.html#sysvar_audit_log_include_accounts">
<code class="literal">
audit_log_include_accounts
</code>
</a>
and
<a class="link" href="audit-log-reference.html#sysvar_audit_log_exclude_accounts">
<code class="literal">
audit_log_exclude_accounts
</code>
</a>
system variables. The audit log plugin uses the session
value to determine whether to audit events for the
session. (There is a global value, but the plugin does not
use it.)
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_audit_log_database">
</a>
<a class="link" href="audit-log-reference.html#sysvar_audit_log_database">
<code class="literal">
audit_log_database
</code>
</a>
</p>
<a class="indexterm" name="idm46045235569872">
</a>
<a class="indexterm" name="idm46045235568832">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for audit_log_database">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--audit-log-database=value
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_database">
audit_log_database
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
No
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
mysql
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Specifies which database the
<code class="literal">
audit_log
</code>
plugin uses to find its tables. This variable is read
only. For more information, see
<a class="xref" href="audit-log-installation.html" title="8.4.5.2 Installing or Uninstalling MySQL Enterprise Audit">
Section 8.4.5.2, “Installing or Uninstalling MySQL Enterprise Audit”
</a>
).
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_audit_log_disable">
</a>
<a class="link" href="audit-log-reference.html#sysvar_audit_log_disable">
<code class="literal">
audit_log_disable
</code>
</a>
</p>
<a class="indexterm" name="idm46045235542704">
</a>
<a class="indexterm" name="idm46045235541664">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for audit_log_disable">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--audit-log-disable[={OFF|ON}]
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_disable">
audit_log_disable
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
OFF
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
Permits disabling audit logging for all connecting and
connected sessions. In addition to the
<a class="link" href="privileges-provided.html#priv_system-variables-admin">
<code class="literal">
SYSTEM_VARIABLES_ADMIN
</code>
</a>
privilege, disabling audit logging requires the
<a class="link" href="privileges-provided.html#priv_audit-admin">
<code class="literal">
AUDIT_ADMIN
</code>
</a>
privilege. See
<a class="xref" href="audit-log-disabling.html" title="8.4.5.9 Disabling Audit Logging">
Section 8.4.5.9, “Disabling Audit Logging”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_audit_log_encryption">
</a>
<a class="link" href="audit-log-reference.html#sysvar_audit_log_encryption">
<code class="literal">
audit_log_encryption
</code>
</a>
</p>
<a class="indexterm" name="idm46045235513600">
</a>
<a class="indexterm" name="idm46045235512560">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for audit_log_encryption">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--audit-log-encryption=value
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_encryption">
audit_log_encryption
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
No
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Enumeration
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
NONE
</code>
</td>
</tr>
<tr>
<th>
Valid Values
</th>
<td>
<p class="valid-value">
<code class="literal">
NONE
</code>
</p>
<p class="valid-value">
<code class="literal">
AES
</code>
</p>
</td>
</tr>
</tbody>
</table>
</div>
<p>
The type of encryption for the audit log file. Permitted
values are
<code class="literal">
NONE
</code>
(no encryption; the
default) and
<code class="literal">
AES
</code>
(AES-256-CBC cipher
encryption). For more information, see
<a class="xref" href="audit-log-logging-configuration.html#audit-log-file-encryption" title="Encrypting Audit Log Files">
Encrypting Audit Log Files
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_audit_log_exclude_accounts">
</a>
<a class="link" href="audit-log-reference.html#sysvar_audit_log_exclude_accounts">
<code class="literal">
audit_log_exclude_accounts
</code>
</a>
</p>
<a class="indexterm" name="idm46045235481920">
</a>
<a class="indexterm" name="idm46045235480816">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for audit_log_exclude_accounts">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--audit-log-exclude-accounts=value
</code>
</td>
</tr>
<tr>
<th>
Deprecated
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_exclude_accounts">
audit_log_exclude_accounts
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
NULL
</code>
</td>
</tr>
</tbody>
</table>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
This deprecated variable applies only to legacy mode
audit log filtering (see
<a class="xref" href="audit-log-legacy-filtering.html" title="8.4.5.10 Legacy Mode Audit Log Filtering">
Section 8.4.5.10, “Legacy Mode Audit Log Filtering”
</a>
).
</p>
</div>
<p>
The accounts for which events should not be logged. The
value should be
<code class="literal">
NULL
</code>
or a string
containing a list of one or more comma-separated account
names. For more information, see
<a class="xref" href="audit-log-filtering.html" title="8.4.5.7 Audit Log Filtering">
Section 8.4.5.7, “Audit Log Filtering”
</a>
.
</p>
<p>
Modifications to
<a class="link" href="audit-log-reference.html#sysvar_audit_log_exclude_accounts">
<code class="literal">
audit_log_exclude_accounts
</code>
</a>
affect only connections created subsequent to the
modification, not existing connections.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_audit_log_file">
</a>
<a class="link" href="audit-log-reference.html#sysvar_audit_log_file">
<code class="literal">
audit_log_file
</code>
</a>
</p>
<a class="indexterm" name="idm46045235449216">
</a>
<a class="indexterm" name="idm46045235448128">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for audit_log_file">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--audit-log-file=file_name
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_file">
audit_log_file
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
No
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
File name
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
audit.log
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
The base name and suffix of the file to which the audit
log plugin writes events. The default value is
<code class="filename">
audit.log
</code>
, regardless of logging
format. To have the name suffix correspond to the format,
set the name explicitly, choosing a different suffix (for
example,
<code class="filename">
audit.xml
</code>
for XML format,
<code class="filename">
audit.json
</code>
for JSON format).
</p>
<p>
If the value of
<a class="link" href="audit-log-reference.html#sysvar_audit_log_file">
<code class="literal">
audit_log_file
</code>
</a>
is a
relative path name, the plugin interprets it relative to
the data directory. If the value is a full path name, the
plugin uses the value as is. A full path name may be
useful if it is desirable to locate audit files on a
separate file system or directory. For security reasons,
write the audit log file to a directory accessible only to
the MySQL server and to users with a legitimate reason to
view the log.
</p>
<p>
For details about how the audit log plugin interprets the
<a class="link" href="audit-log-reference.html#sysvar_audit_log_file">
<code class="literal">
audit_log_file
</code>
</a>
value and
the rules for file renaming that occurs at plugin
initialization and termination, see
<a class="xref" href="audit-log-logging-configuration.html#audit-log-file-name" title="Naming Conventions for Audit Log Files">
Naming Conventions for Audit Log Files
</a>
.
</p>
<p>
The audit log plugin uses the directory containing the
audit log file (determined from the
<a class="link" href="audit-log-reference.html#sysvar_audit_log_file">
<code class="literal">
audit_log_file
</code>
</a>
value) as
the location to search for readable audit log files. From
these log files and the current file, the plugin
constructs a list of the ones that are subject to use with
the audit log bookmarking and reading functions. See
<a class="xref" href="audit-log-file-reading.html" title="8.4.5.6 Reading Audit Log Files">
Section 8.4.5.6, “Reading Audit Log Files”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_audit_log_filter_id">
</a>
<a class="link" href="audit-log-reference.html#sysvar_audit_log_filter_id">
<code class="literal">
audit_log_filter_id
</code>
</a>
</p>
<a class="indexterm" name="idm46045235413632">
</a>
<a class="indexterm" name="idm46045235412592">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for audit_log_filter_id">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_filter_id">
audit_log_filter_id
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global, Session
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
No
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
1
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
4294967295
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
The session value of this variable indicates the
internally maintained ID of the audit filter for the
current session. A value of 0 means that the session has
no filter assigned.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_audit_log_flush">
</a>
<a class="link" href="audit-log-reference.html#sysvar_audit_log_flush">
<code class="literal">
audit_log_flush
</code>
</a>
</p>
<a class="indexterm" name="idm46045235384784">
</a>
<a class="indexterm" name="idm46045235383696">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for audit_log_flush">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_flush">
audit_log_flush
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
OFF
</code>
</td>
</tr>
</tbody>
</table>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
The
<a class="link" href="audit-log-reference.html#sysvar_audit_log_flush">
<code class="literal">
audit_log_flush
</code>
</a>
variable is deprecated; expect support for it to be
removed in a future version of MySQL. It is superseded
by the
<code class="literal">
audit_log_rotate()
</code>
function.
</p>
</div>
<p>
If
<a class="link" href="audit-log-reference.html#sysvar_audit_log_rotate_on_size">
<code class="literal">
audit_log_rotate_on_size
</code>
</a>
is 0, automatic audit log file rotation is disabled and
rotation occurs only when performed manually. In that
case, enabling
<a class="link" href="audit-log-reference.html#sysvar_audit_log_flush">
<code class="literal">
audit_log_flush
</code>
</a>
by
setting it to 1 or
<code class="literal">
ON
</code>
causes the audit
log plugin to close and reopen its log file to flush it.
(The variable value remains
<code class="literal">
OFF
</code>
so that
you need not disable it explicitly before enabling it
again to perform another flush.) For more information, see
<a class="xref" href="audit-log-logging-configuration.html" title="8.4.5.5 Configuring Audit Logging Characteristics">
Section 8.4.5.5, “Configuring Audit Logging Characteristics”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_audit_log_flush_interval_seconds">
</a>
<a class="link" href="audit-log-reference.html#sysvar_audit_log_flush_interval_seconds">
<code class="literal">
audit_log_flush_interval_seconds
</code>
</a>
</p>
<a class="indexterm" name="idm46045235353712">
</a>
<a class="indexterm" name="idm46045235352608">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for audit_log_flush_interval_seconds">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--audit-log-flush-interval-seconds[=value]
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_flush_interval_seconds">
audit_log_flush_interval_seconds
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
No
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Unsigned Long
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value (Windows)
</th>
<td>
<code class="literal">
4294967295
</code>
</td>
</tr>
<tr>
<th>
Maximum Value (Other)
</th>
<td>
<code class="literal">
18446744073709551615
</code>
</td>
</tr>
<tr>
<th>
Unit
</th>
<td>
seconds
</td>
</tr>
</tbody>
</table>
</div>
<p>
This system variable depends on the
<code class="literal">
scheduler
</code>
component, which must be
installed and enabled (see
<a class="xref" href="scheduler-component.html" title="7.5.5 Scheduler Component">
Section 7.5.5, “Scheduler Component”
</a>
). To check the
status of the component:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa56332606"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SHOW</span> <span class="token keyword">VARIABLES</span> <span class="token operator">LIKE</span> <span class="token string">'component_scheduler%'</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Variable_name <span class="token punctuation">|</span> Value <span class="token punctuation">|</span></span>
<span class="token operator">+</span><span class="token comment" spellcheck="true">-----------------------------+-------|</span>
<span class="token output"><span class="token punctuation">|</span> component_scheduler.enabled <span class="token punctuation">|</span> On <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
<p>
When
<a class="link" href="audit-log-reference.html#sysvar_audit_log_flush_interval_seconds">
<code class="literal">
audit_log_flush_interval_seconds
</code>
</a>
has a value of zero (the default), no automatic refresh of
the privileges occurs, even if the
<code class="literal">
scheduler
</code>
component is enabled
(
<code class="literal">
ON
</code>
).
</p>
<p>
Values between
<code class="literal">
0
</code>
and
<code class="literal">
60
</code>
(1 to 59) are not acknowledged;
instead, these values adjust to
<code class="literal">
60
</code>
automatically and the server emits a warning. Values
greater than
<code class="literal">
60
</code>
define the number of
seconds the
<code class="literal">
scheduler
</code>
component waits
from startup, or from the beginning of the previous
execution, until it attempts to schedule another
execution.
</p>
<p>
To persist this global system variable to the
<code class="filename">
mysqld-auto.cnf
</code>
file without setting
the global variable runtime value, precede the variable
name by the
<code class="literal">
PERSIST_ONLY
</code>
keyword or the
<code class="literal">
@@PERSIST_ONLY.
</code>
qualifier.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_audit_log_format">
</a>
<a class="link" href="audit-log-reference.html#sysvar_audit_log_format">
<code class="literal">
audit_log_format
</code>
</a>
</p>
<a class="indexterm" name="idm46045235308176">
</a>
<a class="indexterm" name="idm46045235307088">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for audit_log_format">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--audit-log-format=value
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_format">
audit_log_format
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
No
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Enumeration
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
NEW
</code>
</td>
</tr>
<tr>
<th>
Valid Values
</th>
<td>
<p class="valid-value">
<code class="literal">
OLD
</code>
</p>
<p class="valid-value">
<code class="literal">
NEW
</code>
</p>
<p class="valid-value">
<code class="literal">
JSON
</code>
</p>
</td>
</tr>
</tbody>
</table>
</div>
<p>
The audit log file format. Permitted values are
<code class="literal">
OLD
</code>
(old-style XML),
<code class="literal">
NEW
</code>
(new-style XML; the default), and
<code class="literal">
JSON
</code>
. For details about each format,
see
<a class="xref" href="audit-log-file-formats.html" title="8.4.5.4 Audit Log File Formats">
Section 8.4.5.4, “Audit Log File Formats”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_audit_log_format_unix_timestamp">
</a>
<a class="link" href="audit-log-reference.html#sysvar_audit_log_format_unix_timestamp">
<code class="literal">
audit_log_format_unix_timestamp
</code>
</a>
</p>
<a class="indexterm" name="idm46045235275040">
</a>
<a class="indexterm" name="idm46045235273936">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for audit_log_format_unix_timestamp">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--audit-log-format-unix-timestamp[={OFF|ON}]
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_format_unix_timestamp">
audit_log_format_unix_timestamp
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Boolean
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
OFF
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
This variable applies only for JSON-format audit log
output. When that is true, enabling this variable causes
each log file record to include a
<code class="literal">
time
</code>
field. The field value is an integer that represents the
UNIX timestamp value indicating the date and time when the
audit event was generated.
</p>
<p>
Changing the value of this variable at runtime causes log
file rotation so that, for a given JSON-format log file,
all records in the file either do or do not include the
<code class="literal">
time
</code>
field.
</p>
<p>
Setting the runtime value of
<a class="link" href="audit-log-reference.html#sysvar_audit_log_format_unix_timestamp">
<code class="literal">
audit_log_format_unix_timestamp
</code>
</a>
requires the
<a class="link" href="privileges-provided.html#priv_audit-admin">
<code class="literal">
AUDIT_ADMIN
</code>
</a>
privilege, in addition to the
<a class="link" href="privileges-provided.html#priv_system-variables-admin">
<code class="literal">
SYSTEM_VARIABLES_ADMIN
</code>
</a>
privilege (or the deprecated
<a class="link" href="privileges-provided.html#priv_super">
<code class="literal">
SUPER
</code>
</a>
privilege) normally
required to set a global system variable runtime value.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_audit_log_include_accounts">
</a>
<a class="link" href="audit-log-reference.html#sysvar_audit_log_include_accounts">
<code class="literal">
audit_log_include_accounts
</code>
</a>
</p>
<a class="indexterm" name="idm46045235241264">
</a>
<a class="indexterm" name="idm46045235240160">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for audit_log_include_accounts">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--audit-log-include-accounts=value
</code>
</td>
</tr>
<tr>
<th>
Deprecated
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_include_accounts">
audit_log_include_accounts
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
String
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
NULL
</code>
</td>
</tr>
</tbody>
</table>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
This deprecated variable applies only to legacy mode
audit log filtering (see
<a class="xref" href="audit-log-legacy-filtering.html" title="8.4.5.10 Legacy Mode Audit Log Filtering">
Section 8.4.5.10, “Legacy Mode Audit Log Filtering”
</a>
).
</p>
</div>
<p>
The accounts for which events should be logged. The value
should be
<code class="literal">
NULL
</code>
or a string containing a
list of one or more comma-separated account names. For
more information, see
<a class="xref" href="audit-log-filtering.html" title="8.4.5.7 Audit Log Filtering">
Section 8.4.5.7, “Audit Log Filtering”
</a>
.
</p>
<p>
Modifications to
<a class="link" href="audit-log-reference.html#sysvar_audit_log_include_accounts">
<code class="literal">
audit_log_include_accounts
</code>
</a>
affect only connections created subsequent to the
modification, not existing connections.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_audit_log_max_size">
</a>
<a class="link" href="audit-log-reference.html#sysvar_audit_log_max_size">
<code class="literal">
audit_log_max_size
</code>
</a>
</p>
<a class="indexterm" name="idm46045235208448">
</a>
<a class="indexterm" name="idm46045235207408">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for audit_log_max_size">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--audit-log-max-size=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_max_size">
audit_log_max_size
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value (Windows)
</th>
<td>
<code class="literal">
4294967295
</code>
</td>
</tr>
<tr>
<th>
Maximum Value (Other)
</th>
<td>
<code class="literal">
18446744073709551615
</code>
</td>
</tr>
<tr>
<th>
Unit
</th>
<td>
bytes
</td>
</tr>
<tr>
<th>
<a class="link" href="server-system-variables.html#system-variables-block-size" title="Note">
Block Size
</a>
</th>
<td>
<code class="literal">
4096
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
<a class="link" href="audit-log-reference.html#sysvar_audit_log_max_size">
<code class="literal">
audit_log_max_size
</code>
</a>
pertains to audit log file pruning, which is supported for
JSON-format log files only. It controls pruning based on
combined log file size:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
A value of 0 (the default) disables size-based
pruning. No size limit is enforced.
</p>
</li>
<li class="listitem">
<p>
A value greater than 0 enables size-based pruning. The
value is the combined size above which audit log files
become subject to pruning.
</p>
</li>
</ul>
</div>
<p>
If you set
<a class="link" href="audit-log-reference.html#sysvar_audit_log_max_size">
<code class="literal">
audit_log_max_size
</code>
</a>
to a
value that is not a multiple of 4096, it is truncated to
the nearest multiple. In particular, setting it to a value
less than 4096 sets it to 0 and no size-based pruning
occurs.
</p>
<p>
If both
<a class="link" href="audit-log-reference.html#sysvar_audit_log_max_size">
<code class="literal">
audit_log_max_size
</code>
</a>
and
<a class="link" href="audit-log-reference.html#sysvar_audit_log_rotate_on_size">
<code class="literal">
audit_log_rotate_on_size
</code>
</a>
are greater than 0,
<a class="link" href="audit-log-reference.html#sysvar_audit_log_max_size">
<code class="literal">
audit_log_max_size
</code>
</a>
should
be more than 7 times the value of
<a class="link" href="audit-log-reference.html#sysvar_audit_log_rotate_on_size">
<code class="literal">
audit_log_rotate_on_size
</code>
</a>
.
Otherwise, a warning is written to the server error log
because in this case the
<span class="quote">
“
<span class="quote">
granularity
</span>
”
</span>
of
size-based pruning may be insufficient to prevent removal
of all or most rotated log files each time it occurs.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
Setting
<a class="link" href="audit-log-reference.html#sysvar_audit_log_max_size">
<code class="literal">
audit_log_max_size
</code>
</a>
by
itself is not sufficient to cause log file pruning to
occur because the pruning algorithm uses
<a class="link" href="audit-log-reference.html#sysvar_audit_log_rotate_on_size">
<code class="literal">
audit_log_rotate_on_size
</code>
</a>
,
<a class="link" href="audit-log-reference.html#sysvar_audit_log_max_size">
<code class="literal">
audit_log_max_size
</code>
</a>
, and
<a class="link" href="audit-log-reference.html#sysvar_audit_log_prune_seconds">
<code class="literal">
audit_log_prune_seconds
</code>
</a>
in conjunction. For details, see
<a class="xref" href="audit-log-logging-configuration.html#audit-log-space-management" title="Space Management of Audit Log Files">
Space Management of Audit Log Files
</a>
.
</p>
</div>
</li>
<li class="listitem">
<p>
<a name="sysvar_audit_log_password_history_keep_days">
</a>
<a class="link" href="audit-log-reference.html#sysvar_audit_log_password_history_keep_days">
<code class="literal">
audit_log_password_history_keep_days
</code>
</a>
</p>
<a class="indexterm" name="idm46045235151680">
</a>
<a class="indexterm" name="idm46045235150640">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for audit_log_password_history_keep_days">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--audit-log-password-history-keep-days=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_password_history_keep_days">
audit_log_password_history_keep_days
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
4294967295
</code>
</td>
</tr>
<tr>
<th>
Unit
</th>
<td>
days
</td>
</tr>
</tbody>
</table>
</div>
<p>
The audit log plugin implements log file encryption using
encryption passwords stored in the MySQL keyring (see
<a class="xref" href="audit-log-logging-configuration.html#audit-log-file-encryption" title="Encrypting Audit Log Files">
Encrypting Audit Log Files
</a>
). The plugin
also implements password history, which includes password
archiving and expiration (removal).
</p>
<p>
When the audit log plugin creates a new encryption
password, it archives the previous password, if one
exists, for later use. The
<a class="link" href="audit-log-reference.html#sysvar_audit_log_password_history_keep_days">
<code class="literal">
audit_log_password_history_keep_days
</code>
</a>
variable controls automatic removal of expired archived
passwords. Its value indicates the number of days after
which archived audit log encryption passwords are removed.
The default of 0 disables password expiration: the
password retention period is forever.
</p>
<p>
New audit log encryption passwords are created under these
circumstances:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
During plugin initialization, if the plugin finds that
log file encryption is enabled, it checks whether the
keyring contains an audit log encryption password. If
not, the plugin automatically generates a random
initial encryption password.
</p>
</li>
<li class="listitem">
<p>
When the
<a class="link" href="audit-log-reference.html#function_audit-log-encryption-password-set">
<code class="literal">
audit_log_encryption_password_set()
</code>
</a>
function is called to set a specific password.
</p>
</li>
</ul>
</div>
<p>
In each case, the plugin stores the new password in the
key ring and uses it to encrypt new log files.
</p>
<p>
Removal of expired audit log encryption passwords occurs
under these circumstances:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
During plugin initialization.
</p>
</li>
<li class="listitem">
<p>
When the
<a class="link" href="audit-log-reference.html#function_audit-log-encryption-password-set">
<code class="literal">
audit_log_encryption_password_set()
</code>
</a>
function is called.
</p>
</li>
<li class="listitem">
<p>
When the runtime value of
<a class="link" href="audit-log-reference.html#sysvar_audit_log_password_history_keep_days">
<code class="literal">
audit_log_password_history_keep_days
</code>
</a>
is changed from its current value to a value greater
than 0. Runtime value changes occur for
<a class="link" href="set-variable.html" title="15.7.6.1 SET Syntax for Variable Assignment">
<code class="literal">
SET
</code>
</a>
statements that use the
<code class="literal">
GLOBAL
</code>
or
<code class="literal">
PERSIST
</code>
keyword, but not the
<code class="literal">
PERSIST_ONLY
</code>
keyword.
<code class="literal">
PERSIST_ONLY
</code>
writes the variable
setting to
<code class="filename">
mysqld-auto.cnf
</code>
, but
has no effect on the runtime value.
</p>
<a class="indexterm" name="idm46045235102656">
</a>
<a class="indexterm" name="idm46045235101568">
</a>
</li>
</ul>
</div>
<p>
When password removal occurs, the current value of
<a class="link" href="audit-log-reference.html#sysvar_audit_log_password_history_keep_days">
<code class="literal">
audit_log_password_history_keep_days
</code>
</a>
determines which passwords to remove:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
If the value is 0, the plugin removes no passwords.
</p>
</li>
<li class="listitem">
<p>
If the value is
<em class="replaceable">
<code>
N
</code>
</em>
> 0,
the plugin removes passwords more than
<em class="replaceable">
<code>
N
</code>
</em>
days old.
</p>
</li>
</ul>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
Take care not to expire old passwords that are still
needed to read archived encrypted log files.
</p>
</div>
<p>
If you normally leave password expiration disabled (that
is,
<a class="link" href="audit-log-reference.html#sysvar_audit_log_password_history_keep_days">
<code class="literal">
audit_log_password_history_keep_days
</code>
</a>
has a value of 0), it is possible to perform an on-demand
cleanup operation by temporarily assigning the variable a
value greater than zero. For example, to expire passwords
older than 365 days, do this:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa68809093"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SET</span> <span class="token keyword">GLOBAL</span> audit_log_password_history_keep_days <span class="token operator">=</span> <span class="token number">365</span><span class="token punctuation">;</span>
<span class="token keyword">SET</span> <span class="token keyword">GLOBAL</span> audit_log_password_history_keep_days <span class="token operator">=</span> <span class="token number">0</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
Setting the runtime value of
<a class="link" href="audit-log-reference.html#sysvar_audit_log_password_history_keep_days">
<code class="literal">
audit_log_password_history_keep_days
</code>
</a>
requires the
<a class="link" href="privileges-provided.html#priv_audit-admin">
<code class="literal">
AUDIT_ADMIN
</code>
</a>
privilege, in addition to the
<a class="link" href="privileges-provided.html#priv_system-variables-admin">
<code class="literal">
SYSTEM_VARIABLES_ADMIN
</code>
</a>
privilege (or the deprecated
<a class="link" href="privileges-provided.html#priv_super">
<code class="literal">
SUPER
</code>
</a>
privilege) normally
required to set a global system variable runtime value.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_audit_log_policy">
</a>
<a class="link" href="audit-log-reference.html#sysvar_audit_log_policy">
<code class="literal">
audit_log_policy
</code>
</a>
</p>
<a class="indexterm" name="idm46045235082784">
</a>
<a class="indexterm" name="idm46045235081696">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for audit_log_policy">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--audit-log-policy=value
</code>
</td>
</tr>
<tr>
<th>
Deprecated
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_policy">
audit_log_policy
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
No
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Enumeration
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
ALL
</code>
</td>
</tr>
<tr>
<th>
Valid Values
</th>
<td>
<p class="valid-value">
<code class="literal">
ALL
</code>
</p>
<p class="valid-value">
<code class="literal">
LOGINS
</code>
</p>
<p class="valid-value">
<code class="literal">
QUERIES
</code>
</p>
<p class="valid-value">
<code class="literal">
NONE
</code>
</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
This deprecated variable applies only to legacy mode
audit log filtering (see
<a class="xref" href="audit-log-legacy-filtering.html" title="8.4.5.10 Legacy Mode Audit Log Filtering">
Section 8.4.5.10, “Legacy Mode Audit Log Filtering”
</a>
).
</p>
</div>
<p>
The policy controlling how the audit log plugin writes
events to its log file. The following table shows the
permitted values.
</p>
<div class="informaltable">
<table summary="Permitted values for the audit_log_policy variable.">
<colgroup>
<col style="width: 15%"/>
<col style="width: 85%"/>
</colgroup>
<thead>
<tr>
<th>
Value
</th>
<th>
Description
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<code class="literal">
ALL
</code>
</td>
<td>
Log all events
</td>
</tr>
<tr>
<td>
<code class="literal">
LOGINS
</code>
</td>
<td>
Log only login events
</td>
</tr>
<tr>
<td>
<code class="literal">
QUERIES
</code>
</td>
<td>
Log only query events
</td>
</tr>
<tr>
<td>
<code class="literal">
NONE
</code>
</td>
<td>
Log nothing (disable the audit stream)
</td>
</tr>
</tbody>
</table>
</div>
<p>
<a class="link" href="audit-log-reference.html#sysvar_audit_log_policy">
<code class="literal">
audit_log_policy
</code>
</a>
can be
set only at server startup. At runtime, it is a read-only
variable. Two other system variables,
<a class="link" href="audit-log-reference.html#sysvar_audit_log_connection_policy">
<code class="literal">
audit_log_connection_policy
</code>
</a>
and
<a class="link" href="audit-log-reference.html#sysvar_audit_log_statement_policy">
<code class="literal">
audit_log_statement_policy
</code>
</a>
,
provide finer control over logging policy and can be set
either at startup or at runtime. If you use
<a class="link" href="audit-log-reference.html#sysvar_audit_log_policy">
<code class="literal">
audit_log_policy
</code>
</a>
at
startup instead of the other two variables, the server
uses its value to set those variables. For more
information about the policy variables and their
interaction, see
<a class="xref" href="audit-log-logging-configuration.html" title="8.4.5.5 Configuring Audit Logging Characteristics">
Section 8.4.5.5, “Configuring Audit Logging Characteristics”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_audit_log_prune_seconds">
</a>
<a class="link" href="audit-log-reference.html#sysvar_audit_log_prune_seconds">
<code class="literal">
audit_log_prune_seconds
</code>
</a>
</p>
<a class="indexterm" name="idm46045235025680">
</a>
<a class="indexterm" name="idm46045235024640">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for audit_log_prune_seconds">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--audit-log-prune-seconds=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_prune_seconds">
audit_log_prune_seconds
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value (Windows)
</th>
<td>
<code class="literal">
4294967295
</code>
</td>
</tr>
<tr>
<th>
Maximum Value (Other)
</th>
<td>
<code class="literal">
18446744073709551615
</code>
</td>
</tr>
<tr>
<th>
Unit
</th>
<td>
bytes
</td>
</tr>
</tbody>
</table>
</div>
<p>
<a class="link" href="audit-log-reference.html#sysvar_audit_log_prune_seconds">
<code class="literal">
audit_log_prune_seconds
</code>
</a>
pertains to audit log file pruning, which is supported for
JSON-format log files only. It controls pruning based on
log file age:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
A value of 0 (the default) disables age-based pruning.
No age limit is enforced.
</p>
</li>
<li class="listitem">
<p>
A value greater than 0 enables age-based pruning. The
value is the number of seconds after which audit log
files become subject to pruning.
</p>
</li>
</ul>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
Setting
<a class="link" href="audit-log-reference.html#sysvar_audit_log_prune_seconds">
<code class="literal">
audit_log_prune_seconds
</code>
</a>
by itself is not sufficient to cause log file pruning to
occur because the pruning algorithm uses
<a class="link" href="audit-log-reference.html#sysvar_audit_log_rotate_on_size">
<code class="literal">
audit_log_rotate_on_size
</code>
</a>
,
<a class="link" href="audit-log-reference.html#sysvar_audit_log_max_size">
<code class="literal">
audit_log_max_size
</code>
</a>
, and
<a class="link" href="audit-log-reference.html#sysvar_audit_log_prune_seconds">
<code class="literal">
audit_log_prune_seconds
</code>
</a>
in conjunction. For details, see
<a class="xref" href="audit-log-logging-configuration.html#audit-log-space-management" title="Space Management of Audit Log Files">
Space Management of Audit Log Files
</a>
.
</p>
</div>
</li>
<li class="listitem">
<p>
<a name="sysvar_audit_log_read_buffer_size">
</a>
<a class="link" href="audit-log-reference.html#sysvar_audit_log_read_buffer_size">
<code class="literal">
audit_log_read_buffer_size
</code>
</a>
</p>
<a class="indexterm" name="idm46045234980272">
</a>
<a class="indexterm" name="idm46045234979168">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for audit_log_read_buffer_size">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--audit-log-read-buffer-size=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_read_buffer_size">
audit_log_read_buffer_size
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global, Session
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
32768
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
32768
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
4194304
</code>
</td>
</tr>
<tr>
<th>
Unit
</th>
<td>
bytes
</td>
</tr>
</tbody>
</table>
</div>
<p>
The buffer size for reading from the audit log file, in
bytes. The
<a class="link" href="audit-log-reference.html#function_audit-log-read">
<code class="literal">
audit_log_read()
</code>
</a>
function reads no more than this many bytes. Log file
reading is supported only for JSON log format. For more
information, see
<a class="xref" href="audit-log-file-reading.html" title="8.4.5.6 Reading Audit Log Files">
Section 8.4.5.6, “Reading Audit Log Files”
</a>
.
</p>
<p>
This variable has a default of 32KB and can be set at
runtime. Each client should set its session value of
<a class="link" href="audit-log-reference.html#sysvar_audit_log_read_buffer_size">
<code class="literal">
audit_log_read_buffer_size
</code>
</a>
appropriately for its use of
<a class="link" href="audit-log-reference.html#function_audit-log-read">
<code class="literal">
audit_log_read()
</code>
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="sysvar_audit_log_rotate_on_size">
</a>
<a class="link" href="audit-log-reference.html#sysvar_audit_log_rotate_on_size">
<code class="literal">
audit_log_rotate_on_size
</code>
</a>
</p>
<a class="indexterm" name="idm46045234942432">
</a>
<a class="indexterm" name="idm46045234941328">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for audit_log_rotate_on_size">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--audit-log-rotate-on-size=#
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_rotate_on_size">
audit_log_rotate_on_size
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Integer
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Minimum Value
</th>
<td>
<code class="literal">
0
</code>
</td>
</tr>
<tr>
<th>
Maximum Value
</th>
<td>
<code class="literal">
18446744073709551615
</code>
</td>
</tr>
<tr>
<th>
Unit
</th>
<td>
bytes
</td>
</tr>
<tr>
<th>
<a class="link" href="server-system-variables.html#system-variables-block-size" title="Note">
Block Size
</a>
</th>
<td>
<code class="literal">
4096
</code>
</td>
</tr>
</tbody>
</table>
</div>
<p>
If
<a class="link" href="audit-log-reference.html#sysvar_audit_log_rotate_on_size">
<code class="literal">
audit_log_rotate_on_size
</code>
</a>
is 0, the audit log plugin does not perform automatic
size-based log file rotation. If rotation is to occur, you
must perform it manually; see
<a class="xref" href="audit-log-logging-configuration.html#audit-log-manual-rotation" title="Manual Audit Log File Rotation">
Manual Audit Log File Rotation
</a>
.
</p>
<p>
If
<a class="link" href="audit-log-reference.html#sysvar_audit_log_rotate_on_size">
<code class="literal">
audit_log_rotate_on_size
</code>
</a>
is greater than 0, automatic size-based log file rotation
occurs. Whenever a write to the log file causes its size
to exceed the
<a class="link" href="audit-log-reference.html#sysvar_audit_log_rotate_on_size">
<code class="literal">
audit_log_rotate_on_size
</code>
</a>
value, the audit log plugin renames the current log file
and opens a new current log file using the original name.
</p>
<p>
If you set
<a class="link" href="audit-log-reference.html#sysvar_audit_log_rotate_on_size">
<code class="literal">
audit_log_rotate_on_size
</code>
</a>
to a value that is not a multiple of 4096, it is truncated
to the nearest multiple. In particular, setting it to a
value less than 4096 sets it to 0 and no rotation occurs,
except manually.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
<a class="link" href="audit-log-reference.html#sysvar_audit_log_rotate_on_size">
<code class="literal">
audit_log_rotate_on_size
</code>
</a>
controls whether audit log file rotation occurs. It can
also be used in conjunction with
<a class="link" href="audit-log-reference.html#sysvar_audit_log_max_size">
<code class="literal">
audit_log_max_size
</code>
</a>
and
<a class="link" href="audit-log-reference.html#sysvar_audit_log_prune_seconds">
<code class="literal">
audit_log_prune_seconds
</code>
</a>
to configure pruning of rotated JSON-format log files.
For details, see
<a class="xref" href="audit-log-logging-configuration.html#audit-log-space-management" title="Space Management of Audit Log Files">
Space Management of Audit Log Files
</a>
.
</p>
</div>
</li>
<li class="listitem">
<p>
<a name="sysvar_audit_log_statement_policy">
</a>
<a class="link" href="audit-log-reference.html#sysvar_audit_log_statement_policy">
<code class="literal">
audit_log_statement_policy
</code>
</a>
</p>
<a class="indexterm" name="idm46045234893872">
</a>
<a class="indexterm" name="idm46045234892768">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for audit_log_statement_policy">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--audit-log-statement-policy=value
</code>
</td>
</tr>
<tr>
<th>
Deprecated
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_statement_policy">
audit_log_statement_policy
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
Yes
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Enumeration
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
ALL
</code>
</td>
</tr>
<tr>
<th>
Valid Values
</th>
<td>
<p class="valid-value">
<code class="literal">
ALL
</code>
</p>
<p class="valid-value">
<code class="literal">
ERRORS
</code>
</p>
<p class="valid-value">
<code class="literal">
NONE
</code>
</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
This deprecated variable applies only to legacy mode
audit log filtering (see
<a class="xref" href="audit-log-legacy-filtering.html" title="8.4.5.10 Legacy Mode Audit Log Filtering">
Section 8.4.5.10, “Legacy Mode Audit Log Filtering”
</a>
).
</p>
</div>
<p>
The policy controlling how the audit log plugin writes
statement events to its log file. The following table
shows the permitted values.
</p>
<div class="informaltable">
<table summary="Permitted values for the audit_log_statement_policy variable.">
<colgroup>
<col style="width: 15%"/>
<col style="width: 85%"/>
</colgroup>
<thead>
<tr>
<th>
Value
</th>
<th>
Description
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<code class="literal">
ALL
</code>
</td>
<td>
Log all statement events
</td>
</tr>
<tr>
<td>
<code class="literal">
ERRORS
</code>
</td>
<td>
Log only failed statement events
</td>
</tr>
<tr>
<td>
<code class="literal">
NONE
</code>
</td>
<td>
Do not log statement events
</td>
</tr>
</tbody>
</table>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
At server startup, any explicit value given for
<a class="link" href="audit-log-reference.html#sysvar_audit_log_statement_policy">
<code class="literal">
audit_log_statement_policy
</code>
</a>
may be overridden if
<a class="link" href="audit-log-reference.html#sysvar_audit_log_policy">
<code class="literal">
audit_log_policy
</code>
</a>
is
also specified, as described in
<a class="xref" href="audit-log-logging-configuration.html" title="8.4.5.5 Configuring Audit Logging Characteristics">
Section 8.4.5.5, “Configuring Audit Logging Characteristics”
</a>
.
</p>
</div>
</li>
<li class="listitem">
<p>
<a name="sysvar_audit_log_strategy">
</a>
<a class="link" href="audit-log-reference.html#sysvar_audit_log_strategy">
<code class="literal">
audit_log_strategy
</code>
</a>
</p>
<a class="indexterm" name="idm46045234842528">
</a>
<a class="indexterm" name="idm46045234841488">
</a>
<div class="informaltable">
<table frame="box" rules="all" summary="Properties for audit_log_strategy">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<tbody>
<tr>
<th>
Command-Line Format
</th>
<td>
<code class="literal">
--audit-log-strategy=value
</code>
</td>
</tr>
<tr>
<th>
System Variable
</th>
<td>
<code class="literal">
<a class="link" href="audit-log-reference.html#sysvar_audit_log_strategy">
audit_log_strategy
</a>
</code>
</td>
</tr>
<tr>
<th>
Scope
</th>
<td>
Global
</td>
</tr>
<tr>
<th>
Dynamic
</th>
<td>
No
</td>
</tr>
<tr>
<th>
<a class="link" href="optimizer-hints.html#optimizer-hints-set-var" title="Variable-Setting Hint Syntax">
<code class="literal">
SET_VAR
</code>
</a>
Hint Applies
</th>
<td>
No
</td>
</tr>
<tr>
<th>
Type
</th>
<td>
Enumeration
</td>
</tr>
<tr>
<th>
Default Value
</th>
<td>
<code class="literal">
ASYNCHRONOUS
</code>
</td>
</tr>
<tr>
<th>
Valid Values
</th>
<td>
<p class="valid-value">
<code class="literal">
ASYNCHRONOUS
</code>
</p>
<p class="valid-value">
<code class="literal">
PERFORMANCE
</code>
</p>
<p class="valid-value">
<code class="literal">
SEMISYNCHRONOUS
</code>
</p>
<p class="valid-value">
<code class="literal">
SYNCHRONOUS
</code>
</p>
</td>
</tr>
</tbody>
</table>
</div>
<p>
The logging method used by the audit log plugin. These
strategy values are permitted:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem">
<p>
<code class="literal">
ASYNCHRONOUS
</code>
: Log asynchronously.
Wait for space in the output buffer.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
PERFORMANCE
</code>
: Log asynchronously.
Drop requests for which there is insufficient space in
the output buffer.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
SEMISYNCHRONOUS
</code>
: Log synchronously.
Permit caching by the operating system.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
SYNCHRONOUS
</code>
: Log synchronously.
Call
<code class="filename">
sync()
</code>
after each request.
</p>
</li>
</ul>
</div>
</li>
</ul>
</div>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h5 class="title">
<a name="audit-log-status-variables">
</a>
Audit Log Status Variables
</h5>
</div>
</div>
</div>
<p>
If the audit log plugin is enabled, it exposes several status
variables that provide operational information. These
variables are available for legacy mode audit filtering
(deprecated) and JSON mode audit filtering.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<a name="statvar_Audit_log_current_size">
</a>
<a class="link" href="audit-log-reference.html#statvar_Audit_log_current_size">
<code class="literal">
Audit_log_current_size
</code>
</a>
</p>
<a class="indexterm" name="idm46045234801392">
</a>
<a class="indexterm" name="idm46045234800352">
</a>
<p>
The size of the current audit log file. The value
increases when an event is written to the log and is reset
to 0 when the log is rotated.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Audit_log_direct_writes">
</a>
<a class="link" href="audit-log-reference.html#statvar_Audit_log_direct_writes">
<code class="literal">
Audit_log_direct_writes
</code>
</a>
</p>
<a class="indexterm" name="idm46045234795760">
</a>
<a class="indexterm" name="idm46045234794720">
</a>
<p>
When the audit log plugin writes events to the JSON-format
audit log, it uses a buffer to store event contents prior
to writing them. If the query length is greater than the
size of the buffer, then the plugin writes the event
directly to the log, bypassing the buffer. This variable
shows the number of direct writes. The plugin determines
the count based on the current write strategy in use (see
<a class="link" href="audit-log-reference.html#sysvar_audit_log_strategy">
<code class="literal">
audit_log_strategy
</code>
</a>
).
</p>
<div class="table">
<a name="idm46045234791008">
</a>
<p class="title">
<b>
Table 8.44 Write-Strategy Effect on the Direct Write Count
</b>
</p>
<div class="table-contents">
<table summary="Write strategies and the count of direct writes.">
<colgroup>
<col style="width: 30%"/>
<col style="width: 70%"/>
</colgroup>
<thead>
<tr>
<th>
Write Strategy
</th>
<th>
Description
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<code class="literal">
ASYNCHRONOUS
</code>
</td>
<td>
Incremented if the event size does not fit into the internal buffer
(
<a class="link" href="audit-log-reference.html#sysvar_audit_log_buffer_size">
<code class="literal">
audit_log_buffer_size
</code>
</a>
server system variable).
</td>
</tr>
<tr>
<td>
<code class="literal">
PERFORMANCE
</code>
</td>
<td>
Not incremented. The plugin discards events larger than internal buffer.
</td>
</tr>
<tr>
<td>
<code class="literal">
SEMISYNCHRONOUS
</code>
</td>
<td>
Always incremented.
</td>
</tr>
<tr>
<td>
<code class="literal">
SYNCHRONOUS
</code>
</td>
<td>
Always incremented.
</td>
</tr>
</tbody>
</table>
</div>
</div>
<br class="table-break"/>
</li>
<li class="listitem">
<p>
<a name="statvar_Audit_log_event_max_drop_size">
</a>
<a class="link" href="audit-log-reference.html#statvar_Audit_log_event_max_drop_size">
<code class="literal">
Audit_log_event_max_drop_size
</code>
</a>
</p>
<a class="indexterm" name="idm46045234771216">
</a>
<a class="indexterm" name="idm46045234770112">
</a>
<p>
The size of the largest dropped event in performance
logging mode. For a description of logging modes, see
<a class="xref" href="audit-log-logging-configuration.html" title="8.4.5.5 Configuring Audit Logging Characteristics">
Section 8.4.5.5, “Configuring Audit Logging Characteristics”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Audit_log_events">
</a>
<a class="link" href="audit-log-reference.html#statvar_Audit_log_events">
<code class="literal">
Audit_log_events
</code>
</a>
</p>
<a class="indexterm" name="idm46045234764848">
</a>
<a class="indexterm" name="idm46045234763808">
</a>
<p>
The number of events handled by the audit log plugin,
whether or not they were written to the log based on
filtering policy (see
<a class="xref" href="audit-log-logging-configuration.html" title="8.4.5.5 Configuring Audit Logging Characteristics">
Section 8.4.5.5, “Configuring Audit Logging Characteristics”
</a>
).
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Audit_log_events_filtered">
</a>
<a class="link" href="audit-log-reference.html#statvar_Audit_log_events_filtered">
<code class="literal">
Audit_log_events_filtered
</code>
</a>
</p>
<a class="indexterm" name="idm46045234758608">
</a>
<a class="indexterm" name="idm46045234757504">
</a>
<p>
The number of events handled by the audit log plugin that
were filtered (not written to the log) based on filtering
policy (see
<a class="xref" href="audit-log-logging-configuration.html" title="8.4.5.5 Configuring Audit Logging Characteristics">
Section 8.4.5.5, “Configuring Audit Logging Characteristics”
</a>
).
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Audit_log_events_lost">
</a>
<a class="link" href="audit-log-reference.html#statvar_Audit_log_events_lost">
<code class="literal">
Audit_log_events_lost
</code>
</a>
</p>
<a class="indexterm" name="idm46045234752256">
</a>
<a class="indexterm" name="idm46045234751216">
</a>
<p>
The number of events lost in performance logging mode
because an event was larger than the available audit log
buffer space. This value may be useful for assessing how
to set
<a class="link" href="audit-log-reference.html#sysvar_audit_log_buffer_size">
<code class="literal">
audit_log_buffer_size
</code>
</a>
to
size the buffer for performance mode. For a description of
logging modes, see
<a class="xref" href="audit-log-logging-configuration.html" title="8.4.5.5 Configuring Audit Logging Characteristics">
Section 8.4.5.5, “Configuring Audit Logging Characteristics”
</a>
.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Audit_log_events_written">
</a>
<a class="link" href="audit-log-reference.html#statvar_Audit_log_events_written">
<code class="literal">
Audit_log_events_written
</code>
</a>
</p>
<a class="indexterm" name="idm46045234744592">
</a>
<a class="indexterm" name="idm46045234743488">
</a>
<p>
The number of events written to the audit log.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Audit_log_total_size">
</a>
<a class="link" href="audit-log-reference.html#statvar_Audit_log_total_size">
<code class="literal">
Audit_log_total_size
</code>
</a>
</p>
<a class="indexterm" name="idm46045234738992">
</a>
<a class="indexterm" name="idm46045234737952">
</a>
<p>
The total size of events written to all audit log files.
Unlike
<a class="link" href="audit-log-reference.html#statvar_Audit_log_current_size">
<code class="literal">
Audit_log_current_size
</code>
</a>
,
the value of
<a class="link" href="audit-log-reference.html#statvar_Audit_log_total_size">
<code class="literal">
Audit_log_total_size
</code>
</a>
increases even when the log is rotated.
</p>
</li>
<li class="listitem">
<p>
<a name="statvar_Audit_log_write_waits">
</a>
<a class="link" href="audit-log-reference.html#statvar_Audit_log_write_waits">
<code class="literal">
Audit_log_write_waits
</code>
</a>
</p>
<a class="indexterm" name="idm46045234730896">
</a>
<a class="indexterm" name="idm46045234729856">
</a>
<p>
The number of times an event had to wait for space in the
audit log buffer in asynchronous logging mode. For a
description of logging modes, see
<a class="xref" href="audit-log-logging-configuration.html" title="8.4.5.5 Configuring Audit Logging Characteristics">
Section 8.4.5.5, “Configuring Audit Logging Characteristics”
</a>
.
</p>
</li>
</ul>
</div>
</div>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/return.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title">
<a name="return">
</a>
15.6.5.7 RETURN Statement
</h4>
</div>
</div>
</div>
<a class="indexterm" name="idm46045176197840">
</a>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa1656604"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">RETURN</span> <em class="replaceable">expr</em></code></pre>
</div>
<p>
The
<a class="link" href="return.html" title="15.6.5.7 RETURN Statement">
<code class="literal">
RETURN
</code>
</a>
statement terminates
execution of a stored function and returns the value
<em class="replaceable">
<code>
expr
</code>
</em>
to the function caller. There
must be at least one
<a class="link" href="return.html" title="15.6.5.7 RETURN Statement">
<code class="literal">
RETURN
</code>
</a>
statement in a stored function. There may be more than one if
the function has multiple exit points.
</p>
<p>
This statement is not used in stored procedures, triggers, or
events. The
<a class="link" href="leave.html" title="15.6.5.4 LEAVE Statement">
<code class="literal">
LEAVE
</code>
</a>
statement can
be used to exit a stored program of those types.
</p>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/mysql-cluster-limitations-unsupported.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title">
<a name="mysql-cluster-limitations-unsupported">
</a>
25.2.7.6 Unsupported or Missing Features in NDB Cluster
</h4>
</div>
</div>
</div>
<a class="indexterm" name="idm46045123277456">
</a>
<p>
A number of features supported by other storage engines are not
supported for
<a class="link" href="mysql-cluster.html" title="Chapter 25 MySQL NDB Cluster 8.4">
<code class="literal">
NDB
</code>
</a>
tables. Trying to
use any of these features in NDB Cluster does not cause errors
in or of itself; however, errors may occur in applications that
expects the features to be supported or enforced. Statements
referencing such features, even if effectively ignored by
<code class="literal">
NDB
</code>
, must be syntactically and otherwise
valid.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<b>
Index prefixes.
</b>
Prefixes on indexes are not supported for
<code class="literal">
NDB
</code>
tables. If a prefix is used as part
of an index specification in a statement such as
<a class="link" href="create-table.html" title="15.1.20 CREATE TABLE Statement">
<code class="literal">
CREATE TABLE
</code>
</a>
,
<a class="link" href="alter-table.html" title="15.1.9 ALTER TABLE Statement">
<code class="literal">
ALTER TABLE
</code>
</a>
, or
<a class="link" href="create-index.html" title="15.1.15 CREATE INDEX Statement">
<code class="literal">
CREATE INDEX
</code>
</a>
, the prefix is
not created by
<code class="literal">
NDB
</code>
.
</p>
<p>
A statement containing an index prefix, and creating or
modifying an
<code class="literal">
NDB
</code>
table, must still be
syntactically valid. For example, the following statement
always fails with Error 1089
<span class="errortext">
Incorrect prefix
key; the used key part is not a string, the used length is
longer than the key part, or the storage engine doesn't
support unique prefix keys
</span>
, regardless of
storage engine:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa57643797"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">CREATE</span> <span class="token keyword">TABLE</span> t1 <span class="token punctuation">(</span>
c1 <span class="token datatype">INT</span> <span class="token operator">NOT</span> <span class="token boolean">NULL</span><span class="token punctuation">,</span>
<em>c2 <span class="token datatype">VARCHAR</span><span class="token punctuation">(</span><span class="token number">100</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token keyword">INDEX</span> i1 <span class="token punctuation">(</span>c2<span class="token punctuation">(</span><span class="token number">500</span><span class="token punctuation">)</span><span class="token punctuation">)</span></em><span class="token punctuation"></span>
<span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
This happens on account of the SQL syntax rule that no index
may have a prefix larger than itself.
</p>
</li>
<li class="listitem">
<p>
<b>
Savepoints and rollbacks.
</b>
Savepoints and rollbacks to savepoints are ignored as in
<a class="link" href="myisam-storage-engine.html" title="18.2 The MyISAM Storage Engine">
<code class="literal">
MyISAM
</code>
</a>
.
</p>
</li>
<li class="listitem">
<p>
<b>
Durability of commits.
</b>
There are no durable commits on disk. Commits are
replicated, but there is no guarantee that logs are
flushed to disk on commit.
</p>
</li>
<li class="listitem">
<p>
<b>
Replication.
</b>
Statement-based replication is not supported. Use
<a class="link" href="replication-options-binary-log.html#sysvar_binlog_format">
<code class="option">
--binlog-format=ROW
</code>
</a>
(or
<a class="link" href="replication-options-binary-log.html#sysvar_binlog_format">
<code class="option">
--binlog-format=MIXED
</code>
</a>
) when
setting up cluster replication. See
<a class="xref" href="mysql-cluster-replication.html" title="25.7 NDB Cluster Replication">
Section 25.7, “NDB Cluster Replication”
</a>
, for more
information.
</p>
<p>
Replication using global transaction identifiers (GTIDs) is
not compatible with NDB Cluster, and is not supported in NDB
Cluster 8.4. Do not enable GTIDs when using the
<code class="literal">
NDB
</code>
storage engine, as this is very
likely to cause problems up to and including failure of NDB
Cluster Replication.
</p>
<p>
Semisynchronous replication is not supported in NDB Cluster.
</p>
</li>
<li class="listitem">
<p>
<b>
Generated columns.
</b>
The
<code class="literal">
NDB
</code>
storage engine does not support
indexes on virtual generated columns.
</p>
<p>
As with other storage engines, you can create an index on a
stored generated column, but you should bear in mind that
<code class="literal">
NDB
</code>
uses
<a class="link" href="mysql-cluster-ndbd-definition.html#ndbparam-ndbd-datamemory">
<code class="literal">
DataMemory
</code>
</a>
for
storage of the generated column as well as
<a class="link" href="mysql-cluster-ndbd-definition.html#ndbparam-ndbd-indexmemory">
<code class="literal">
IndexMemory
</code>
</a>
for the
index. See
<a class="xref" href="create-table-secondary-indexes.html#json-column-indirect-index-mysql-cluster" title="JSON columns and indirect indexing in NDB Cluster">
JSON columns and indirect indexing in NDB Cluster
</a>
,
for an example.
</p>
<p>
NDB Cluster writes changes in stored generated columns to
the binary log, but does log not those made to virtual
columns. This should not effect NDB Cluster Replication or
replication between
<code class="literal">
NDB
</code>
and other MySQL
storage engines.
</p>
</li>
</ul>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
See
<a class="xref" href="mysql-cluster-limitations-transactions.html" title="25.2.7.3 Limits Relating to Transaction Handling in NDB Cluster">
Section 25.2.7.3, “Limits Relating to Transaction Handling in NDB Cluster”
</a>
,
for more information relating to limitations on transaction
handling in
<a class="link" href="mysql-cluster.html" title="Chapter 25 MySQL NDB Cluster 8.4">
<code class="literal">
NDB
</code>
</a>
.
</p>
</div>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/alter-server.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title">
<a name="alter-server">
</a>
15.1.8 ALTER SERVER Statement
</h3>
</div>
</div>
</div>
<a class="indexterm" name="idm46045189598528">
</a>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa2916297"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">ALTER</span> <span class="token keyword">SERVER</span> <em class="replaceable">server_name</em>
<span class="token keyword">OPTIONS</span> <span class="token punctuation">(</span><span class="token keyword"><em class="replaceable">option</em></span> <span class="token punctuation">[</span><span class="token punctuation">,</span> <span class="token keyword"><em class="replaceable">option</em></span><span class="token punctuation">]</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">)</span></code></pre>
</div>
<p>
Alters the server information for
<code class="literal">
<em class="replaceable">
<code>
server_name
</code>
</em>
</code>
,
adjusting any of the options permitted in the
<a class="link" href="create-server.html" title="15.1.18 CREATE SERVER Statement">
<code class="literal">
CREATE SERVER
</code>
</a>
statement. The
corresponding fields in the
<code class="literal">
mysql.servers
</code>
table
are updated accordingly. This statement requires the
<a class="link" href="privileges-provided.html#priv_super">
<code class="literal">
SUPER
</code>
</a>
privilege.
</p>
<p>
For example, to update the
<code class="literal">
USER
</code>
option:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa53002391"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">ALTER</span> <span class="token keyword">SERVER</span> s <span class="token keyword">OPTIONS</span> <span class="token punctuation">(</span><span class="token keyword">USER</span> <span class="token string">'sally'</span><span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
<code class="literal">
ALTER SERVER
</code>
causes an implicit commit. See
<a class="xref" href="implicit-commit.html" title="15.3.3 Statements That Cause an Implicit Commit">
Section 15.3.3, “Statements That Cause an Implicit Commit”
</a>
.
</p>
<p>
<code class="literal">
ALTER SERVER
</code>
is not written to the binary log,
regardless of the logging format that is in use.
</p>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/show-grants.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title">
<a name="show-grants">
</a>
15.7.7.22 SHOW GRANTS Statement
</h4>
</div>
</div>
</div>
<a class="indexterm" name="idm46045170319872">
</a>
<a class="indexterm" name="idm46045170318384">
</a>
<a class="indexterm" name="idm46045170316896">
</a>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa49940105"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SHOW</span> <span class="token keyword">GRANTS</span>
<span class="token punctuation">[</span><span class="token keyword">FOR</span> <em class="replaceable">user_or_role</em>
<span class="token punctuation">[</span><span class="token keyword">USING</span> <span class="token keyword"><em class="replaceable">role</em></span> <span class="token punctuation">[</span><span class="token punctuation">,</span> <span class="token keyword"><em class="replaceable">role</em></span><span class="token punctuation">]</span> <span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">]</span><span class="token punctuation">]</span>
<em class="replaceable">user_or_role</em>: {
<span class="token function"><em class="replaceable">user</em></span> <span class="token punctuation">(</span>see Section <span class="token number">8.2</span><span class="token punctuation">.</span><span class="token number">4</span><span class="token punctuation">,</span> “Specifying <span class="token keyword">Account</span> <span class="token keyword">Names</span>”<span class="token punctuation">)</span>
<span class="token operator">|</span> <span class="token keyword"><em class="replaceable">role</em></span> <span class="token punctuation">(</span>see Section <span class="token number">8.2</span><span class="token punctuation">.</span><span class="token number">5</span><span class="token punctuation">,</span> “Specifying <span class="token keyword">Role</span> <span class="token keyword">Names</span>”<span class="token punctuation">.</span>
}</code></pre>
</div>
<p>
This statement displays the privileges and roles that are
assigned to a MySQL user account or role, in the form of
<a class="link" href="grant.html" title="15.7.1.6 GRANT Statement">
<code class="literal">
GRANT
</code>
</a>
statements that must be
executed to duplicate the privilege and role assignments.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
To display nonprivilege information for MySQL accounts, use
the
<a class="link" href="show-create-user.html" title="15.7.7.13 SHOW CREATE USER Statement">
<code class="literal">
SHOW CREATE USER
</code>
</a>
statement.
See
<a class="xref" href="show-create-user.html" title="15.7.7.13 SHOW CREATE USER Statement">
Section 15.7.7.13, “SHOW CREATE USER Statement”
</a>
.
</p>
</div>
<p>
<a class="link" href="show-grants.html" title="15.7.7.22 SHOW GRANTS Statement">
<code class="literal">
SHOW GRANTS
</code>
</a>
requires the
<a class="link" href="privileges-provided.html#priv_select">
<code class="literal">
SELECT
</code>
</a>
privilege for the
<code class="literal">
mysql
</code>
system schema, except to display
privileges and roles for the current user.
</p>
<p>
To name the account or role for
<a class="link" href="show-grants.html" title="15.7.7.22 SHOW GRANTS Statement">
<code class="literal">
SHOW
GRANTS
</code>
</a>
, use the same format as for the
<a class="link" href="grant.html" title="15.7.1.6 GRANT Statement">
<code class="literal">
GRANT
</code>
</a>
statement (for example,
<code class="literal">
'jeffrey'@'localhost'
</code>
):
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa88491955"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SHOW</span> <span class="token keyword">GRANTS</span> <span class="token keyword">FOR</span> <span class="token string">'jeffrey'</span>@<span class="token string">'localhost'</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Grants for jeffrey@localhost <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> GRANT USAGE ON *.* TO `jeffrey`@`localhost` <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> GRANT SELECT, INSERT, UPDATE ON `db1`.* TO `jeffrey`@`localhost` <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
<p>
The host part, if omitted, defaults to
<code class="literal">
'%'
</code>
.
For additional information about specifying account and role
names, see
<a class="xref" href="account-names.html" title="8.2.4 Specifying Account Names">
Section 8.2.4, “Specifying Account Names”
</a>
, and
<a class="xref" href="role-names.html" title="8.2.5 Specifying Role Names">
Section 8.2.5, “Specifying Role Names”
</a>
.
</p>
<p>
To display the privileges granted to the current user (the
account you are using to connect to the server), you can use any
of the following statements:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa78110819"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">SHOW</span> <span class="token keyword">GRANTS</span><span class="token punctuation">;</span>
<span class="token keyword">SHOW</span> <span class="token keyword">GRANTS</span> <span class="token keyword">FOR</span> <span class="token keyword">CURRENT_USER</span><span class="token punctuation">;</span>
<span class="token keyword">SHOW</span> <span class="token keyword">GRANTS</span> <span class="token keyword">FOR</span> <span class="token function">CURRENT_USER</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>
</div>
<a class="indexterm" name="idm46045170290112">
</a>
<a class="indexterm" name="idm46045170288624">
</a>
<a class="indexterm" name="idm46045170287552">
</a>
<a class="indexterm" name="idm46045170286064">
</a>
<p>
If
<code class="literal">
SHOW GRANTS FOR CURRENT_USER
</code>
(or any
equivalent syntax) is used in definer context, such as within a
stored procedure that executes with definer rather than invoker
privileges, the grants displayed are those of the definer and
not the invoker.
</p>
<p>
In MySQL 8.4 compared to previous series,
<a class="link" href="show-grants.html" title="15.7.7.22 SHOW GRANTS Statement">
<code class="literal">
SHOW GRANTS
</code>
</a>
no longer displays
<a class="link" href="privileges-provided.html#priv_all">
<code class="literal">
ALL PRIVILEGES
</code>
</a>
in
its global-privileges output because the meaning of
<a class="link" href="privileges-provided.html#priv_all">
<code class="literal">
ALL PRIVILEGES
</code>
</a>
at
the global level varies depending on which dynamic privileges
are defined. Instead,
<a class="link" href="show-grants.html" title="15.7.7.22 SHOW GRANTS Statement">
<code class="literal">
SHOW GRANTS
</code>
</a>
explicitly lists each granted global privilege:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa66763015"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SHOW</span> <span class="token keyword">GRANTS</span> <span class="token keyword">FOR</span> <span class="token string">'root'</span>@<span class="token string">'localhost'</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Grants for root@localhost <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> CREATE ROLE, DROP ROLE ON *.* TO `root`@`localhost` WITH GRANT <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> OPTION <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> GRANT PROXY ON ''@'' TO `root`@`localhost` WITH GRANT OPTION <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
<p>
Applications that process
<a class="link" href="show-grants.html" title="15.7.7.22 SHOW GRANTS Statement">
<code class="literal">
SHOW
GRANTS
</code>
</a>
output should be adjusted accordingly.
</p>
<p>
At the global level,
<a class="link" href="privileges-provided.html#priv_grant-option">
<code class="literal">
GRANT OPTION
</code>
</a>
applies to all granted static global privileges if granted for
any of them, but applies individually to granted dynamic
privileges.
<a class="link" href="show-grants.html" title="15.7.7.22 SHOW GRANTS Statement">
<code class="literal">
SHOW GRANTS
</code>
</a>
displays
global privileges this way:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
One line listing all granted static privileges, if there are
any, including
<code class="literal">
WITH GRANT OPTION
</code>
if
appropriate.
</p>
</li>
<li class="listitem">
<p>
One line listing all granted dynamic privileges for which
<a class="link" href="privileges-provided.html#priv_grant-option">
<code class="literal">
GRANT OPTION
</code>
</a>
is granted, if
there are any, including
<code class="literal">
WITH GRANT
OPTION
</code>
.
</p>
</li>
<li class="listitem">
<p>
One line listing all granted dynamic privileges for which
<a class="link" href="privileges-provided.html#priv_grant-option">
<code class="literal">
GRANT OPTION
</code>
</a>
is not granted,
if there are any, without
<code class="literal">
WITH GRANT
OPTION
</code>
.
</p>
</li>
</ul>
</div>
<p>
With the optional
<code class="literal">
USING
</code>
clause,
<a class="link" href="show-grants.html" title="15.7.7.22 SHOW GRANTS Statement">
<code class="literal">
SHOW GRANTS
</code>
</a>
enables you to
examine the privileges associated with roles for the user. Each
role named in the
<code class="literal">
USING
</code>
clause must be
granted to the user.
</p>
<p>
Suppose that user
<code class="literal">
u1
</code>
is assigned roles
<code class="literal">
r1
</code>
and
<code class="literal">
r2
</code>
, as follows:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa83626339"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">CREATE</span> <span class="token keyword">ROLE</span> <span class="token string">'r1'</span><span class="token punctuation">,</span> <span class="token string">'r2'</span><span class="token punctuation">;</span>
<span class="token keyword">GRANT</span> <span class="token keyword">SELECT</span> <span class="token keyword">ON</span> db1<span class="token punctuation">.</span><span class="token operator">*</span> <span class="token keyword">TO</span> <span class="token string">'r1'</span><span class="token punctuation">;</span>
<span class="token keyword">GRANT</span> <span class="token keyword">INSERT</span><span class="token punctuation">,</span> <span class="token keyword">UPDATE</span><span class="token punctuation">,</span> <span class="token keyword">DELETE</span> <span class="token keyword">ON</span> db1<span class="token punctuation">.</span><span class="token operator">*</span> <span class="token keyword">TO</span> <span class="token string">'r2'</span><span class="token punctuation">;</span>
<span class="token keyword">CREATE</span> <span class="token keyword">USER</span> <span class="token string">'u1'</span>@<span class="token string">'localhost'</span> <span class="token keyword">IDENTIFIED</span> <span class="token keyword">BY</span> <span class="token string">'u1pass'</span><span class="token punctuation">;</span>
<span class="token keyword">GRANT</span> <span class="token string">'r1'</span><span class="token punctuation">,</span> <span class="token string">'r2'</span> <span class="token keyword">TO</span> <span class="token string">'u1'</span>@<span class="token string">'localhost'</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
<a class="link" href="show-grants.html" title="15.7.7.22 SHOW GRANTS Statement">
<code class="literal">
SHOW GRANTS
</code>
</a>
without
<code class="literal">
USING
</code>
shows the granted roles:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa6129271"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SHOW</span> <span class="token keyword">GRANTS</span> <span class="token keyword">FOR</span> <span class="token string">'u1'</span>@<span class="token string">'localhost'</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Grants for u1@localhost <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> GRANT USAGE ON *.* TO `u1`@`localhost` <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> GRANT `r1`@`%`,`r2`@`%` TO `u1`@`localhost` <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
<p>
Adding a
<code class="literal">
USING
</code>
clause causes the statement to
also display the privileges associated with each role named in
the clause:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa9722183"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SHOW</span> <span class="token keyword">GRANTS</span> <span class="token keyword">FOR</span> <span class="token string">'u1'</span>@<span class="token string">'localhost'</span> <span class="token keyword">USING</span> <span class="token string">'r1'</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Grants for u1@localhost <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> GRANT USAGE ON *.* TO `u1`@`localhost` <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> GRANT SELECT ON `db1`.* TO `u1`@`localhost` <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> GRANT `r1`@`%`,`r2`@`%` TO `u1`@`localhost` <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token prompt">mysql></span> <span class="token keyword">SHOW</span> <span class="token keyword">GRANTS</span> <span class="token keyword">FOR</span> <span class="token string">'u1'</span>@<span class="token string">'localhost'</span> <span class="token keyword">USING</span> <span class="token string">'r2'</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Grants for u1@localhost <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> GRANT USAGE ON *.* TO `u1`@`localhost` <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> GRANT INSERT, UPDATE, DELETE ON `db1`.* TO `u1`@`localhost` <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> GRANT `r1`@`%`,`r2`@`%` TO `u1`@`localhost` <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token prompt">mysql></span> <span class="token keyword">SHOW</span> <span class="token keyword">GRANTS</span> <span class="token keyword">FOR</span> <span class="token string">'u1'</span>@<span class="token string">'localhost'</span> <span class="token keyword">USING</span> <span class="token string">'r1'</span><span class="token punctuation">,</span> <span class="token string">'r2'</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Grants for u1@localhost <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> GRANT USAGE ON *.* TO `u1`@`localhost` <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> GRANT SELECT, INSERT, UPDATE, DELETE ON `db1`.* TO `u1`@`localhost` <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> GRANT `r1`@`%`,`r2`@`%` TO `u1`@`localhost` <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<div class="admon-title">
Note
</div>
<p>
A privilege granted to an account is always in effect, but a
role is not. The active roles for an account can differ across
and within sessions, depending on the value of the
<a class="link" href="server-system-variables.html#sysvar_activate_all_roles_on_login">
<code class="literal">
activate_all_roles_on_login
</code>
</a>
system variable, the account default roles, and whether
<a class="link" href="set-role.html" title="15.7.1.11 SET ROLE Statement">
<code class="literal">
SET ROLE
</code>
</a>
has been executed
within a session.
</p>
</div>
<p>
MySQL supports partial revocation of global privileges, such
that a global privilege can be restricted from applying to
particular schemas (see
<a class="xref" href="partial-revokes.html" title="8.2.12 Privilege Restriction Using Partial Revokes">
Section 8.2.12, “Privilege Restriction Using Partial Revokes”
</a>
). To
indicate which global schema privileges have been revoked for
particular schemas,
<code class="literal">
SHOW GRANTS
</code>
output
includes
<code class="literal">
REVOKE
</code>
statements:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa47790843"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SET</span> <span class="token keyword">PERSIST</span> partial_revokes <span class="token operator">=</span> <span class="token keyword">ON</span><span class="token punctuation">;</span>
<span class="token prompt">mysql></span> <span class="token keyword">CREATE</span> <span class="token keyword">USER</span> u1<span class="token punctuation">;</span>
<span class="token prompt">mysql></span> <span class="token keyword">GRANT</span> <span class="token keyword">SELECT</span><span class="token punctuation">,</span> <span class="token keyword">INSERT</span><span class="token punctuation">,</span> <span class="token keyword">DELETE</span> <span class="token keyword">ON</span> <span class="token operator">*</span><span class="token punctuation">.</span><span class="token operator">*</span> <span class="token keyword">TO</span> u1<span class="token punctuation">;</span>
<span class="token prompt">mysql></span> <span class="token keyword">REVOKE</span> <span class="token keyword">SELECT</span><span class="token punctuation">,</span> <span class="token keyword">INSERT</span> <span class="token keyword">ON</span> mysql<span class="token punctuation">.</span><span class="token operator">*</span> <span class="token keyword">FROM</span> u1<span class="token punctuation">;</span>
<span class="token prompt">mysql></span> <span class="token keyword">REVOKE</span> <span class="token keyword">DELETE</span> <span class="token keyword">ON</span> world<span class="token punctuation">.</span><span class="token operator">*</span> <span class="token keyword">FROM</span> u1<span class="token punctuation">;</span>
<span class="token prompt">mysql></span> <span class="token keyword">SHOW</span> <span class="token keyword">GRANTS</span> <span class="token keyword">FOR</span> u1<span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> Grants for u1@% <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> GRANT SELECT, INSERT, DELETE ON *.* TO `u1`@`%` <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> REVOKE SELECT, INSERT ON `mysql`.* FROM `u1`@`%` <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> REVOKE DELETE ON `world`.* FROM `u1`@`%` <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
<p>
<a class="link" href="show-grants.html" title="15.7.7.22 SHOW GRANTS Statement">
<code class="literal">
SHOW GRANTS
</code>
</a>
does not display
privileges that are available to the named account but are
granted to a different account. For example, if an anonymous
account exists, the named account might be able to use its
privileges, but
<a class="link" href="show-grants.html" title="15.7.7.22 SHOW GRANTS Statement">
<code class="literal">
SHOW GRANTS
</code>
</a>
does
not display them.
</p>
<p>
<a class="link" href="show-grants.html" title="15.7.7.22 SHOW GRANTS Statement">
<code class="literal">
SHOW GRANTS
</code>
</a>
displays mandatory
roles named in the
<a class="link" href="server-system-variables.html#sysvar_mandatory_roles">
<code class="literal">
mandatory_roles
</code>
</a>
system variable
value as follows:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<a class="link" href="show-grants.html" title="15.7.7.22 SHOW GRANTS Statement">
<code class="literal">
SHOW GRANTS
</code>
</a>
without a
<code class="literal">
FOR
</code>
clause displays privileges for the
current user, and includes mandatory roles.
</p>
</li>
<li class="listitem">
<p>
<a class="link" href="show-grants.html" title="15.7.7.22 SHOW GRANTS Statement">
<code class="literal">
SHOW GRANTS FOR
<em class="replaceable">
<code>
user
</code>
</em>
</code>
</a>
displays
privileges for the named user, and does not include
mandatory roles.
</p>
</li>
</ul>
</div>
<p>
This behavior is for the benefit of applications that use the
output of
<a class="link" href="show-grants.html" title="15.7.7.22 SHOW GRANTS Statement">
<code class="literal">
SHOW
GRANTS FOR
<em class="replaceable">
<code>
user
</code>
</em>
</code>
</a>
to
determine which privileges are granted explicitly to the named
user. Were that output to include mandatory roles, it would be
difficult to distinguish roles granted explicitly to the user
from mandatory roles.
</p>
<p>
For the current user, applications can determine privileges with
or without mandatory roles by using
<a class="link" href="show-grants.html" title="15.7.7.22 SHOW GRANTS Statement">
<code class="literal">
SHOW
GRANTS
</code>
</a>
or
<a class="link" href="show-grants.html" title="15.7.7.22 SHOW GRANTS Statement">
<code class="literal">
SHOW GRANTS FOR
CURRENT_USER
</code>
</a>
, respectively.
</p>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/replication-rules-examples.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title">
<a name="replication-rules-examples">
</a>
19.2.5.3 Interactions Between Replication Filtering Options
</h4>
</div>
</div>
</div>
<p>
If you use a combination of database-level and table-level
replication filtering options, the replica first accepts or
ignores events using the database options, then it evaluates all
events permitted by those options according to the table
options. This can sometimes lead to results that seem
counterintuitive. It is also important to note that the results
vary depending on whether the operation is logged using
statement-based or row-based binary logging format. If you want
to be sure that your replication filters always operate in the
same way independently of the binary logging format, which is
particularly important if you are using mixed binary logging
format, follow the guidance in this topic.
</p>
<p>
The effect of the replication filtering options differs between
binary logging formats because of the way the database name is
identified. With statement-based format, DML statements are
handled based on the current database, as specified by the
<a class="link" href="use.html" title="15.8.4 USE Statement">
<code class="literal">
USE
</code>
</a>
statement. With row-based
format, DML statements are handled based on the database where
the modified table exists. DDL statements are always filtered
based on the current database, as specified by the
<a class="link" href="use.html" title="15.8.4 USE Statement">
<code class="literal">
USE
</code>
</a>
statement, regardless of the
binary logging format.
</p>
<p>
An operation that involves multiple tables can also be affected
differently by replication filtering options depending on the
binary logging format. Operations to watch out for include
transactions involving multi-table
<a class="link" href="update.html" title="15.2.17 UPDATE Statement">
<code class="literal">
UPDATE
</code>
</a>
statements, triggers,
cascading foreign keys, stored functions that update multiple
tables, and DML statements that invoke stored functions that
update one or more tables. If these operations update both
filtered-in and filtered-out tables, the results can vary with
the binary logging format.
</p>
<p>
If you need to guarantee that your replication filters operate
consistently regardless of the binary logging format,
particularly if you are using mixed binary logging format
(
<a class="link" href="replication-options-binary-log.html#sysvar_binlog_format">
<code class="literal">
binlog_format=MIXED
</code>
</a>
), use only
table-level replication filtering options, and do not use
database-level replication filtering options. Also, do not use
multi-table DML statements that update both filtered-in and
filtered-out tables.
</p>
<p>
If you need to use a combination of database-level and
table-level replication filters, and want these to operate as
consistently as possible, choose one of the following
strategies:
</p>
<div class="orderedlist">
<ol class="orderedlist" type="1">
<li class="listitem">
<p>
If you use row-based binary logging format
(
<a class="link" href="replication-options-binary-log.html#sysvar_binlog_format">
<code class="literal">
binlog_format=ROW
</code>
</a>
), for
DDL statements, rely on the
<a class="link" href="use.html" title="15.8.4 USE Statement">
<code class="literal">
USE
</code>
</a>
statement to set the
database and do not specify the database name. You can
consider changing to row-based binary logging format for
improved consistency with replication filtering. See
<a class="xref" href="binary-log-setting.html" title="7.4.4.2 Setting The Binary Log Format">
Section 7.4.4.2, “Setting The Binary Log Format”
</a>
for the conditions that
apply to changing the binary logging format.
</p>
</li>
<li class="listitem">
<p>
If you use statement-based or mixed binary logging format
(
<a class="link" href="replication-options-binary-log.html#sysvar_binlog_format">
<code class="literal">
binlog_format=STATEMENT
</code>
</a>
or
<code class="literal">
MIXED
</code>
), for both DML and DDL statements,
rely on the
<a class="link" href="use.html" title="15.8.4 USE Statement">
<code class="literal">
USE
</code>
</a>
statement and
do not use the database name. Also, do not use multi-table
DML statements that update both filtered-in and filtered-out
tables.
</p>
</li>
</ol>
</div>
<div class="example">
<a name="idm46045137374144">
</a>
<p class="title">
<b>
Example 19.7 A
<a class="link" href="replication-options-replica.html#option_mysqld_replicate-ignore-db">
<code class="option">
--replicate-ignore-db
</code>
</a>
option and a
<a class="link" href="replication-options-replica.html#option_mysqld_replicate-do-table">
<code class="option">
--replicate-do-table
</code>
</a>
option
</b>
</p>
<div class="example-contents">
<p>
On the replication source server, the following statements are
issued:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa8661991"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">USE</span> db1<span class="token punctuation">;</span>
<span class="token keyword">CREATE</span> <span class="token keyword">TABLE</span> t2 <span class="token operator">LIKE</span> t1<span class="token punctuation">;</span>
<span class="token keyword">INSERT</span> <span class="token keyword">INTO</span> db2<span class="token punctuation">.</span>t3 <span class="token keyword">VALUES</span> <span class="token punctuation">(</span><span class="token number">1</span><span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
The replica has the following replication filtering options
set:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-simple"><div class="docs-select-all right" id="sa35810981"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-simple">replicate<span class="token operator">-</span>ignore<span class="token operator">-</span>db <span class="token operator">=</span> db1
replicate<span class="token operator">-</span>do<span class="token operator">-</span>table <span class="token operator">=</span> db2<span class="token punctuation">.</span>t3</code></pre>
</div>
<p>
The DDL statement
<a class="link" href="create-table.html" title="15.1.20 CREATE TABLE Statement">
<code class="literal">
CREATE TABLE
</code>
</a>
creates the table in
<code class="literal">
db1
</code>
, as specified by
the preceding
<a class="link" href="use.html" title="15.8.4 USE Statement">
<code class="literal">
USE
</code>
</a>
statement.
The replica filters out this statement according to its
<a class="link" href="replication-options-replica.html#option_mysqld_replicate-ignore-db">
<code class="option">
--replicate-ignore-db = db1
</code>
</a>
option, because
<code class="literal">
db1
</code>
is the current
database. This result is the same whatever the binary logging
format is on the replication source server. However, the
result of the DML
<a class="link" href="insert.html" title="15.2.7 INSERT Statement">
<code class="literal">
INSERT
</code>
</a>
statement is different depending on the binary logging format:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
If row-based binary logging format is in use on the source
(
<a class="link" href="replication-options-binary-log.html#sysvar_binlog_format">
<code class="literal">
binlog_format=ROW
</code>
</a>
), the
replica evaluates the
<a class="link" href="insert.html" title="15.2.7 INSERT Statement">
<code class="literal">
INSERT
</code>
</a>
operation using the
database where the table exists, which is named as
<code class="literal">
db2
</code>
. The database-level option
<a class="link" href="replication-options-replica.html#option_mysqld_replicate-ignore-db">
<code class="option">
--replicate-ignore-db =
db1
</code>
</a>
, which is evaluated first, therefore does not
apply. The table-level option
<a class="link" href="replication-options-replica.html#option_mysqld_replicate-do-table">
<code class="option">
--replicate-do-table =
db2.t3
</code>
</a>
does apply, so the replica applies the
change to table
<code class="literal">
t3
</code>
.
</p>
</li>
<li class="listitem">
<p>
If statement-based binary logging format is in use on the
source
(
<a class="link" href="replication-options-binary-log.html#sysvar_binlog_format">
<code class="literal">
binlog_format=STATEMENT
</code>
</a>
),
the replica evaluates the
<a class="link" href="insert.html" title="15.2.7 INSERT Statement">
<code class="literal">
INSERT
</code>
</a>
operation using the
default database, which was set by the
<a class="link" href="use.html" title="15.8.4 USE Statement">
<code class="literal">
USE
</code>
</a>
statement to
<code class="literal">
db1
</code>
and has not been changed. According
to its database-level
<a class="link" href="replication-options-replica.html#option_mysqld_replicate-ignore-db">
<code class="option">
--replicate-ignore-db = db1
</code>
</a>
option, it therefore ignores the operation and does not
apply the change to table
<code class="literal">
t3
</code>
. The
table-level option
<a class="link" href="replication-options-replica.html#option_mysqld_replicate-do-table">
<code class="option">
--replicate-do-table =
db2.t3
</code>
</a>
is not checked, because the statement
already matched a database-level option and was ignored.
</p>
</li>
</ul>
</div>
<p>
If the
<a class="link" href="replication-options-replica.html#option_mysqld_replicate-ignore-db">
<code class="option">
--replicate-ignore-db =
db1
</code>
</a>
option on the replica is necessary, and the use
of statement-based (or mixed) binary logging format on the
source is also necessary, the results can be made consistent
by omitting the database name from the
<a class="link" href="insert.html" title="15.2.7 INSERT Statement">
<code class="literal">
INSERT
</code>
</a>
statement and relying on
a
<a class="link" href="use.html" title="15.8.4 USE Statement">
<code class="literal">
USE
</code>
</a>
statement instead, as
follows:
</p>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa10770099"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token keyword">USE</span> db1<span class="token punctuation">;</span>
<span class="token keyword">CREATE</span> <span class="token keyword">TABLE</span> t2 <span class="token operator">LIKE</span> t1<span class="token punctuation">;</span>
<span class="token keyword">USE</span> db2<span class="token punctuation">;</span>
<span class="token keyword">INSERT</span> <span class="token keyword">INTO</span> t3 <span class="token keyword">VALUES</span> <span class="token punctuation">(</span><span class="token number">1</span><span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>
</div>
<p>
In this case, the replica always evaluates the
<a class="link" href="insert.html" title="15.2.7 INSERT Statement">
<code class="literal">
INSERT
</code>
</a>
statement based on the
database
<code class="literal">
db2
</code>
. Whether the operation is
logged in statement-based or row-based binary format, the
results remain the same.
</p>
</div>
</div>
<br class="example-break"/>
</div>
<br/>
</div>
|
https://dev.mysql.com/doc/refman/8.4/en/sys-list-add.html | <div id="docs-body">
<div class="section">
<div class="titlepage">
<div>
<div>
<h4 class="title">
<a name="sys-list-add">
</a>
30.4.5.7 The list_add() Function
</h4>
</div>
</div>
</div>
<a class="indexterm" name="idm46045060927680">
</a>
<a class="indexterm" name="idm46045060926192">
</a>
<p>
Adds a value to a comma-separated list of values and returns
the result.
</p>
<p>
This function and
<a class="link" href="sys-list-drop.html" title="30.4.5.8 The list_drop() Function">
<code class="literal">
list_drop()
</code>
</a>
can be useful for manipulating the value of system variables
such as
<a class="link" href="server-system-variables.html#sysvar_sql_mode">
<code class="literal">
sql_mode
</code>
</a>
and
<a class="link" href="server-system-variables.html#sysvar_optimizer_switch">
<code class="literal">
optimizer_switch
</code>
</a>
that take a
comma-separated list of values.
</p>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h5 class="title">
<a name="sys-list-add-parameters">
</a>
Parameters
</h5>
</div>
</div>
</div>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
<p>
<code class="literal">
in_list TEXT
</code>
: The list to be
modified.
</p>
</li>
<li class="listitem">
<p>
<code class="literal">
in_add_value TEXT
</code>
: The value to add
to the list.
</p>
</li>
</ul>
</div>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h5 class="title">
<a name="sys-list-add-return-value">
</a>
Return Value
</h5>
</div>
</div>
</div>
<p>
A
<code class="literal">
TEXT
</code>
value.
</p>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h5 class="title">
<a name="sys-list-add-example">
</a>
Example
</h5>
</div>
</div>
</div>
<div class="copytoclipboard-wrapper">
<pre class="programlisting language-sql"><div class="docs-select-all right" id="sa1365960"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> <span class="token variable">@@sql_mode</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> @@sql_mode <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token prompt">mysql></span> <span class="token keyword">SET</span> <span class="token variable">@@sql_mode</span> <span class="token operator">=</span> sys<span class="token punctuation">.</span>list_add<span class="token punctuation">(</span><span class="token variable">@@sql_mode</span><span class="token punctuation">,</span> <span class="token string">'NO_ENGINE_SUBSTITUTION'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> <span class="token variable">@@sql_mode</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> @@sql_mode <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token prompt">mysql></span> <span class="token keyword">SET</span> <span class="token variable">@@sql_mode</span> <span class="token operator">=</span> sys<span class="token punctuation">.</span>list_drop<span class="token punctuation">(</span><span class="token variable">@@sql_mode</span><span class="token punctuation">,</span> <span class="token string">'ONLY_FULL_GROUP_BY'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token prompt">mysql></span> <span class="token keyword">SELECT</span> <span class="token variable">@@sql_mode</span><span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> @@sql_mode <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
</div>
</div>
</div>
<br/>
</div>
|