List:General Discussion« Previous MessageNext Message »
From:Steve Edberg Date:November 28 2008 5:34pm
Subject:Re: How to disable some of the mysql query?
View as plain text  
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?

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:

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

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.


+--------------- my people are the people of the dessert, ---------------+
| Steve Edberg                       |
| UC Davis Genome Center                            sbedberg@stripped |
| Bioinformatics programming/database/sysadmin             (530)754-9127 |
+---------------- said t e lawrence, picking up his fork ----------------+
How to disable some of the mysql query?Wayne28 Nov
  • Re: How to disable some of the mysql query?Steve Edberg28 Nov
Re: How to disable some of the mysql query?Chandru29 Nov