Rechercher dans le manuel MySQL
5.6.5.1 Installing or Uninstalling ddl_rewriter
This section describes how to install or uninstall the
ddl_rewriter
plugin. For general information
about installing plugins, see Section 5.6.1, “Installing and Uninstalling Plugins”.
If installed, the ddl_rewriter
plugin
involves some minimal overhead even when disabled. To avoid
this overhead, install ddl_rewriter
only
for the period during which you intend to use it.
The primary use case is modification of statements restored from dump files, so the typical usage pattern is: 1) Install the plugin; 2) restore the dump file or files; 3) uninstall the plugin.
To be usable by the server, the plugin library file must be
located in the MySQL plugin directory (the directory named by
the plugin_dir
system
variable). If necessary, configure the plugin directory location
by setting the value of
plugin_dir
at server startup.
The plugin library file base name is
ddl_rewriter
. The file name suffix differs
per platform (for example, .so
for Unix and
Unix-like systems, .dll
for Windows).
To install the ddl_rewriter
plugin, use the
INSTALL PLUGIN
statement (adjust
the .so
suffix for your platform as
necessary):
To verify plugin installation, examine the
INFORMATION_SCHEMA.PLUGINS
table or
use the SHOW PLUGINS
statement
(see Section 5.6.2, “Obtaining Server Plugin Information”). For
example:
- FROM INFORMATION_SCHEMA.PLUGINS
- +--------------+---------------+-------------+
- | PLUGIN_NAME | PLUGIN_STATUS | PLUGIN_TYPE |
- +--------------+---------------+-------------+
- | ddl_rewriter | ACTIVE | AUDIT |
- +--------------+---------------+-------------+
As the preceding result shows, ddl_rewriter
is implemented as an audit plugin.
If the plugin failed to initialize, check the server error log for diagnostic messages.
Once installed as just described,
ddl_rewriter
remains installed until
uninstalled. To remove it, use UNINSTALL
PLUGIN
:
- UNINSTALL PLUGIN ddl_rewriter;
If ddl_rewriter
is installed, you can use the
--ddl-rewriter
option for subsequent server
startups to control ddl_rewriter
plugin
activation. For example, to prevent the plugin from being
enabled at runtime, use this option:
[mysqld]
ddl-rewriter=OFF
Document created the 26/06/2006, last modified the 26/10/2018
Source of the printed document:https://www.gaudry.be/en/mysql-rf-ddl-rewriter-installation.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.
References
These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.