If installed, the
Rewriter plugin involves
some overhead even when disabled. To avoid this overhead, do
not install the plugin unless you plan to use it.
To install or uninstall the
rewrite plugin, choose the approropriate script located in the
share directory of your MySQL installation:
install_rewriter.sql: Choose this script to install the
Rewriterplugin and its associated components.Note
Before MySQL 5.7.8, there are two installation scripts,
install_rewriter_with_optional_columns.sql, which differ in whether they create the
normalized_columnscolumns of the
rewrite_rulestable. As of 5.7.8, the installation script always creates these columns. (For details about the table columns, see Section 18.104.22.168.1, “Rewriter Query Rewrite Plugin Rules Table”.)
uninstall_rewriter.sql: Choose this script to uninstall the
Rewriterplugin and its associated components.
Run the chosen script as follows:
shell> mysql -u root -p < install_rewriter.sql Enter password: (enter root password here)
The example here uses the
install_rewriter.sql installation script.
Make the appropriate substitution if you choose a different
Running an installation script should install and enable the plugin. To verify that, connect to the server and execute this statement:
mysql> SHOW GLOBAL VARIABLES LIKE 'rewriter_enabled'; +------------------+-------+ | Variable_name | Value | +------------------+-------+ | rewriter_enabled | ON | +------------------+-------+
For usage instructions, see Section 22.214.171.124, “Using the Rewriter Query Rewrite Plugin”. For reference information, see Section 126.96.36.199, “Rewriter Query Rewrite Plugin Reference”.