Yes, it is possible to build mysql proxy in other languages.
Here are few reference implementations in java
https://github.com/MPjct/JMPjct
https://github.com/Flipkart/phantom-mysql-proxy
To check the traffic between Mysql client and server , you can print the following param.
Com_Query.loadFromPacket(packet).query