Documentation Home
MySQL 5.7 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 37.4Mb
PDF (A4) - 37.4Mb
PDF (RPM) - 37.0Mb
EPUB - 10.6Mb
HTML Download (TGZ) - 10.3Mb
HTML Download (Zip) - 10.4Mb
HTML Download (RPM) - 9.0Mb
Eclipse Doc Plugin (TGZ) - 11.2Mb
Eclipse Doc Plugin (Zip) - 13.4Mb
Man Pages (TGZ) - 204.7Kb
Man Pages (Zip) - 311.7Kb
Info (Gzip) - 3.4Mb
Info (Zip) - 3.4Mb
Excerpts from this Manual

MySQL 5.7 Reference Manual  /  ...  /  Installing or uninstalling the Rewriter Query Rewrite Plugin Installing or uninstalling the Rewriter Query Rewrite Plugin


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 Rewriter query rewrite plugin, choose the approropriate script located in the share directory of your MySQL installation:

  • install_rewriter.sql: Choose this script to install the Rewriter plugin and its associated components.


    Before MySQL 5.7.8, there are two installation scripts, install_rewriter.sql and install_rewriter_with_optional_columns.sql, which differ in whether they create the pattern_digest and normalized_columns columns of the rewrite_rules table. As of 5.7.8, the installation script always creates these columns. (For details about the table columns, see Section, “Rewriter Query Rewrite Plugin Rules Table”.)

  • uninstall_rewriter.sql: Choose this script to uninstall the Rewriter plugin 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 script.

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, “Using the Rewriter Query Rewrite Plugin”. For reference information, see Section, “Rewriter Query Rewrite Plugin Reference”.

User Comments
Sign Up Login You must be logged in to post a comment.