Skip to content

Instantly share code, notes, and snippets.

@dcai
Last active December 22, 2015 03:09
Show Gist options
  • Save dcai/6408231 to your computer and use it in GitHub Desktop.
Save dcai/6408231 to your computer and use it in GitHub Desktop.
mysql-proxy
echo `pwd`/proxy.lua
mysql-proxy --proxy-lua-script=`pwd`/proxy.lua --log-level=debug
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