How to disable some of the mysql query?

How to disable some of the mysql query?

am 28.11.2008 18:07:07 von wayne

------=_Part_50064_10342568.1227892027560
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

for example,one user has the 'select' right on talbe 'test'(innodb,million
records),however,he sometimes execute query like 'select * from test'.That
will slow down the whole database.
Is there a way to disable some queries for some users? Or,mysql's authority
can be more detailed?
thx

------=_Part_50064_10342568.1227892027560--

Re: How to disable some of the mysql query?

am 28.11.2008 18:34:00 von Steve Edberg

At 1:07 AM +0800 11/29/08, Wayne wrote:
>for example,one user has the 'select' right on talbe 'test'(innodb,million
>records),however,he sometimes execute query like 'select * from test'.That
>will slow down the whole database.
>Is there a way to disable some queries for some users? Or,mysql's authority
>can be more detailed?
>thx


As far as I know, you can't impose a limit on max number of records
returned/hour. You can limit number of queries or updates or
connections per hour:

http://dev.mysql.com/doc/refman/5.0/en/user-resources.html

It doesn't appear this has changed in MySQL 6. Depending on your
server setup, you could implement some sort of per-user bandwidth
limit outside of MySQL (perhaps imposing limits only on port 3306
traffic using a packet shaper/traffic shaper), or activate, monitor &
parse the query log

http://dev.mysql.com/doc/refman/5.0/en/query-log.html

or at least the slow query log.

On an active server, I would imagine the overhead of a query log and
then parsing it (eg; tail -f /path/to/log | grep ...) would be
significant. If MySQL allows you to log directly to a Unix pipe (eg
query_log = "| some_program_that_monitors_activity") that might
reduce the load sufficiently.

steve

--
+--------------- my people are the people of the dessert, ---------------+
| Steve Edberg http://pgfsun.ucdavis.edu/ |
| UC Davis Genome Center sbedberg@ucdavis.edu |
| Bioinformatics programming/database/sysadmin (530)754-9127 |
+---------------- said t e lawrence, picking up his fork ----------------+

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org

Re: How to disable some of the mysql query?

am 29.11.2008 19:03:24 von Chandru

------=_Part_58158_14993609.1227981804227
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi wayne,
If you dont want any query with select * from

" by mistake" then
you can start the mysql by using the command --safe-updates or --i-am-a-dummy
this does not allow queries to be executed if they dont have any where
clause.

Regards,
Chandru
www.mafiree.com


On Fri, Nov 28, 2008 at 11:04 PM, Steve Edberg wrote:

> At 1:07 AM +0800 11/29/08, Wayne wrote:
>
>> for example,one user has the 'select' right on talbe 'test'(innodb,million
>> records),however,he sometimes execute query like 'select * from test'.That
>> will slow down the whole database.
>> Is there a way to disable some queries for some users? Or,mysql's
>> authority
>> can be more detailed?
>> thx
>>
>
>
> As far as I know, you can't impose a limit on max number of records
> returned/hour. You can limit number of queries or updates or connections per
> hour:
>
> http://dev.mysql.com/doc/refman/5.0/en/user-resources.html
>
> It doesn't appear this has changed in MySQL 6. Depending on your server
> setup, you could implement some sort of per-user bandwidth limit outside of
> MySQL (perhaps imposing limits only on port 3306 traffic using a packet
> shaper/traffic shaper), or activate, monitor & parse the query log
>
> http://dev.mysql.com/doc/refman/5.0/en/query-log.html
>
> or at least the slow query log.
>
> On an active server, I would imagine the overhead of a query log and then
> parsing it (eg; tail -f /path/to/log | grep ...) would be significant. If
> MySQL allows you to log directly to a Unix pipe (eg query_log = "|
> some_program_that_monitors_activity") that might reduce the load
> sufficiently.
>
> steve
>
> --
> +--------------- my people are the people of the dessert, ---------------+
> | Steve Edberg http://pgfsun.ucdavis.edu/ |
> | UC Davis Genome Center sbedberg@ucdavis.edu |
> | Bioinformatics programming/database/sysadmin (530)754-9127 |
> +---------------- said t e lawrence, picking up his fork ----------------+
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/mysql?unsub=chandru.dba@gmail.com
>
>

------=_Part_58158_14993609.1227981804227--