[Sqlrelay-discussion] Query filter per user
Brought to you by:
mused
|
From: Matias R. <cy...@sa...> - 2010-04-13 19:50:08
|
Hola! I am new to SQLrelay and I just installed it and connected it to MySQL for testing purposes as I think it may solve my problem. I need to find a way to filter queries that are currently being executed from differents mysql clients so each client can only modify the rows that belong to them and not the others. Right now every client is connecting to a MySQL server with the same user/passwd so I have no control on how to limit each client to certains rows from a table. An example to try to clarify this: table: M fields: a,b,c,d,client I need that client 1 can only "UPDATE" the rows from table M WHERE client=1 and so on. Since MySQL has no permissions per row I think that I can use SQLrelay in the middle, connecting each "client" to SQLrelay to handle the SQL query permissions at the SQLrelay level. The clients queries are written the following way: "UPDATE M set field=value WHERE client=$client" I was thinking that I could create one SQLrelay user per client and only allow the queries with the form written above. Is this possible? Do I have to add one user per client with the query that is allowed for that user? Any recommendation would be highly appreciated. Thanks in advance, -- Matias Rollan <cy...@sa...> |