Last active
December 22, 2015 03:09
-
-
Save dcai/6408231 to your computer and use it in GitHub Desktop.
mysql-proxy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo `pwd`/proxy.lua | |
mysql-proxy --proxy-lua-script=`pwd`/proxy.lua --log-level=debug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function read_query(packet) | |
if string.byte(packet) == proxy.COM_QUERY then | |
print(">> " .. string.sub(packet, 2)) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment