Lua script to stop firing a query in mysql via mysql proxy -
i beginner lua language.the main concept when user fire drop table
command in mysql should not executed.but can fire other commands usual in mysql.but don't want use grants
this.is there luascript
perform action via mysql-proxy
?
for example:
mysql> drop table t1; please wait authentication
also luasql
helpful perform task via mysql-proxy
?
hope made idea clear.someone me solve out issue.thanks in advance.
yes, can that. idea here check query whether or not fulfills requirements want filter , if not sending server
function read_query(packet) if string.byte(packet) == proxy.com_query query = packet:sub(2) if condition(query) proxy.response = { type = proxy.mysqld_packet_ok, } return proxy.proxy_send_result end end end
this checks each query proxy receives condition
, if matches return success client without delivering query. dropping query.
Comments
Post a Comment