This is obstinately documented (http://dev.mysql.com/doc/dev/mysql-server/latest/PAGE_PROTOC...), but I can't find a nice cheat-sheet saying "to send a query, you send this packet and you receive these packets" etc. I've taken to looking at e.g. the pure-Python PyMySQL package source-code https://github.com/PyMySQL/PyMySQL/blob/master/pymysql/conne...
Here's my progress so far: https://gist.github.com/williame/ebf003dd85d5949f551a72331ae...
Anyone know what commands you can send, and what the expected responses are?