Extending MySQL 8.0  /  ...  /  Writing Protocol Trace Plugins

4.4.11 Writing Protocol Trace Plugins

MySQL supports the use of protocol trace plugins: client-side plugins that implement tracing of communication between a client and the server that takes place using the client/server protocol.