14.6. MySQL Proxy
The MySQL Proxy is an application that communicates over the network
using the MySQL Network Protocol and provides communication between
one or more MySQL servers and one or more MySQL clients. In the most
basic configuration, MySQL Proxy simply passes on queries from the
client to the MySQL Server and returns the responses from the MySQL
Server to the client.
Because MySQL Proxy uses the MySQL network protocol, any MySQL
compatible client (include the command line client, any clients
using the MySQL client libraries, and any connector that supports
the MySQL network protocol) can connect to the proxy without
modification.
In addition to the basic pass-through configuration, the MySQL Proxy
is also capable of monitoring and altering the communication between
the client and the server. This interception of the queries enables
you to add profiling, and the interception of the exchanges is
scriptable using the Lua scripting language.
By intercepting the queries from the client, the proxy can insert
additional queries into the list of queries sent to the server, and
remove the additional results when they are returned by the server.
Using this functionality you can add informational statements to
each query, for example to monitor their execution time or progress,
and separately log the results, while still returning the results
from the original query to the client.
The proxy allows you to perform additional monitoring, filtering or
manipulation on queries without you having to make any modifications
to the client and without the client even being aware that it is
communicating with anything but a genuine MySQL server.
This documentation covers MySQL Proxy 0.8.0.
Warning
MySQL Proxy is currently an Alpha release and should not be used
within production environments.
Important
MySQL Proxy is compatible with MySQL 5.0.x or later. Testing has
not been performed with Version 4.1. Please provide feedback on
your experiences via the
MySQL Proxy Forum.