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 [EMAIL PROTECTED] |
| 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/[EMAIL PROTECTED]