4
The MySQL Proxy is a simple program which sits between a mysql client and a mysql server and
5
can inspect, transform and act on the data sent through it.
14
Internally the MySQL Proxy is a stack of:
16
@dotfile architecture-overview.dot
18
It is based on a @subpage page-core that exposes the phases of the
19
@subpage protocol to a @ref page-plugins.
25
command -> disconnect;
27
connect -> disconnect;
33
Each of the phases of the life-cycle lead to several more protocol-states. For example the auth phase is made up of at least 3 packets:
36
Client, Proxy, Server;
38
Client -> Proxy [ label = "accept()" ];
39
Proxy -> Proxy [ label = "script: connect_server()" ];
40
Proxy -> Server [ label = "connect()" ];
42
Server -> Proxy [ label = "recv(auth-challenge)" ];
43
Proxy -> Proxy [ label = "script: read_handshake()" ];
44
Proxy -> Client [ label = "send(auth-challenge)" ];
45
Client -> Proxy [ label = "recv(auth-response)" ];
46
Proxy -> Proxy [ label = "script: read_auth()" ];
47
Server -> Proxy [ label = "send(auth-response)" ];
48
Server -> Proxy [ label = "recv(auth-result)" ];
49
Proxy -> Proxy [ label = "script: read_auth_result()" ];
50
Proxy -> Client [ label = "send(auth-result)" ];
55
While the @ref page-core is scalable to a larger number of connections, the plugin/scripting
56
layer hides the complexity from the end-users and simplifies the customization.
58
@section section-stack-of-libs Chassis, libraries and Plugins
60
It is built as a stack of libraries:
62
The @subpage page-chassis provides the common functions that all commandline and daemon applications
64
@li commandline and configfiles
66
@li daemon/service support
69
The MySQL Procotol libraries which can encode and decode:
76
The @ref page-core and the @subpage page-plugins.
78
@dotfile architecture.dot