This is in reference to 4.0.16, FWIW...

I can't find any direct references to the actual grant permission for controlling a 
slave thread in the online docs. The closest I saw was the 5th paragraph on 
http://www.mysql.com/doc/en/Replication_HOWTO.html. It would seem logical that it's 
covered by either REPLICATION CLIENT or REPLICATION SLAVE, but not so.

Anyway, my experimentation leads me to believe that it's controlled by the SUPER 
privilege. The online docs don't mention these in the description, only this: "Allows 
one connect (once) even if max_connections is reached and execute commands CHANGE 
MASTER, KILL thread, mysqladmin debug, PURGE MASTER LOGS and SET GLOBAL." Paul DuBois' 
2nd ed. of MySQL 4 ("the purple book") doesn't mention them directly in the 
description of SUPER, either (pages 682 and 869).

The user in question is for an automated script that checks if the two replication 
threads are present on the slave server and, if not, pages someone to inform them that 
replication's been broken. Normally it's a very infrequent matter, but we recently 
converted some of our major tables from MyISAM to InnoDB and the traffic to these 
tables sometimes encounters a row lock and the subsequent timeout. While it eventually 
executes on the master, the timeout kills the slave thread. When that happens, a 
simple START SLAVE restarts replication and catches up to the master, including the 
original timed-out query.

I'd like to have the check script attempt a START SLAVE when it sees that 
replication's been broken, as 99.9% of the time it's a timeout and that'll keep us 
from getting paged and having to do it manually at four in the morning.

However, SUPER seems to be over-privileging the user, which I'd like to avoid if 
possible.

Can anyone confirm that it's SUPER that grants permissions for START/STOP SLAVE? Is 
this actually documented anywhere?

Thanks in advance!


-- 
Mike Johnson
Web Developer
Smarter Living, Inc.
phone (617) 886-5539

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to