The Rewriter Query Rewrite Plugin •These statements are subject to rewriting: •As of MySQL 8.0.12:  SELECT ,  INSERT ,  REPLACE ,  UPDATE , and  DELETE . •Prior to MySQL 8.0.12:  SELECT  only. Standalone statements and prepared statements are subject to rewriting. Statements occurring within view definitions or stored programs are not subject to rewriting. •The  Rewriter  plugin uses a database named  query_rewrite  containing a table named rewrite_rules . The table provides persistent storage for the rules that the plugin uses to decide whether to rewrite statements. Users communicate with the plugin by modifying the set of rules stored in this table. The plugin communicates with users by setting the  message  column of table rows. •The  query_rewrite  database contains a stored procedure named  flush_rewrite_rules()  that loads the contents of the rules table into the plugin. •A loadable function named  load_rewrite_rules()  is used by the  flush_rewrite_rules() stored procedure. •The  Rewriter  plugin exposes system variables that enable plugin configuration and status variables that provide runtime operational information. The following sections describe how to install and use the  Rewriter  plugin, and provide reference information for its associated elements. 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 appropriate script located in the share  directory of your MySQL installation: 5.6.4.1 Installing or Uninstalling the Rewriter Query Rewrite Plugin Note • install_rewriter.sql : Choose this script to install the  Rewriter  plugin and its associated elements. • uninstall_rewriter.sql : Choose this script to uninstall the  Rewriter  plugin and its associated elements. 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. Substitute uninstall_rewriter.sql  if you are uninstalling the plugin. 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 | 1087