I am a beginner to lua language.The main concept is when a user fire the DROP TABLE
command in mysql it should not be executed.But he can fire all other commands as usual in mysql.But i don't want to use GRANTS
for this.Is there any luaScript
to perform this action via mysql-proxy
?
For example:
mysql> DROP TABLE T1;
Please wait for authentication
Also is LuaSql
helpful to perform this task via mysql-proxy
?
Hope i made the idea clear.Someone help me solve out this issue.Thanks in advance.
Yes, you can do that. The idea here is to check a query whether or not it fulfills the requirements you want to filter and if so NOT sending it to the server
This checks each query the proxy receives for
condition
and if it matches it will just return a SUCCESS to the client without delivering the query. Thus effectively dropping the query.