As part of some other work, I have documented the MySQL network protocol.
I am in the process of producing a Net::MySQLd server for this protocol.
Ian Redfern's Home