سؤال

MySQL Proxy sounds like the best option to proxy a connection to MySQL server in order to modify queries online except that it only supports scripts in Lua, AFAIK.

Is it possible to script MySQL Proxy behavior in languages other than Lua? Ideally, C, C++ or C#?

If not, how do I look through and amend the traffic between MySQL client and server (e.g., in C#) without fully implementing the MySQL client/server protocol?

هل كانت مفيدة؟

المحلول

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

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top