The client system i am using is (192.168.YY.YY) and the backend address i have mentioned in mysql-proxy is (192.168.XX.XX).I use the following LuaScript
to log the queries using mysql-proxy
function read_query( packet )
b={}
j=1
if string.byte(packet) == proxy.COM_QUERY then
local query = string.sub(packet, 2)
table.insert(b,query)
print(b[j])
end
end
And the above script logs the following results from the mysql of backend server (192.168.XX.XX):
select @@version_comment limit 1
SELECT DATABASE()
select @@version_comment limit 1
select USER()
SELECT DATABASE()
show tables
And i need to store these logged queries into a database of the client system (192.168.YY.YY) .How can the logged queries be stored into the database of the client system.Someone please help me to solve this issue.Thanks !!