pt-heartbeat super privilege

Reported by Markus Falb on 2012-11-04
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Toolkit
Undecided
Unassigned

Bug Description

# rpm -q mysql-server percona-toolkit
mysql-server-5.0.95-1.el5_7.1
percona-toolkit-2.1.5-1

Starting with an user that lacks necessary privileges brings me this.

Starting pt-heartbeat: DBD::mysql::db selectrow_hashref failed: Access denied; you need the SUPER,REPLICATION CLIENT privilege for this operation [for Statement "SHOW MASTER STATUS"] at /usr/bin/pt-heartbeat line 4883.
FAILED

This error message is could easily trick an admin to think that both privileges are necessary. The mysql docu at
http://dev.mysql.com/doc/refman/5.0/en/privileges-provided.html says
The REPLICATION CLIENT privilege enables the use of SHOW MASTER STATUS and SHOW SLAVE STATUS.

so super is not needed.

http://dev.mysql.com/doc/refman/5.0/en/too-many-connections.html says
mysqld actually permits max_connections+1 clients to connect. etc...

Therefore I think it's important not to give SUPER privilege unnecessary. pt-heartbeat could eat up your extra connection slot (Imagine a full log partition for example)

I think the error message should read
you need the REPLICATION CLIENT privilege
instead of
you need the SUPER,REPLICATION CLIENT privilege

description: updated
Brian Fraser (fraserbn) wrote :

I agree, but that message comes straight from MySQL itself, not from the toolkit; Maybe you should resubmit the bug to the MySQL tracker?

We could catch the error and mangle it to look as you want, but Daniel will have to decide if we actually want to do that.

Markus Falb (markus-falb) wrote :

I found http://bugs.mysql.com/bug.php?id=34227
It is fixed in newer mysql versions it seems.

I would not bother with mangling mysql errors.

I would suggest mentioning the required privileges in the manpage though, maybe with a note that the error message could be misleading in older mysql versions.

Daniel Nichter (daniel-nichter) wrote :

Sure, we can document the required privs.

Changed in percona-toolkit:
status: New → Triaged
tags: added: docs privs pt-heartbeat
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.